diff --git a/sdk/avs/azure-resourcemanager-avs/CHANGELOG.md b/sdk/avs/azure-resourcemanager-avs/CHANGELOG.md index 350b612985f25..690d50a52c42f 100644 --- a/sdk/avs/azure-resourcemanager-avs/CHANGELOG.md +++ b/sdk/avs/azure-resourcemanager-avs/CHANGELOG.md @@ -1,6 +1,8 @@ # Release History -## 1.2.0-beta.1 (Unreleased) +## 1.0.0-beta.1 (2024-03-15) + +- Azure Resource Manager Avs client library for Java. This package contains Microsoft Azure SDK for Avs Management SDK. Azure VMware Solution API. Package tag package-2023-09-01. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). ### Features Added diff --git a/sdk/avs/azure-resourcemanager-avs/README.md b/sdk/avs/azure-resourcemanager-avs/README.md index 5602eda11d66e..918077b00d368 100644 --- a/sdk/avs/azure-resourcemanager-avs/README.md +++ b/sdk/avs/azure-resourcemanager-avs/README.md @@ -2,7 +2,7 @@ Azure Resource Manager Avs client library for Java. -This package contains Microsoft Azure SDK for Avs Management SDK. Azure VMware Solution API. Package tag package-2023-03-01. 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 Avs Management SDK. Azure VMware Solution API. Package tag package-2023-09-01. 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-avs - 1.1.0 + 1.2.0-beta.1 ``` [//]: # ({x-version-update-end}) @@ -45,7 +45,7 @@ Azure Management Libraries require a `TokenCredential` implementation for authen ### Authentication -By default, Azure Active Directory token authentication depends on correct configuration of the following environment variables. +By default, Microsoft Entra ID token authentication depends on correct configuration of the following environment variables. - `AZURE_CLIENT_ID` for Azure client ID. - `AZURE_TENANT_ID` for Azure tenant ID. @@ -105,7 +105,7 @@ This project has adopted the [Microsoft Open Source Code of Conduct][coc]. For m [survey]: https://microsoft.qualtrics.com/jfe/form/SV_ehN0lIk2FKEBkwd?Q_CHL=DOCS [docs]: https://azure.github.io/azure-sdk-for-java/ -[jdk]: https://docs.microsoft.com/java/azure/jdk/ +[jdk]: https://learn.microsoft.com/azure/developer/java/fundamentals/ [azure_subscription]: https://azure.microsoft.com/free/ [azure_identity]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/identity/azure-identity [azure_core_http_netty]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/core/azure-core-http-netty diff --git a/sdk/avs/azure-resourcemanager-avs/SAMPLE.md b/sdk/avs/azure-resourcemanager-avs/SAMPLE.md index 4c9da09c8472b..ab39a308ee08f 100644 --- a/sdk/avs/azure-resourcemanager-avs/SAMPLE.md +++ b/sdk/avs/azure-resourcemanager-avs/SAMPLE.md @@ -52,6 +52,13 @@ - [Get](#hcxenterprisesites_get) - [List](#hcxenterprisesites_list) +## IscsiPaths + +- [CreateOrUpdate](#iscsipaths_createorupdate) +- [Delete](#iscsipaths_delete) +- [Get](#iscsipaths_get) +- [ListByPrivateCloud](#iscsipaths_listbyprivatecloud) + ## Locations - [CheckQuotaAvailability](#locations_checkquotaavailability) @@ -155,77 +162,66 @@ import com.azure.resourcemanager.avs.models.AddonHcxProperties; import com.azure.resourcemanager.avs.models.AddonSrmProperties; import com.azure.resourcemanager.avs.models.AddonVrProperties; -/** Samples for Addons CreateOrUpdate. */ +/** + * Samples for Addons CreateOrUpdate. + */ public final class AddonsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/Addons_CreateOrUpdate_HCX.json + * x-ms-original-file: + * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/Addons_CreateOrUpdate_HCX.json */ /** * Sample code: Addons_CreateOrUpdate_HCX. - * + * * @param manager Entry point to AvsManager. */ public static void addonsCreateOrUpdateHCX(com.azure.resourcemanager.avs.AvsManager manager) { - manager - .addons() - .define("hcx") - .withExistingPrivateCloud("group1", "cloud1") - .withProperties(new AddonHcxProperties().withOffer("VMware MaaS Cloud Provider (Enterprise)")) - .create(); + manager.addons().define("hcx").withExistingPrivateCloud("group1", "cloud1") + .withProperties(new AddonHcxProperties().withOffer("VMware MaaS Cloud Provider (Enterprise)")).create(); } /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/Addons_CreateOrUpdate_SRM.json + * x-ms-original-file: + * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/Addons_CreateOrUpdate_SRM.json */ /** * Sample code: Addons_CreateOrUpdate_SRM. - * + * * @param manager Entry point to AvsManager. */ public static void addonsCreateOrUpdateSRM(com.azure.resourcemanager.avs.AvsManager manager) { - manager - .addons() - .define("srm") - .withExistingPrivateCloud("group1", "cloud1") - .withProperties(new AddonSrmProperties().withLicenseKey("fakeTokenPlaceholder")) - .create(); + manager.addons().define("srm").withExistingPrivateCloud("group1", "cloud1") + .withProperties(new AddonSrmProperties().withLicenseKey("fakeTokenPlaceholder")).create(); } /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/Addons_CreateOrUpdate_ArcReg.json + * x-ms-original-file: + * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/Addons_CreateOrUpdate_ArcReg.json */ /** - * Sample code: Addons_CreateOrUpdate_Arc. - * + * Sample code: Addons_CreateOrUpdate_ArcReg. + * * @param manager Entry point to AvsManager. */ - public static void addonsCreateOrUpdateArc(com.azure.resourcemanager.avs.AvsManager manager) { - manager - .addons() - .define("arc") - .withExistingPrivateCloud("group1", "cloud1") - .withProperties( - new AddonArcProperties() - .withVCenter( - "subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg_test/providers/Microsoft.ConnectedVMwarevSphere/VCenters/test-vcenter")) + public static void addonsCreateOrUpdateArcReg(com.azure.resourcemanager.avs.AvsManager manager) { + manager.addons().define("arc").withExistingPrivateCloud("group1", "cloud1") + .withProperties(new AddonArcProperties().withVCenter( + "subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg_test/providers/Microsoft.ConnectedVMwarevSphere/VCenters/test-vcenter")) .create(); } /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/Addons_CreateOrUpdate_VR.json + * x-ms-original-file: + * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/Addons_CreateOrUpdate_VR.json */ /** * Sample code: Addons_CreateOrUpdate_VR. - * + * * @param manager Entry point to AvsManager. */ public static void addonsCreateOrUpdateVR(com.azure.resourcemanager.avs.AvsManager manager) { - manager - .addons() - .define("vr") - .withExistingPrivateCloud("group1", "cloud1") - .withProperties(new AddonVrProperties().withVrsCount(1)) - .create(); + manager.addons().define("vr").withExistingPrivateCloud("group1", "cloud1") + .withProperties(new AddonVrProperties().withVrsCount(1)).create(); } } ``` @@ -233,14 +229,17 @@ public final class AddonsCreateOrUpdateSamples { ### Addons_Delete ```java -/** Samples for Addons Delete. */ +/** + * Samples for Addons Delete. + */ public final class AddonsDeleteSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/Addons_Delete.json + * x-ms-original-file: + * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/Addons_Delete.json */ /** * Sample code: Addons_Delete. - * + * * @param manager Entry point to AvsManager. */ public static void addonsDelete(com.azure.resourcemanager.avs.AvsManager manager) { @@ -252,14 +251,17 @@ public final class AddonsDeleteSamples { ### Addons_Get ```java -/** Samples for Addons Get. */ +/** + * Samples for Addons Get. + */ public final class AddonsGetSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/Addons_Get_SRM.json + * x-ms-original-file: + * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/Addons_Get_SRM.json */ /** * Sample code: Addons_Get_SRM. - * + * * @param manager Entry point to AvsManager. */ public static void addonsGetSRM(com.azure.resourcemanager.avs.AvsManager manager) { @@ -267,11 +269,12 @@ public final class AddonsGetSamples { } /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/Addons_Get_VR.json + * x-ms-original-file: + * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/Addons_Get_VR.json */ /** * Sample code: Addons_Get_VR. - * + * * @param manager Entry point to AvsManager. */ public static void addonsGetVR(com.azure.resourcemanager.avs.AvsManager manager) { @@ -279,11 +282,12 @@ public final class AddonsGetSamples { } /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/Addons_Get_HCX.json + * x-ms-original-file: + * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/Addons_Get_HCX.json */ /** * Sample code: Addons_Get_HCX. - * + * * @param manager Entry point to AvsManager. */ public static void addonsGetHCX(com.azure.resourcemanager.avs.AvsManager manager) { @@ -291,11 +295,12 @@ public final class AddonsGetSamples { } /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/Addons_Get_ArcReg.json + * x-ms-original-file: + * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/Addons_Get_ArcReg.json */ /** * Sample code: Addons_Get_ArcReg. - * + * * @param manager Entry point to AvsManager. */ public static void addonsGetArcReg(com.azure.resourcemanager.avs.AvsManager manager) { @@ -307,14 +312,17 @@ public final class AddonsGetSamples { ### Addons_List ```java -/** Samples for Addons List. */ +/** + * Samples for Addons List. + */ public final class AddonsListSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/Addons_List.json + * x-ms-original-file: + * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/Addons_List.json */ /** * Sample code: Addons_List. - * + * * @param manager Entry point to AvsManager. */ public static void addonsList(com.azure.resourcemanager.avs.AvsManager manager) { @@ -326,14 +334,17 @@ public final class AddonsListSamples { ### Authorizations_CreateOrUpdate ```java -/** Samples for Authorizations CreateOrUpdate. */ +/** + * Samples for Authorizations CreateOrUpdate. + */ public final class AuthorizationsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/Authorizations_CreateOrUpdate.json + * x-ms-original-file: + * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/Authorizations_CreateOrUpdate.json */ /** * Sample code: Authorizations_CreateOrUpdate. - * + * * @param manager Entry point to AvsManager. */ public static void authorizationsCreateOrUpdate(com.azure.resourcemanager.avs.AvsManager manager) { @@ -345,14 +356,17 @@ public final class AuthorizationsCreateOrUpdateSamples { ### Authorizations_Delete ```java -/** Samples for Authorizations Delete. */ +/** + * Samples for Authorizations Delete. + */ public final class AuthorizationsDeleteSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/Authorizations_Delete.json + * x-ms-original-file: + * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/Authorizations_Delete.json */ /** * Sample code: Authorizations_Delete. - * + * * @param manager Entry point to AvsManager. */ public static void authorizationsDelete(com.azure.resourcemanager.avs.AvsManager manager) { @@ -364,20 +378,22 @@ public final class AuthorizationsDeleteSamples { ### Authorizations_Get ```java -/** Samples for Authorizations Get. */ +/** + * Samples for Authorizations Get. + */ public final class AuthorizationsGetSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/Authorizations_Get.json + * x-ms-original-file: + * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/Authorizations_Get.json */ /** * Sample code: Authorizations_Get. - * + * * @param manager Entry point to AvsManager. */ public static void authorizationsGet(com.azure.resourcemanager.avs.AvsManager manager) { - manager - .authorizations() - .getWithResponse("group1", "cloud1", "authorization1", com.azure.core.util.Context.NONE); + manager.authorizations().getWithResponse("group1", "cloud1", "authorization1", + com.azure.core.util.Context.NONE); } } ``` @@ -385,14 +401,17 @@ public final class AuthorizationsGetSamples { ### Authorizations_List ```java -/** Samples for Authorizations List. */ +/** + * Samples for Authorizations List. + */ public final class AuthorizationsListSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/Authorizations_List.json + * x-ms-original-file: + * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/Authorizations_List.json */ /** * Sample code: Authorizations_List. - * + * * @param manager Entry point to AvsManager. */ public static void authorizationsList(com.azure.resourcemanager.avs.AvsManager manager) { @@ -404,23 +423,22 @@ public final class AuthorizationsListSamples { ### CloudLinks_CreateOrUpdate ```java -/** Samples for CloudLinks CreateOrUpdate. */ +/** + * Samples for CloudLinks CreateOrUpdate. + */ public final class CloudLinksCreateOrUpdateSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/CloudLinks_CreateOrUpdate.json + * x-ms-original-file: + * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/CloudLinks_CreateOrUpdate.json */ /** * Sample code: CloudLinks_CreateOrUpdate. - * + * * @param manager Entry point to AvsManager. */ public static void cloudLinksCreateOrUpdate(com.azure.resourcemanager.avs.AvsManager manager) { - manager - .cloudLinks() - .define("cloudLink1") - .withExistingPrivateCloud("group1", "cloud1") - .withLinkedCloud( - "/subscriptions/12341234-1234-1234-1234-123412341234/resourceGroups/mygroup/providers/Microsoft.AVS/privateClouds/cloud2") + manager.cloudLinks().define("cloudLink1").withExistingPrivateCloud("group1", "cloud1").withLinkedCloud( + "/subscriptions/12341234-1234-1234-1234-123412341234/resourceGroups/mygroup/providers/Microsoft.AVS/privateClouds/cloud2") .create(); } } @@ -429,14 +447,17 @@ public final class CloudLinksCreateOrUpdateSamples { ### CloudLinks_Delete ```java -/** Samples for CloudLinks Delete. */ +/** + * Samples for CloudLinks Delete. + */ public final class CloudLinksDeleteSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/CloudLinks_Delete.json + * x-ms-original-file: + * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/CloudLinks_Delete.json */ /** * Sample code: CloudLinks_Delete. - * + * * @param manager Entry point to AvsManager. */ public static void cloudLinksDelete(com.azure.resourcemanager.avs.AvsManager manager) { @@ -448,14 +469,17 @@ public final class CloudLinksDeleteSamples { ### CloudLinks_Get ```java -/** Samples for CloudLinks Get. */ +/** + * Samples for CloudLinks Get. + */ public final class CloudLinksGetSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/CloudLinks_Get.json + * x-ms-original-file: + * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/CloudLinks_Get.json */ /** * Sample code: CloudLinks_Get. - * + * * @param manager Entry point to AvsManager. */ public static void cloudLinksGet(com.azure.resourcemanager.avs.AvsManager manager) { @@ -467,14 +491,17 @@ public final class CloudLinksGetSamples { ### CloudLinks_List ```java -/** Samples for CloudLinks List. */ +/** + * Samples for CloudLinks List. + */ public final class CloudLinksListSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/CloudLinks_List.json + * x-ms-original-file: + * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/CloudLinks_List.json */ /** * Sample code: CloudLinks_List. - * + * * @param manager Entry point to AvsManager. */ public static void cloudLinksList(com.azure.resourcemanager.avs.AvsManager manager) { @@ -488,24 +515,22 @@ public final class CloudLinksListSamples { ```java import com.azure.resourcemanager.avs.models.Sku; -/** Samples for Clusters CreateOrUpdate. */ +/** + * Samples for Clusters CreateOrUpdate. + */ public final class ClustersCreateOrUpdateSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/Clusters_CreateOrUpdate.json + * x-ms-original-file: + * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/Clusters_CreateOrUpdate.json */ /** * Sample code: Clusters_CreateOrUpdate. - * + * * @param manager Entry point to AvsManager. */ public static void clustersCreateOrUpdate(com.azure.resourcemanager.avs.AvsManager manager) { - manager - .clusters() - .define("cluster1") - .withExistingPrivateCloud("group1", "cloud1") - .withSku(new Sku().withName("AV20")) - .withClusterSize(3) - .create(); + manager.clusters().define("cluster1").withExistingPrivateCloud("group1", "cloud1") + .withSku(new Sku().withName("AV20")).withClusterSize(3).create(); } } ``` @@ -513,14 +538,17 @@ public final class ClustersCreateOrUpdateSamples { ### Clusters_Delete ```java -/** Samples for Clusters Delete. */ +/** + * Samples for Clusters Delete. + */ public final class ClustersDeleteSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/Clusters_Delete.json + * x-ms-original-file: + * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/Clusters_Delete.json */ /** * Sample code: Clusters_Delete. - * + * * @param manager Entry point to AvsManager. */ public static void clustersDelete(com.azure.resourcemanager.avs.AvsManager manager) { @@ -532,14 +560,17 @@ public final class ClustersDeleteSamples { ### Clusters_Get ```java -/** Samples for Clusters Get. */ +/** + * Samples for Clusters Get. + */ public final class ClustersGetSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/Clusters_Get.json + * x-ms-original-file: + * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/Clusters_Get.json */ /** * Sample code: Clusters_Get. - * + * * @param manager Entry point to AvsManager. */ public static void clustersGet(com.azure.resourcemanager.avs.AvsManager manager) { @@ -551,14 +582,17 @@ public final class ClustersGetSamples { ### Clusters_List ```java -/** Samples for Clusters List. */ +/** + * Samples for Clusters List. + */ public final class ClustersListSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/Clusters_List.json + * x-ms-original-file: + * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/Clusters_List.json */ /** * Sample code: Clusters_List. - * + * * @param manager Entry point to AvsManager. */ public static void clustersList(com.azure.resourcemanager.avs.AvsManager manager) { @@ -570,29 +604,33 @@ public final class ClustersListSamples { ### Clusters_ListZones ```java -/** Samples for Clusters ListZones. */ +/** + * Samples for Clusters ListZones. + */ public final class ClustersListZonesSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/Clusters_ListZones_Stretched.json + * x-ms-original-file: + * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/Clusters_ListZones.json */ /** - * Sample code: Clusters_ListZoneData_Stretched. - * + * Sample code: Clusters_ListZones. + * * @param manager Entry point to AvsManager. */ - public static void clustersListZoneDataStretched(com.azure.resourcemanager.avs.AvsManager manager) { + public static void clustersListZones(com.azure.resourcemanager.avs.AvsManager manager) { manager.clusters().listZonesWithResponse("group1", "cloud1", "cluster1", com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/Clusters_ListZones.json + * x-ms-original-file: + * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/Clusters_ListZones_Stretched.json */ /** - * Sample code: Clusters_ListZoneData. - * + * Sample code: Clusters_ListZones_Stretched. + * * @param manager Entry point to AvsManager. */ - public static void clustersListZoneData(com.azure.resourcemanager.avs.AvsManager manager) { + public static void clustersListZonesStretched(com.azure.resourcemanager.avs.AvsManager manager) { manager.clusters().listZonesWithResponse("group1", "cloud1", "cluster1", com.azure.core.util.Context.NONE); } } @@ -603,22 +641,22 @@ public final class ClustersListZonesSamples { ```java import com.azure.resourcemanager.avs.models.Cluster; -/** Samples for Clusters Update. */ +/** + * Samples for Clusters Update. + */ public final class ClustersUpdateSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/Clusters_Update.json + * x-ms-original-file: + * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/Clusters_Update.json */ /** * Sample code: Clusters_Update. - * + * * @param manager Entry point to AvsManager. */ public static void clustersUpdate(com.azure.resourcemanager.avs.AvsManager manager) { - Cluster resource = - manager - .clusters() - .getWithResponse("group1", "cloud1", "cluster1", com.azure.core.util.Context.NONE) - .getValue(); + Cluster resource = manager.clusters() + .getWithResponse("group1", "cloud1", "cluster1", com.azure.core.util.Context.NONE).getValue(); resource.update().withClusterSize(4).apply(); } } @@ -629,25 +667,23 @@ public final class ClustersUpdateSamples { ```java import com.azure.resourcemanager.avs.models.NetAppVolume; -/** Samples for Datastores CreateOrUpdate. */ +/** + * Samples for Datastores CreateOrUpdate. + */ public final class DatastoresCreateOrUpdateSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/Datastores_CreateOrUpdate.json + * x-ms-original-file: + * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/Datastores_CreateOrUpdate.json */ /** * Sample code: Datastores_CreateOrUpdate. - * + * * @param manager Entry point to AvsManager. */ public static void datastoresCreateOrUpdate(com.azure.resourcemanager.avs.AvsManager manager) { - manager - .datastores() - .define("datastore1") - .withExistingCluster("group1", "cloud1", "cluster1") - .withNetAppVolume( - new NetAppVolume() - .withId( - "/subscriptions/11111111-1111-1111-1111-111111111111/resourceGroups/ResourceGroup1/providers/Microsoft.NetApp/netAppAccounts/NetAppAccount1/capacityPools/CapacityPool1/volumes/NFSVol1")) + manager.datastores().define("datastore1").withExistingCluster("group1", "cloud1", "cluster1") + .withNetAppVolume(new NetAppVolume().withId( + "/subscriptions/11111111-1111-1111-1111-111111111111/resourceGroups/ResourceGroup1/providers/Microsoft.NetApp/netAppAccounts/NetAppAccount1/capacityPools/CapacityPool1/volumes/NFSVol1")) .create(); } } @@ -656,14 +692,17 @@ public final class DatastoresCreateOrUpdateSamples { ### Datastores_Delete ```java -/** Samples for Datastores Delete. */ +/** + * Samples for Datastores Delete. + */ public final class DatastoresDeleteSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/Datastores_Delete.json + * x-ms-original-file: + * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/Datastores_Delete.json */ /** * Sample code: Datastores_Delete. - * + * * @param manager Entry point to AvsManager. */ public static void datastoresDelete(com.azure.resourcemanager.avs.AvsManager manager) { @@ -675,20 +714,22 @@ public final class DatastoresDeleteSamples { ### Datastores_Get ```java -/** Samples for Datastores Get. */ +/** + * Samples for Datastores Get. + */ public final class DatastoresGetSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/Datastores_Get.json + * x-ms-original-file: + * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/Datastores_Get.json */ /** * Sample code: Datastores_Get. - * + * * @param manager Entry point to AvsManager. */ public static void datastoresGet(com.azure.resourcemanager.avs.AvsManager manager) { - manager - .datastores() - .getWithResponse("group1", "cloud1", "cluster1", "datastore1", com.azure.core.util.Context.NONE); + manager.datastores().getWithResponse("group1", "cloud1", "cluster1", "datastore1", + com.azure.core.util.Context.NONE); } } ``` @@ -696,14 +737,17 @@ public final class DatastoresGetSamples { ### Datastores_List ```java -/** Samples for Datastores List. */ +/** + * Samples for Datastores List. + */ public final class DatastoresListSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/Datastores_List.json + * x-ms-original-file: + * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/Datastores_List.json */ /** * Sample code: Datastores_List. - * + * * @param manager Entry point to AvsManager. */ public static void datastoresList(com.azure.resourcemanager.avs.AvsManager manager) { @@ -715,21 +759,21 @@ public final class DatastoresListSamples { ### GlobalReachConnections_CreateOrUpdate ```java -/** Samples for GlobalReachConnections CreateOrUpdate. */ +/** + * Samples for GlobalReachConnections CreateOrUpdate. + */ public final class GlobalReachConnectionsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/GlobalReachConnections_CreateOrUpdate.json + * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/ + * GlobalReachConnections_CreateOrUpdate.json */ /** * Sample code: GlobalReachConnections_CreateOrUpdate. - * + * * @param manager Entry point to AvsManager. */ public static void globalReachConnectionsCreateOrUpdate(com.azure.resourcemanager.avs.AvsManager manager) { - manager - .globalReachConnections() - .define("connection1") - .withExistingPrivateCloud("group1", "cloud1") + manager.globalReachConnections().define("connection1").withExistingPrivateCloud("group1", "cloud1") .withAuthorizationKey("01010101-0101-0101-0101-010101010101") .withPeerExpressRouteCircuit( "/subscriptions/12341234-1234-1234-1234-123412341234/resourceGroups/mygroup/providers/Microsoft.Network/expressRouteCircuits/mypeer") @@ -741,14 +785,17 @@ public final class GlobalReachConnectionsCreateOrUpdateSamples { ### GlobalReachConnections_Delete ```java -/** Samples for GlobalReachConnections Delete. */ +/** + * Samples for GlobalReachConnections Delete. + */ public final class GlobalReachConnectionsDeleteSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/GlobalReachConnections_Delete.json + * x-ms-original-file: + * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/GlobalReachConnections_Delete.json */ /** * Sample code: GlobalReachConnections_Delete. - * + * * @param manager Entry point to AvsManager. */ public static void globalReachConnectionsDelete(com.azure.resourcemanager.avs.AvsManager manager) { @@ -760,20 +807,22 @@ public final class GlobalReachConnectionsDeleteSamples { ### GlobalReachConnections_Get ```java -/** Samples for GlobalReachConnections Get. */ +/** + * Samples for GlobalReachConnections Get. + */ public final class GlobalReachConnectionsGetSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/GlobalReachConnections_Get.json + * x-ms-original-file: + * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/GlobalReachConnections_Get.json */ /** * Sample code: GlobalReachConnections_Get. - * + * * @param manager Entry point to AvsManager. */ public static void globalReachConnectionsGet(com.azure.resourcemanager.avs.AvsManager manager) { - manager - .globalReachConnections() - .getWithResponse("group1", "cloud1", "connection1", com.azure.core.util.Context.NONE); + manager.globalReachConnections().getWithResponse("group1", "cloud1", "connection1", + com.azure.core.util.Context.NONE); } } ``` @@ -781,14 +830,17 @@ public final class GlobalReachConnectionsGetSamples { ### GlobalReachConnections_List ```java -/** Samples for GlobalReachConnections List. */ +/** + * Samples for GlobalReachConnections List. + */ public final class GlobalReachConnectionsListSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/GlobalReachConnections_List.json + * x-ms-original-file: + * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/GlobalReachConnections_List.json */ /** * Sample code: GlobalReachConnections_List. - * + * * @param manager Entry point to AvsManager. */ public static void globalReachConnectionsList(com.azure.resourcemanager.avs.AvsManager manager) { @@ -800,14 +852,18 @@ public final class GlobalReachConnectionsListSamples { ### HcxEnterpriseSites_CreateOrUpdate ```java -/** Samples for HcxEnterpriseSites CreateOrUpdate. */ +/** + * Samples for HcxEnterpriseSites CreateOrUpdate. + */ public final class HcxEnterpriseSitesCreateOrUpdateSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/HcxEnterpriseSites_CreateOrUpdate.json + * x-ms-original-file: + * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/HcxEnterpriseSites_CreateOrUpdate. + * json */ /** * Sample code: HcxEnterpriseSites_CreateOrUpdate. - * + * * @param manager Entry point to AvsManager. */ public static void hcxEnterpriseSitesCreateOrUpdate(com.azure.resourcemanager.avs.AvsManager manager) { @@ -819,14 +875,17 @@ public final class HcxEnterpriseSitesCreateOrUpdateSamples { ### HcxEnterpriseSites_Delete ```java -/** Samples for HcxEnterpriseSites Delete. */ +/** + * Samples for HcxEnterpriseSites Delete. + */ public final class HcxEnterpriseSitesDeleteSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/HcxEnterpriseSites_Delete.json + * x-ms-original-file: + * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/HcxEnterpriseSites_Delete.json */ /** * Sample code: HcxEnterpriseSites_Delete. - * + * * @param manager Entry point to AvsManager. */ public static void hcxEnterpriseSitesDelete(com.azure.resourcemanager.avs.AvsManager manager) { @@ -838,14 +897,17 @@ public final class HcxEnterpriseSitesDeleteSamples { ### HcxEnterpriseSites_Get ```java -/** Samples for HcxEnterpriseSites Get. */ +/** + * Samples for HcxEnterpriseSites Get. + */ public final class HcxEnterpriseSitesGetSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/HcxEnterpriseSites_Get.json + * x-ms-original-file: + * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/HcxEnterpriseSites_Get.json */ /** * Sample code: HcxEnterpriseSites_Get. - * + * * @param manager Entry point to AvsManager. */ public static void hcxEnterpriseSitesGet(com.azure.resourcemanager.avs.AvsManager manager) { @@ -857,14 +919,17 @@ public final class HcxEnterpriseSitesGetSamples { ### HcxEnterpriseSites_List ```java -/** Samples for HcxEnterpriseSites List. */ +/** + * Samples for HcxEnterpriseSites List. + */ public final class HcxEnterpriseSitesListSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/HcxEnterpriseSites_List.json + * x-ms-original-file: + * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/HcxEnterpriseSites_List.json */ /** * Sample code: HcxEnterpriseSites_List. - * + * * @param manager Entry point to AvsManager. */ public static void hcxEnterpriseSitesList(com.azure.resourcemanager.avs.AvsManager manager) { @@ -873,17 +938,112 @@ public final class HcxEnterpriseSitesListSamples { } ``` +### IscsiPaths_CreateOrUpdate + +```java +import com.azure.resourcemanager.avs.fluent.models.IscsiPathInner; + +/** + * Samples for IscsiPaths CreateOrUpdate. + */ +public final class IscsiPathsCreateOrUpdateSamples { + /* + * x-ms-original-file: + * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/IscsiPaths_CreateOrUpdate.json + */ + /** + * Sample code: IscsiPaths_CreateOrUpdate. + * + * @param manager Entry point to AvsManager. + */ + public static void iscsiPathsCreateOrUpdate(com.azure.resourcemanager.avs.AvsManager manager) { + manager.iscsiPaths().createOrUpdate("group1", "cloud1", new IscsiPathInner().withNetworkBlock("192.168.0.0/24"), + com.azure.core.util.Context.NONE); + } +} +``` + +### IscsiPaths_Delete + +```java +/** + * Samples for IscsiPaths Delete. + */ +public final class IscsiPathsDeleteSamples { + /* + * x-ms-original-file: + * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/IscsiPaths_Delete.json + */ + /** + * Sample code: IscsiPaths_Delete. + * + * @param manager Entry point to AvsManager. + */ + public static void iscsiPathsDelete(com.azure.resourcemanager.avs.AvsManager manager) { + manager.iscsiPaths().delete("group1", "cloud1", com.azure.core.util.Context.NONE); + } +} +``` + +### IscsiPaths_Get + +```java +/** + * Samples for IscsiPaths Get. + */ +public final class IscsiPathsGetSamples { + /* + * x-ms-original-file: + * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/IscsiPaths_Get.json + */ + /** + * Sample code: IscsiPaths_Get. + * + * @param manager Entry point to AvsManager. + */ + public static void iscsiPathsGet(com.azure.resourcemanager.avs.AvsManager manager) { + manager.iscsiPaths().getWithResponse("group1", "cloud1", com.azure.core.util.Context.NONE); + } +} +``` + +### IscsiPaths_ListByPrivateCloud + +```java +/** + * Samples for IscsiPaths ListByPrivateCloud. + */ +public final class IscsiPathsListByPrivateCloudSamples { + /* + * x-ms-original-file: + * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/IscsiPaths_List.json + */ + /** + * Sample code: IscsiPaths_ListByPrivateCloud. + * + * @param manager Entry point to AvsManager. + */ + public static void iscsiPathsListByPrivateCloud(com.azure.resourcemanager.avs.AvsManager manager) { + manager.iscsiPaths().listByPrivateCloud("group1", "cloud1", com.azure.core.util.Context.NONE); + } +} +``` + ### Locations_CheckQuotaAvailability ```java -/** Samples for Locations CheckQuotaAvailability. */ +/** + * Samples for Locations CheckQuotaAvailability. + */ public final class LocationsCheckQuotaAvailabilitySamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/Locations_CheckQuotaAvailability.json + * x-ms-original-file: + * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/Locations_CheckQuotaAvailability. + * json */ /** * Sample code: Locations_CheckQuotaAvailability. - * + * * @param manager Entry point to AvsManager. */ public static void locationsCheckQuotaAvailability(com.azure.resourcemanager.avs.AvsManager manager) { @@ -897,14 +1057,18 @@ public final class LocationsCheckQuotaAvailabilitySamples { ```java import com.azure.resourcemanager.avs.models.Sku; -/** Samples for Locations CheckTrialAvailability. */ +/** + * Samples for Locations CheckTrialAvailability. + */ public final class LocationsCheckTrialAvailabilitySamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/Locations_CheckTrialAvailability.json + * x-ms-original-file: + * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/Locations_CheckTrialAvailability. + * json */ /** * Sample code: Locations_CheckTrialAvailability. - * + * * @param manager Entry point to AvsManager. */ public static void locationsCheckTrialAvailability(com.azure.resourcemanager.avs.AvsManager manager) { @@ -912,18 +1076,17 @@ public final class LocationsCheckTrialAvailabilitySamples { } /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/Locations_CheckTrialAvailabilityWithSku.json + * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/ + * Locations_CheckTrialAvailabilityWithSku.json */ /** * Sample code: Locations_CheckTrialAvailabilityWithSku. - * + * * @param manager Entry point to AvsManager. */ public static void locationsCheckTrialAvailabilityWithSku(com.azure.resourcemanager.avs.AvsManager manager) { - manager - .locations() - .checkTrialAvailabilityWithResponse( - "eastus", new Sku().withName("avs52t"), com.azure.core.util.Context.NONE); + manager.locations().checkTrialAvailabilityWithResponse("eastus", new Sku().withName("avs52t"), + com.azure.core.util.Context.NONE); } } ``` @@ -931,14 +1094,17 @@ public final class LocationsCheckTrialAvailabilitySamples { ### Operations_List ```java -/** Samples for Operations List. */ +/** + * Samples for Operations List. + */ public final class OperationsListSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/Operations_List.json + * x-ms-original-file: + * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/Operations_List.json */ /** * Sample code: Operations_List. - * + * * @param manager Entry point to AvsManager. */ public static void operationsList(com.azure.resourcemanager.avs.AvsManager manager) { @@ -956,37 +1122,29 @@ import com.azure.resourcemanager.avs.models.AzureHybridBenefitType; import com.azure.resourcemanager.avs.models.VmHostPlacementPolicyProperties; import java.util.Arrays; -/** Samples for PlacementPolicies CreateOrUpdate. */ +/** + * Samples for PlacementPolicies CreateOrUpdate. + */ public final class PlacementPoliciesCreateOrUpdateSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/PlacementPolicies_CreateOrUpdate.json + * x-ms-original-file: + * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/PlacementPolicies_CreateOrUpdate. + * json */ /** * Sample code: PlacementPolicies_CreateOrUpdate. - * + * * @param manager Entry point to AvsManager. */ public static void placementPoliciesCreateOrUpdate(com.azure.resourcemanager.avs.AvsManager manager) { - manager - .placementPolicies() - .define("policy1") - .withExistingCluster("group1", "cloud1", "cluster1") - .withProperties( - new VmHostPlacementPolicyProperties() - .withVmMembers( - Arrays - .asList( - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.AVS/privateClouds/cloud1/clusters/cluster1/virtualMachines/vm-128", - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.AVS/privateClouds/cloud1/clusters/cluster1/virtualMachines/vm-256")) - .withHostMembers( - Arrays - .asList( - "fakehost22.nyc1.kubernetes.center", - "fakehost23.nyc1.kubernetes.center", - "fakehost24.nyc1.kubernetes.center")) - .withAffinityType(AffinityType.ANTI_AFFINITY) - .withAffinityStrength(AffinityStrength.MUST) - .withAzureHybridBenefitType(AzureHybridBenefitType.SQL_HOST)) + manager.placementPolicies().define("policy1").withExistingCluster("group1", "cloud1", "cluster1") + .withProperties(new VmHostPlacementPolicyProperties().withVmMembers(Arrays.asList( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.AVS/privateClouds/cloud1/clusters/cluster1/virtualMachines/vm-128", + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.AVS/privateClouds/cloud1/clusters/cluster1/virtualMachines/vm-256")) + .withHostMembers(Arrays.asList("fakehost22.nyc1.kubernetes.center", "fakehost23.nyc1.kubernetes.center", + "fakehost24.nyc1.kubernetes.center")) + .withAffinityType(AffinityType.ANTI_AFFINITY).withAffinityStrength(AffinityStrength.MUST) + .withAzureHybridBenefitType(AzureHybridBenefitType.SQL_HOST)) .create(); } } @@ -995,14 +1153,17 @@ public final class PlacementPoliciesCreateOrUpdateSamples { ### PlacementPolicies_Delete ```java -/** Samples for PlacementPolicies Delete. */ +/** + * Samples for PlacementPolicies Delete. + */ public final class PlacementPoliciesDeleteSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/PlacementPolicies_Delete.json + * x-ms-original-file: + * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/PlacementPolicies_Delete.json */ /** * Sample code: PlacementPolicies_Delete. - * + * * @param manager Entry point to AvsManager. */ public static void placementPoliciesDelete(com.azure.resourcemanager.avs.AvsManager manager) { @@ -1014,20 +1175,22 @@ public final class PlacementPoliciesDeleteSamples { ### PlacementPolicies_Get ```java -/** Samples for PlacementPolicies Get. */ +/** + * Samples for PlacementPolicies Get. + */ public final class PlacementPoliciesGetSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/PlacementPolicies_Get.json + * x-ms-original-file: + * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/PlacementPolicies_Get.json */ /** * Sample code: PlacementPolicies_Get. - * + * * @param manager Entry point to AvsManager. */ public static void placementPoliciesGet(com.azure.resourcemanager.avs.AvsManager manager) { - manager - .placementPolicies() - .getWithResponse("group1", "cloud1", "cluster1", "policy1", com.azure.core.util.Context.NONE); + manager.placementPolicies().getWithResponse("group1", "cloud1", "cluster1", "policy1", + com.azure.core.util.Context.NONE); } } ``` @@ -1035,14 +1198,17 @@ public final class PlacementPoliciesGetSamples { ### PlacementPolicies_List ```java -/** Samples for PlacementPolicies List. */ +/** + * Samples for PlacementPolicies List. + */ public final class PlacementPoliciesListSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/PlacementPolicies_List.json + * x-ms-original-file: + * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/PlacementPolicies_List.json */ /** * Sample code: PlacementPolicies_List. - * + * * @param manager Entry point to AvsManager. */ public static void placementPoliciesList(com.azure.resourcemanager.avs.AvsManager manager) { @@ -1060,38 +1226,28 @@ import com.azure.resourcemanager.avs.models.PlacementPolicy; import com.azure.resourcemanager.avs.models.PlacementPolicyState; import java.util.Arrays; -/** Samples for PlacementPolicies Update. */ +/** + * Samples for PlacementPolicies Update. + */ public final class PlacementPoliciesUpdateSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/PlacementPolicies_Update.json + * x-ms-original-file: + * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/PlacementPolicies_Update.json */ /** * Sample code: PlacementPolicies_Update. - * + * * @param manager Entry point to AvsManager. */ public static void placementPoliciesUpdate(com.azure.resourcemanager.avs.AvsManager manager) { - PlacementPolicy resource = - manager - .placementPolicies() - .getWithResponse("group1", "cloud1", "cluster1", "policy1", com.azure.core.util.Context.NONE) - .getValue(); - resource - .update() - .withState(PlacementPolicyState.DISABLED) - .withVmMembers( - Arrays - .asList( - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.AVS/privateClouds/cloud1/clusters/cluster1/virtualMachines/vm-128", - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.AVS/privateClouds/cloud1/clusters/cluster1/virtualMachines/vm-256")) - .withHostMembers( - Arrays - .asList( - "fakehost22.nyc1.kubernetes.center", - "fakehost23.nyc1.kubernetes.center", - "fakehost24.nyc1.kubernetes.center")) - .withAffinityStrength(AffinityStrength.MUST) - .withAzureHybridBenefitType(AzureHybridBenefitType.SQL_HOST) + PlacementPolicy resource = manager.placementPolicies() + .getWithResponse("group1", "cloud1", "cluster1", "policy1", com.azure.core.util.Context.NONE).getValue(); + resource.update().withState(PlacementPolicyState.DISABLED).withVmMembers(Arrays.asList( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.AVS/privateClouds/cloud1/clusters/cluster1/virtualMachines/vm-128", + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.AVS/privateClouds/cloud1/clusters/cluster1/virtualMachines/vm-256")) + .withHostMembers(Arrays.asList("fakehost22.nyc1.kubernetes.center", "fakehost23.nyc1.kubernetes.center", + "fakehost24.nyc1.kubernetes.center")) + .withAffinityStrength(AffinityStrength.MUST).withAzureHybridBenefitType(AzureHybridBenefitType.SQL_HOST) .apply(); } } @@ -1103,60 +1259,50 @@ public final class PlacementPoliciesUpdateSamples { import com.azure.resourcemanager.avs.models.AvailabilityProperties; import com.azure.resourcemanager.avs.models.AvailabilityStrategy; import com.azure.resourcemanager.avs.models.ManagementCluster; -import com.azure.resourcemanager.avs.models.PrivateCloudIdentity; -import com.azure.resourcemanager.avs.models.ResourceIdentityType; import com.azure.resourcemanager.avs.models.Sku; +import com.azure.resourcemanager.avs.models.SystemAssignedServiceIdentity; +import com.azure.resourcemanager.avs.models.SystemAssignedServiceIdentityType; import java.util.HashMap; import java.util.Map; -/** Samples for PrivateClouds CreateOrUpdate. */ +/** + * Samples for PrivateClouds CreateOrUpdate. + */ public final class PrivateCloudsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/PrivateClouds_CreateOrUpdate.json + * x-ms-original-file: + * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/PrivateClouds_CreateOrUpdate.json */ /** * Sample code: PrivateClouds_CreateOrUpdate. - * + * * @param manager Entry point to AvsManager. */ public static void privateCloudsCreateOrUpdate(com.azure.resourcemanager.avs.AvsManager manager) { - manager - .privateClouds() - .define("cloud1") - .withRegion("eastus2") - .withExistingResourceGroup("group1") - .withSku(new Sku().withName("AV36")) - .withTags(mapOf()) - .withIdentity(new PrivateCloudIdentity().withType(ResourceIdentityType.SYSTEM_ASSIGNED)) - .withNetworkBlock("192.168.48.0/22") - .withManagementCluster(new ManagementCluster().withClusterSize(4)) + manager.privateClouds().define("cloud1").withRegion("eastus2").withExistingResourceGroup("group1") + .withSku(new Sku().withName("AV36")).withTags(mapOf()) + .withIdentity( + new SystemAssignedServiceIdentity().withType(SystemAssignedServiceIdentityType.SYSTEM_ASSIGNED)) + .withManagementCluster(new ManagementCluster().withClusterSize(4)).withNetworkBlock("192.168.48.0/22") .create(); } /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/PrivateClouds_CreateOrUpdate_Stretched.json + * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/ + * PrivateClouds_CreateOrUpdate_Stretched.json */ /** * Sample code: PrivateClouds_CreateOrUpdate_Stretched. - * + * * @param manager Entry point to AvsManager. */ public static void privateCloudsCreateOrUpdateStretched(com.azure.resourcemanager.avs.AvsManager manager) { - manager - .privateClouds() - .define("cloud1") - .withRegion("eastus2") - .withExistingResourceGroup("group1") - .withSku(new Sku().withName("AV36")) - .withTags(mapOf()) - .withNetworkBlock("192.168.48.0/22") + manager.privateClouds().define("cloud1").withRegion("eastus2").withExistingResourceGroup("group1") + .withSku(new Sku().withName("AV36")).withTags(mapOf()) .withManagementCluster(new ManagementCluster().withClusterSize(4)) - .withAvailability( - new AvailabilityProperties() - .withStrategy(AvailabilityStrategy.DUAL_ZONE) - .withZone(1) - .withSecondaryZone(2)) - .create(); + .withAvailability(new AvailabilityProperties().withStrategy(AvailabilityStrategy.DUAL_ZONE).withZone(1) + .withSecondaryZone(2)) + .withNetworkBlock("192.168.48.0/22").create(); } // Use "Map.of" if available @@ -1176,14 +1322,17 @@ public final class PrivateCloudsCreateOrUpdateSamples { ### PrivateClouds_Delete ```java -/** Samples for PrivateClouds Delete. */ +/** + * Samples for PrivateClouds Delete. + */ public final class PrivateCloudsDeleteSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/PrivateClouds_Delete.json + * x-ms-original-file: + * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/PrivateClouds_Delete.json */ /** * Sample code: PrivateClouds_Delete. - * + * * @param manager Entry point to AvsManager. */ public static void privateCloudsDelete(com.azure.resourcemanager.avs.AvsManager manager) { @@ -1195,14 +1344,17 @@ public final class PrivateCloudsDeleteSamples { ### PrivateClouds_GetByResourceGroup ```java -/** Samples for PrivateClouds GetByResourceGroup. */ +/** + * Samples for PrivateClouds GetByResourceGroup. + */ public final class PrivateCloudsGetByResourceGroupSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/PrivateClouds_Get.json + * x-ms-original-file: + * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/PrivateClouds_Get.json */ /** * Sample code: PrivateClouds_Get. - * + * * @param manager Entry point to AvsManager. */ public static void privateCloudsGet(com.azure.resourcemanager.avs.AvsManager manager) { @@ -1210,11 +1362,12 @@ public final class PrivateCloudsGetByResourceGroupSamples { } /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/PrivateClouds_Get_Stretched.json + * x-ms-original-file: + * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/PrivateClouds_Get_Stretched.json */ /** * Sample code: PrivateClouds_Get_Stretched. - * + * * @param manager Entry point to AvsManager. */ public static void privateCloudsGetStretched(com.azure.resourcemanager.avs.AvsManager manager) { @@ -1226,14 +1379,18 @@ public final class PrivateCloudsGetByResourceGroupSamples { ### PrivateClouds_List ```java -/** Samples for PrivateClouds List. */ +/** + * Samples for PrivateClouds List. + */ public final class PrivateCloudsListSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/PrivateClouds_ListInSubscription.json + * x-ms-original-file: + * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/PrivateClouds_ListInSubscription. + * json */ /** * Sample code: PrivateClouds_ListInSubscription. - * + * * @param manager Entry point to AvsManager. */ public static void privateCloudsListInSubscription(com.azure.resourcemanager.avs.AvsManager manager) { @@ -1241,11 +1398,12 @@ public final class PrivateCloudsListSamples { } /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/PrivateClouds_ListInSubscription_Stretched.json + * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/ + * PrivateClouds_ListInSubscription_Stretched.json */ /** * Sample code: PrivateClouds_ListInSubscription_Stretched. - * + * * @param manager Entry point to AvsManager. */ public static void privateCloudsListInSubscriptionStretched(com.azure.resourcemanager.avs.AvsManager manager) { @@ -1257,14 +1415,18 @@ public final class PrivateCloudsListSamples { ### PrivateClouds_ListAdminCredentials ```java -/** Samples for PrivateClouds ListAdminCredentials. */ +/** + * Samples for PrivateClouds ListAdminCredentials. + */ public final class PrivateCloudsListAdminCredentialsSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/PrivateClouds_ListAdminCredentials.json + * x-ms-original-file: + * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/PrivateClouds_ListAdminCredentials + * .json */ /** * Sample code: PrivateClouds_ListAdminCredentials. - * + * * @param manager Entry point to AvsManager. */ public static void privateCloudsListAdminCredentials(com.azure.resourcemanager.avs.AvsManager manager) { @@ -1276,14 +1438,17 @@ public final class PrivateCloudsListAdminCredentialsSamples { ### PrivateClouds_ListByResourceGroup ```java -/** Samples for PrivateClouds ListByResourceGroup. */ +/** + * Samples for PrivateClouds ListByResourceGroup. + */ public final class PrivateCloudsListByResourceGroupSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/PrivateClouds_List.json + * x-ms-original-file: + * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/PrivateClouds_List.json */ /** * Sample code: PrivateClouds_List. - * + * * @param manager Entry point to AvsManager. */ public static void privateCloudsList(com.azure.resourcemanager.avs.AvsManager manager) { @@ -1291,11 +1456,12 @@ public final class PrivateCloudsListByResourceGroupSamples { } /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/PrivateClouds_List_Stretched.json + * x-ms-original-file: + * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/PrivateClouds_List_Stretched.json */ /** * Sample code: PrivateClouds_List_Stretched. - * + * * @param manager Entry point to AvsManager. */ public static void privateCloudsListStretched(com.azure.resourcemanager.avs.AvsManager manager) { @@ -1307,14 +1473,18 @@ public final class PrivateCloudsListByResourceGroupSamples { ### PrivateClouds_RotateNsxtPassword ```java -/** Samples for PrivateClouds RotateNsxtPassword. */ +/** + * Samples for PrivateClouds RotateNsxtPassword. + */ public final class PrivateCloudsRotateNsxtPasswordSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/PrivateClouds_RotateNsxtPassword.json + * x-ms-original-file: + * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/PrivateClouds_RotateNsxtPassword. + * json */ /** * Sample code: PrivateClouds_RotateNsxtPassword. - * + * * @param manager Entry point to AvsManager. */ public static void privateCloudsRotateNsxtPassword(com.azure.resourcemanager.avs.AvsManager manager) { @@ -1326,14 +1496,17 @@ public final class PrivateCloudsRotateNsxtPasswordSamples { ### PrivateClouds_RotateVcenterPassword ```java -/** Samples for PrivateClouds RotateVcenterPassword. */ +/** + * Samples for PrivateClouds RotateVcenterPassword. + */ public final class PrivateCloudsRotateVcenterPasswordSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/PrivateClouds_RotateVcenterPassword.json + * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/ + * PrivateClouds_RotateVcenterPassword.json */ /** * Sample code: PrivateClouds_RotateVcenterPassword. - * + * * @param manager Entry point to AvsManager. */ public static void privateCloudsRotateVcenterPassword(com.azure.resourcemanager.avs.AvsManager manager) { @@ -1350,54 +1523,47 @@ import com.azure.resourcemanager.avs.models.EncryptionKeyVaultProperties; import com.azure.resourcemanager.avs.models.EncryptionState; import com.azure.resourcemanager.avs.models.ManagementCluster; import com.azure.resourcemanager.avs.models.PrivateCloud; -import com.azure.resourcemanager.avs.models.PrivateCloudIdentity; -import com.azure.resourcemanager.avs.models.ResourceIdentityType; +import com.azure.resourcemanager.avs.models.SystemAssignedServiceIdentity; +import com.azure.resourcemanager.avs.models.SystemAssignedServiceIdentityType; -/** Samples for PrivateClouds Update. */ +/** + * Samples for PrivateClouds Update. + */ public final class PrivateCloudsUpdateSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/PrivateClouds_Update.json + * x-ms-original-file: + * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/PrivateClouds_Update.json */ /** * Sample code: PrivateClouds_Update. - * + * * @param manager Entry point to AvsManager. */ public static void privateCloudsUpdate(com.azure.resourcemanager.avs.AvsManager manager) { - PrivateCloud resource = - manager - .privateClouds() - .getByResourceGroupWithResponse("group1", "cloud1", com.azure.core.util.Context.NONE) - .getValue(); - resource - .update() - .withIdentity(new PrivateCloudIdentity().withType(ResourceIdentityType.NONE)) + PrivateCloud resource = manager.privateClouds() + .getByResourceGroupWithResponse("group1", "cloud1", com.azure.core.util.Context.NONE).getValue(); + resource.update() + .withIdentity(new SystemAssignedServiceIdentity().withType(SystemAssignedServiceIdentityType.NONE)) .withManagementCluster(new ManagementCluster().withClusterSize(4)) - .withEncryption( - new Encryption() - .withStatus(EncryptionState.ENABLED) - .withKeyVaultProperties( - new EncryptionKeyVaultProperties() - .withKeyName("fakeTokenPlaceholder") - .withKeyVersion("fakeTokenPlaceholder") - .withKeyVaultUrl("fakeTokenPlaceholder"))) + .withEncryption(new Encryption().withStatus(EncryptionState.ENABLED) + .withKeyVaultProperties(new EncryptionKeyVaultProperties().withKeyName("fakeTokenPlaceholder") + .withKeyVersion("fakeTokenPlaceholder").withKeyVaultUrl("fakeTokenPlaceholder"))) .apply(); } /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/PrivateClouds_Update_Stretched.json + * x-ms-original-file: + * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/PrivateClouds_Update_Stretched. + * json */ /** * Sample code: PrivateClouds_Update_Stretched. - * + * * @param manager Entry point to AvsManager. */ public static void privateCloudsUpdateStretched(com.azure.resourcemanager.avs.AvsManager manager) { - PrivateCloud resource = - manager - .privateClouds() - .getByResourceGroupWithResponse("group1", "cloud1", com.azure.core.util.Context.NONE) - .getValue(); + PrivateCloud resource = manager.privateClouds() + .getByResourceGroupWithResponse("group1", "cloud1", com.azure.core.util.Context.NONE).getValue(); resource.update().withManagementCluster(new ManagementCluster().withClusterSize(4)).apply(); } } @@ -1406,21 +1572,22 @@ public final class PrivateCloudsUpdateSamples { ### ScriptCmdlets_Get ```java -/** Samples for ScriptCmdlets Get. */ +/** + * Samples for ScriptCmdlets Get. + */ public final class ScriptCmdletsGetSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/ScriptCmdlets_Get.json + * x-ms-original-file: + * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/ScriptCmdlets_Get.json */ /** * Sample code: ScriptCmdlets_Get. - * + * * @param manager Entry point to AvsManager. */ public static void scriptCmdletsGet(com.azure.resourcemanager.avs.AvsManager manager) { - manager - .scriptCmdlets() - .getWithResponse( - "group1", "cloud1", "package@1.0.2", "New-ExternalSsoDomain", com.azure.core.util.Context.NONE); + manager.scriptCmdlets().getWithResponse("group1", "cloud1", "package@1.0.2", "New-ExternalSsoDomain", + com.azure.core.util.Context.NONE); } } ``` @@ -1428,14 +1595,17 @@ public final class ScriptCmdletsGetSamples { ### ScriptCmdlets_List ```java -/** Samples for ScriptCmdlets List. */ +/** + * Samples for ScriptCmdlets List. + */ public final class ScriptCmdletsListSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/ScriptCmdlets_List.json + * x-ms-original-file: + * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/ScriptCmdlets_List.json */ /** * Sample code: ScriptCmdlets_List. - * + * * @param manager Entry point to AvsManager. */ public static void scriptCmdletsList(com.azure.resourcemanager.avs.AvsManager manager) { @@ -1451,41 +1621,31 @@ import com.azure.resourcemanager.avs.models.ScriptSecureStringExecutionParameter import com.azure.resourcemanager.avs.models.ScriptStringExecutionParameter; import java.util.Arrays; -/** Samples for ScriptExecutions CreateOrUpdate. */ +/** + * Samples for ScriptExecutions CreateOrUpdate. + */ public final class ScriptExecutionsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/ScriptExecutions_CreateOrUpdate.json + * x-ms-original-file: + * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/ScriptExecutions_CreateOrUpdate. + * json */ /** * Sample code: ScriptExecutions_CreateOrUpdate. - * + * * @param manager Entry point to AvsManager. */ public static void scriptExecutionsCreateOrUpdate(com.azure.resourcemanager.avs.AvsManager manager) { - manager - .scriptExecutions() - .define("addSsoServer") - .withExistingPrivateCloud("group1", "cloud1") + manager.scriptExecutions().define("addSsoServer").withExistingPrivateCloud("group1", "cloud1") .withScriptCmdletId( "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.AVS/privateClouds/cloud1/scriptPackages/AVS.PowerCommands@1.0.0/scriptCmdlets/New-SsoExternalIdentitySource") - .withParameters( - Arrays - .asList( - new ScriptStringExecutionParameter() - .withName("DomainName") - .withValue("placeholderDomain.local"), - new ScriptStringExecutionParameter() - .withName("BaseUserDN") - .withValue("DC=placeholder, DC=placeholder"))) - .withHiddenParameters( - Arrays - .asList( - new ScriptSecureStringExecutionParameter() - .withName("Password") - .withSecureValue("PlaceholderPassword"))) - .withTimeout("P0Y0M0DT0H60M60S") - .withRetention("P0Y0M60DT0H60M60S") - .create(); + .withParameters(Arrays.asList( + new ScriptStringExecutionParameter().withName("DomainName").withValue("placeholderDomain.local"), + new ScriptStringExecutionParameter().withName("BaseUserDN") + .withValue("DC=placeholder, DC=placeholder"))) + .withHiddenParameters(Arrays.asList( + new ScriptSecureStringExecutionParameter().withName("Password").withSecureValue("PlaceholderPassword"))) + .withTimeout("P0Y0M0DT0H60M60S").withRetention("P0Y0M60DT0H60M60S").create(); } } ``` @@ -1493,14 +1653,17 @@ public final class ScriptExecutionsCreateOrUpdateSamples { ### ScriptExecutions_Delete ```java -/** Samples for ScriptExecutions Delete. */ +/** + * Samples for ScriptExecutions Delete. + */ public final class ScriptExecutionsDeleteSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/ScriptExecutions_Delete.json + * x-ms-original-file: + * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/ScriptExecutions_Delete.json */ /** * Sample code: ScriptExecutions_Delete. - * + * * @param manager Entry point to AvsManager. */ public static void scriptExecutionsDelete(com.azure.resourcemanager.avs.AvsManager manager) { @@ -1512,20 +1675,22 @@ public final class ScriptExecutionsDeleteSamples { ### ScriptExecutions_Get ```java -/** Samples for ScriptExecutions Get. */ +/** + * Samples for ScriptExecutions Get. + */ public final class ScriptExecutionsGetSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/ScriptExecutions_Get.json + * x-ms-original-file: + * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/ScriptExecutions_Get.json */ /** * Sample code: ScriptExecutions_Get. - * + * * @param manager Entry point to AvsManager. */ public static void scriptExecutionsGet(com.azure.resourcemanager.avs.AvsManager manager) { - manager - .scriptExecutions() - .getWithResponse("group1", "cloud1", "addSsoServer", com.azure.core.util.Context.NONE); + manager.scriptExecutions().getWithResponse("group1", "cloud1", "addSsoServer", + com.azure.core.util.Context.NONE); } } ``` @@ -1536,30 +1701,25 @@ public final class ScriptExecutionsGetSamples { import com.azure.resourcemanager.avs.models.ScriptOutputStreamType; import java.util.Arrays; -/** Samples for ScriptExecutions GetExecutionLogs. */ +/** + * Samples for ScriptExecutions GetExecutionLogs. + */ public final class ScriptExecutionsGetExecutionLogsSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/ScriptExecutions_GetExecutionLogs.json + * x-ms-original-file: + * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/ScriptExecutions_GetExecutionLogs. + * json */ /** * Sample code: ScriptExecutions_GetExecutionLogs. - * + * * @param manager Entry point to AvsManager. */ public static void scriptExecutionsGetExecutionLogs(com.azure.resourcemanager.avs.AvsManager manager) { - manager - .scriptExecutions() - .getExecutionLogsWithResponse( - "group1", - "cloud1", - "addSsoServer", - Arrays - .asList( - ScriptOutputStreamType.INFORMATION, - ScriptOutputStreamType.fromString("Warnings"), - ScriptOutputStreamType.fromString("Errors"), - ScriptOutputStreamType.OUTPUT), - com.azure.core.util.Context.NONE); + manager.scriptExecutions().getExecutionLogsWithResponse("group1", "cloud1", "addSsoServer", + Arrays.asList(ScriptOutputStreamType.INFORMATION, ScriptOutputStreamType.fromString("Warnings"), + ScriptOutputStreamType.fromString("Errors"), ScriptOutputStreamType.OUTPUT), + com.azure.core.util.Context.NONE); } } ``` @@ -1567,14 +1727,17 @@ public final class ScriptExecutionsGetExecutionLogsSamples { ### ScriptExecutions_List ```java -/** Samples for ScriptExecutions List. */ +/** + * Samples for ScriptExecutions List. + */ public final class ScriptExecutionsListSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/ScriptExecutions_List.json + * x-ms-original-file: + * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/ScriptExecutions_List.json */ /** * Sample code: ScriptExecutions_List. - * + * * @param manager Entry point to AvsManager. */ public static void scriptExecutionsList(com.azure.resourcemanager.avs.AvsManager manager) { @@ -1586,20 +1749,22 @@ public final class ScriptExecutionsListSamples { ### ScriptPackages_Get ```java -/** Samples for ScriptPackages Get. */ +/** + * Samples for ScriptPackages Get. + */ public final class ScriptPackagesGetSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/ScriptPackages_Get.json + * x-ms-original-file: + * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/ScriptPackages_Get.json */ /** * Sample code: ScriptPackages_Get. - * + * * @param manager Entry point to AvsManager. */ public static void scriptPackagesGet(com.azure.resourcemanager.avs.AvsManager manager) { - manager - .scriptPackages() - .getWithResponse("group1", "cloud1", "Microsoft.AVS.Management@3.0.48", com.azure.core.util.Context.NONE); + manager.scriptPackages().getWithResponse("group1", "cloud1", "Microsoft.AVS.Management@3.0.48", + com.azure.core.util.Context.NONE); } } ``` @@ -1607,14 +1772,17 @@ public final class ScriptPackagesGetSamples { ### ScriptPackages_List ```java -/** Samples for ScriptPackages List. */ +/** + * Samples for ScriptPackages List. + */ public final class ScriptPackagesListSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/ScriptPackages_List.json + * x-ms-original-file: + * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/ScriptPackages_List.json */ /** * Sample code: ScriptPackages_List. - * + * * @param manager Entry point to AvsManager. */ public static void scriptPackagesList(com.azure.resourcemanager.avs.AvsManager manager) { @@ -1626,20 +1794,22 @@ public final class ScriptPackagesListSamples { ### VirtualMachines_Get ```java -/** Samples for VirtualMachines Get. */ +/** + * Samples for VirtualMachines Get. + */ public final class VirtualMachinesGetSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/VirtualMachines_Get.json + * x-ms-original-file: + * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/VirtualMachines_Get.json */ /** - * Sample code: GetVirtualMachine. - * + * Sample code: VirtualMachines_Get. + * * @param manager Entry point to AvsManager. */ - public static void getVirtualMachine(com.azure.resourcemanager.avs.AvsManager manager) { - manager - .virtualMachines() - .getWithResponse("group1", "cloud1", "cluster1", "vm-209", com.azure.core.util.Context.NONE); + public static void virtualMachinesGet(com.azure.resourcemanager.avs.AvsManager manager) { + manager.virtualMachines().getWithResponse("group1", "cloud1", "cluster1", "vm-209", + com.azure.core.util.Context.NONE); } } ``` @@ -1647,17 +1817,20 @@ public final class VirtualMachinesGetSamples { ### VirtualMachines_List ```java -/** Samples for VirtualMachines List. */ +/** + * Samples for VirtualMachines List. + */ public final class VirtualMachinesListSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/VirtualMachines_List.json + * x-ms-original-file: + * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/VirtualMachines_List.json */ /** - * Sample code: ListClusterVirtualMachines. - * + * Sample code: VirtualMachines_List. + * * @param manager Entry point to AvsManager. */ - public static void listClusterVirtualMachines(com.azure.resourcemanager.avs.AvsManager manager) { + public static void virtualMachinesList(com.azure.resourcemanager.avs.AvsManager manager) { manager.virtualMachines().list("group1", "cloud1", "cluster1", com.azure.core.util.Context.NONE); } } @@ -1669,26 +1842,24 @@ public final class VirtualMachinesListSamples { import com.azure.resourcemanager.avs.models.VirtualMachineRestrictMovement; import com.azure.resourcemanager.avs.models.VirtualMachineRestrictMovementState; -/** Samples for VirtualMachines RestrictMovement. */ +/** + * Samples for VirtualMachines RestrictMovement. + */ public final class VirtualMachinesRestrictMovementSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/VirtualMachines_RestrictMovement.json + * x-ms-original-file: + * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/VirtualMachines_RestrictMovement. + * json */ /** - * Sample code: VirtualMachine_RestrictMovement. - * + * Sample code: VirtualMachines_RestrictMovement. + * * @param manager Entry point to AvsManager. */ - public static void virtualMachineRestrictMovement(com.azure.resourcemanager.avs.AvsManager manager) { - manager - .virtualMachines() - .restrictMovement( - "group1", - "cloud1", - "cluster1", - "vm-209", - new VirtualMachineRestrictMovement().withRestrictMovement(VirtualMachineRestrictMovementState.ENABLED), - com.azure.core.util.Context.NONE); + public static void virtualMachinesRestrictMovement(com.azure.resourcemanager.avs.AvsManager manager) { + manager.virtualMachines().restrictMovement("group1", "cloud1", "cluster1", "vm-209", + new VirtualMachineRestrictMovement().withRestrictMovement(VirtualMachineRestrictMovementState.ENABLED), + com.azure.core.util.Context.NONE); } } ``` @@ -1698,27 +1869,23 @@ public final class VirtualMachinesRestrictMovementSamples { ```java import com.azure.resourcemanager.avs.models.WorkloadNetworkDhcpServer; -/** Samples for WorkloadNetworks CreateDhcp. */ +/** + * Samples for WorkloadNetworks CreateDhcp. + */ public final class WorkloadNetworksCreateDhcpSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/WorkloadNetworks_CreateDhcpConfigurations.json + * x-ms-original-file: + * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/WorkloadNetworks_CreateDhcp.json */ /** * Sample code: WorkloadNetworks_CreateDhcp. - * + * * @param manager Entry point to AvsManager. */ public static void workloadNetworksCreateDhcp(com.azure.resourcemanager.avs.AvsManager manager) { - manager - .workloadNetworks() - .defineDhcp("dhcp1") - .withExistingPrivateCloud("group1", "cloud1") - .withProperties( - new WorkloadNetworkDhcpServer() - .withDisplayName("dhcpConfigurations1") - .withRevision(1L) - .withServerAddress("40.1.5.1/24") - .withLeaseTime(86400L)) + manager.workloadNetworks().defineDhcp("dhcp1").withExistingPrivateCloud("group1", "cloud1") + .withProperties(new WorkloadNetworkDhcpServer().withDisplayName("dhcpConfigurations1").withRevision(1L) + .withServerAddress("40.1.5.1/24").withLeaseTime(86400)) .create(); } } @@ -1730,27 +1897,24 @@ public final class WorkloadNetworksCreateDhcpSamples { import com.azure.resourcemanager.avs.models.DnsServiceLogLevelEnum; import java.util.Arrays; -/** Samples for WorkloadNetworks CreateDnsService. */ +/** + * Samples for WorkloadNetworks CreateDnsService. + */ public final class WorkloadNetworksCreateDnsServiceSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/WorkloadNetworks_CreateDnsServices.json + * x-ms-original-file: + * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/WorkloadNetworks_CreateDnsService. + * json */ /** * Sample code: WorkloadNetworks_CreateDnsService. - * + * * @param manager Entry point to AvsManager. */ public static void workloadNetworksCreateDnsService(com.azure.resourcemanager.avs.AvsManager manager) { - manager - .workloadNetworks() - .defineDnsService("dnsService1") - .withExistingPrivateCloud("group1", "cloud1") - .withDisplayName("dnsService1") - .withDnsServiceIp("5.5.5.5") - .withDefaultDnsZone("defaultDnsZone1") - .withFqdnZones(Arrays.asList("fqdnZone1")) - .withLogLevel(DnsServiceLogLevelEnum.INFO) - .withRevision(1L) + manager.workloadNetworks().defineDnsService("dnsService1").withExistingPrivateCloud("group1", "cloud1") + .withDisplayName("dnsService1").withDnsServiceIp("5.5.5.5").withDefaultDnsZone("defaultDnsZone1") + .withFqdnZones(Arrays.asList("fqdnZone1")).withLogLevel(DnsServiceLogLevelEnum.INFO).withRevision(1L) .create(); } } @@ -1761,27 +1925,24 @@ public final class WorkloadNetworksCreateDnsServiceSamples { ```java import java.util.Arrays; -/** Samples for WorkloadNetworks CreateDnsZone. */ +/** + * Samples for WorkloadNetworks CreateDnsZone. + */ public final class WorkloadNetworksCreateDnsZoneSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/WorkloadNetworks_CreateDnsZones.json + * x-ms-original-file: + * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/WorkloadNetworks_CreateDnsZone. + * json */ /** * Sample code: WorkloadNetworks_CreateDnsZone. - * + * * @param manager Entry point to AvsManager. */ public static void workloadNetworksCreateDnsZone(com.azure.resourcemanager.avs.AvsManager manager) { - manager - .workloadNetworks() - .defineDnsZone("dnsZone1") - .withExistingPrivateCloud("group1", "cloud1") - .withDisplayName("dnsZone1") - .withDomain(Arrays.asList()) - .withDnsServerIps(Arrays.asList("1.1.1.1")) - .withSourceIp("8.8.8.8") - .withRevision(1L) - .create(); + manager.workloadNetworks().defineDnsZone("dnsZone1").withExistingPrivateCloud("group1", "cloud1") + .withDisplayName("dnsZone1").withDomain(Arrays.asList()).withDnsServerIps(Arrays.asList("1.1.1.1")) + .withSourceIp("8.8.8.8").withRevision(1L).create(); } } ``` @@ -1791,27 +1952,23 @@ public final class WorkloadNetworksCreateDnsZoneSamples { ```java import com.azure.resourcemanager.avs.models.PortMirroringDirectionEnum; -/** Samples for WorkloadNetworks CreatePortMirroring. */ +/** + * Samples for WorkloadNetworks CreatePortMirroring. + */ public final class WorkloadNetworksCreatePortMirroringSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/WorkloadNetworks_CreatePortMirroringProfiles.json + * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/ + * WorkloadNetworks_CreatePortMirroring.json */ /** * Sample code: WorkloadNetworks_CreatePortMirroring. - * + * * @param manager Entry point to AvsManager. */ public static void workloadNetworksCreatePortMirroring(com.azure.resourcemanager.avs.AvsManager manager) { - manager - .workloadNetworks() - .definePortMirroring("portMirroring1") - .withExistingPrivateCloud("group1", "cloud1") - .withDisplayName("portMirroring1") - .withDirection(PortMirroringDirectionEnum.BIDIRECTIONAL) - .withSource("vmGroup1") - .withDestination("vmGroup2") - .withRevision(1L) - .create(); + manager.workloadNetworks().definePortMirroring("portMirroring1").withExistingPrivateCloud("group1", "cloud1") + .withDisplayName("portMirroring1").withDirection(PortMirroringDirectionEnum.BIDIRECTIONAL) + .withSource("vmGroup1").withDestination("vmGroup2").withRevision(1L).create(); } } ``` @@ -1819,24 +1976,23 @@ public final class WorkloadNetworksCreatePortMirroringSamples { ### WorkloadNetworks_CreatePublicIp ```java -/** Samples for WorkloadNetworks CreatePublicIp. */ +/** + * Samples for WorkloadNetworks CreatePublicIp. + */ public final class WorkloadNetworksCreatePublicIpSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/WorkloadNetworks_CreatePublicIPs.json + * x-ms-original-file: + * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/WorkloadNetworks_CreatePublicIP. + * json */ /** * Sample code: WorkloadNetworks_CreatePublicIP. - * + * * @param manager Entry point to AvsManager. */ public static void workloadNetworksCreatePublicIP(com.azure.resourcemanager.avs.AvsManager manager) { - manager - .workloadNetworks() - .definePublicIp("publicIP1") - .withExistingPrivateCloud("group1", "cloud1") - .withDisplayName("publicIP1") - .withNumberOfPublicIPs(32L) - .create(); + manager.workloadNetworks().definePublicIp("publicIP1").withExistingPrivateCloud("group1", "cloud1") + .withDisplayName("publicIP1").withNumberOfPublicIPs(32L).create(); } } ``` @@ -1847,29 +2003,26 @@ public final class WorkloadNetworksCreatePublicIpSamples { import com.azure.resourcemanager.avs.models.WorkloadNetworkSegmentSubnet; import java.util.Arrays; -/** Samples for WorkloadNetworks CreateSegments. */ +/** + * Samples for WorkloadNetworks CreateSegments. + */ public final class WorkloadNetworksCreateSegmentsSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/WorkloadNetworks_CreateSegments.json + * x-ms-original-file: + * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/WorkloadNetworks_CreateSegments. + * json */ /** * Sample code: WorkloadNetworks_CreateSegments. - * + * * @param manager Entry point to AvsManager. */ public static void workloadNetworksCreateSegments(com.azure.resourcemanager.avs.AvsManager manager) { - manager - .workloadNetworks() - .defineSegments("segment1") - .withExistingPrivateCloud("group1", "cloud1") - .withDisplayName("segment1") - .withConnectedGateway("/infra/tier-1s/gateway") - .withSubnet( - new WorkloadNetworkSegmentSubnet() - .withDhcpRanges(Arrays.asList("40.20.0.0-40.20.0.1")) - .withGatewayAddress("40.20.20.20/16")) - .withRevision(1L) - .create(); + manager.workloadNetworks().defineSegments("segment1").withExistingPrivateCloud("group1", "cloud1") + .withDisplayName("segment1").withConnectedGateway("/infra/tier-1s/gateway") + .withSubnet(new WorkloadNetworkSegmentSubnet().withDhcpRanges(Arrays.asList("40.20.0.0-40.20.0.1")) + .withGatewayAddress("40.20.20.20/16")) + .withRevision(1L).create(); } } ``` @@ -1879,25 +2032,24 @@ public final class WorkloadNetworksCreateSegmentsSamples { ```java import java.util.Arrays; -/** Samples for WorkloadNetworks CreateVMGroup. */ +/** + * Samples for WorkloadNetworks CreateVMGroup. + */ public final class WorkloadNetworksCreateVMGroupSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/WorkloadNetworks_CreateVMGroups.json + * x-ms-original-file: + * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/WorkloadNetworks_CreateVMGroup. + * json */ /** * Sample code: WorkloadNetworks_CreateVMGroup. - * + * * @param manager Entry point to AvsManager. */ public static void workloadNetworksCreateVMGroup(com.azure.resourcemanager.avs.AvsManager manager) { - manager - .workloadNetworks() - .defineVMGroup("vmGroup1") - .withExistingPrivateCloud("group1", "cloud1") - .withDisplayName("vmGroup1") - .withMembers(Arrays.asList("564d43da-fefc-2a3b-1d92-42855622fa50")) - .withRevision(1L) - .create(); + manager.workloadNetworks().defineVMGroup("vmGroup1").withExistingPrivateCloud("group1", "cloud1") + .withDisplayName("vmGroup1").withMembers(Arrays.asList("564d43da-fefc-2a3b-1d92-42855622fa50")) + .withRevision(1L).create(); } } ``` @@ -1905,14 +2057,17 @@ public final class WorkloadNetworksCreateVMGroupSamples { ### WorkloadNetworks_DeleteDhcp ```java -/** Samples for WorkloadNetworks DeleteDhcp. */ +/** + * Samples for WorkloadNetworks DeleteDhcp. + */ public final class WorkloadNetworksDeleteDhcpSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/WorkloadNetworks_DeleteDhcpConfigurations.json + * x-ms-original-file: + * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/WorkloadNetworks_DeleteDhcp.json */ /** * Sample code: WorkloadNetworks_DeleteDhcp. - * + * * @param manager Entry point to AvsManager. */ public static void workloadNetworksDeleteDhcp(com.azure.resourcemanager.avs.AvsManager manager) { @@ -1924,20 +2079,23 @@ public final class WorkloadNetworksDeleteDhcpSamples { ### WorkloadNetworks_DeleteDnsService ```java -/** Samples for WorkloadNetworks DeleteDnsService. */ +/** + * Samples for WorkloadNetworks DeleteDnsService. + */ public final class WorkloadNetworksDeleteDnsServiceSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/WorkloadNetworks_DeleteDnsServices.json + * x-ms-original-file: + * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/WorkloadNetworks_DeleteDnsService. + * json */ /** * Sample code: WorkloadNetworks_DeleteDnsService. - * + * * @param manager Entry point to AvsManager. */ public static void workloadNetworksDeleteDnsService(com.azure.resourcemanager.avs.AvsManager manager) { - manager - .workloadNetworks() - .deleteDnsService("group1", "dnsService1", "cloud1", com.azure.core.util.Context.NONE); + manager.workloadNetworks().deleteDnsService("group1", "dnsService1", "cloud1", + com.azure.core.util.Context.NONE); } } ``` @@ -1945,14 +2103,18 @@ public final class WorkloadNetworksDeleteDnsServiceSamples { ### WorkloadNetworks_DeleteDnsZone ```java -/** Samples for WorkloadNetworks DeleteDnsZone. */ +/** + * Samples for WorkloadNetworks DeleteDnsZone. + */ public final class WorkloadNetworksDeleteDnsZoneSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/WorkloadNetworks_DeleteDnsZones.json + * x-ms-original-file: + * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/WorkloadNetworks_DeleteDnsZone. + * json */ /** * Sample code: WorkloadNetworks_DeleteDnsZone. - * + * * @param manager Entry point to AvsManager. */ public static void workloadNetworksDeleteDnsZone(com.azure.resourcemanager.avs.AvsManager manager) { @@ -1964,20 +2126,22 @@ public final class WorkloadNetworksDeleteDnsZoneSamples { ### WorkloadNetworks_DeletePortMirroring ```java -/** Samples for WorkloadNetworks DeletePortMirroring. */ +/** + * Samples for WorkloadNetworks DeletePortMirroring. + */ public final class WorkloadNetworksDeletePortMirroringSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/WorkloadNetworks_DeletePortMirroringProfiles.json + * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/ + * WorkloadNetworks_DeletePortMirroring.json */ /** * Sample code: WorkloadNetworks_DeletePortMirroring. - * + * * @param manager Entry point to AvsManager. */ public static void workloadNetworksDeletePortMirroring(com.azure.resourcemanager.avs.AvsManager manager) { - manager - .workloadNetworks() - .deletePortMirroring("group1", "portMirroring1", "cloud1", com.azure.core.util.Context.NONE); + manager.workloadNetworks().deletePortMirroring("group1", "portMirroring1", "cloud1", + com.azure.core.util.Context.NONE); } } ``` @@ -1985,14 +2149,18 @@ public final class WorkloadNetworksDeletePortMirroringSamples { ### WorkloadNetworks_DeletePublicIp ```java -/** Samples for WorkloadNetworks DeletePublicIp. */ +/** + * Samples for WorkloadNetworks DeletePublicIp. + */ public final class WorkloadNetworksDeletePublicIpSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/WorkloadNetworks_DeletePublicIPs.json + * x-ms-original-file: + * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/WorkloadNetworks_DeletePublicIP. + * json */ /** * Sample code: WorkloadNetworks_DeletePublicIP. - * + * * @param manager Entry point to AvsManager. */ public static void workloadNetworksDeletePublicIP(com.azure.resourcemanager.avs.AvsManager manager) { @@ -2004,14 +2172,18 @@ public final class WorkloadNetworksDeletePublicIpSamples { ### WorkloadNetworks_DeleteSegment ```java -/** Samples for WorkloadNetworks DeleteSegment. */ +/** + * Samples for WorkloadNetworks DeleteSegment. + */ public final class WorkloadNetworksDeleteSegmentSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/WorkloadNetworks_DeleteSegments.json + * x-ms-original-file: + * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/WorkloadNetworks_DeleteSegment. + * json */ /** * Sample code: WorkloadNetworks_DeleteSegment. - * + * * @param manager Entry point to AvsManager. */ public static void workloadNetworksDeleteSegment(com.azure.resourcemanager.avs.AvsManager manager) { @@ -2023,14 +2195,18 @@ public final class WorkloadNetworksDeleteSegmentSamples { ### WorkloadNetworks_DeleteVMGroup ```java -/** Samples for WorkloadNetworks DeleteVMGroup. */ +/** + * Samples for WorkloadNetworks DeleteVMGroup. + */ public final class WorkloadNetworksDeleteVMGroupSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/WorkloadNetworks_DeleteVMGroups.json + * x-ms-original-file: + * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/WorkloadNetworks_DeleteVMGroup. + * json */ /** * Sample code: WorkloadNetworks_DeleteVMGroup. - * + * * @param manager Entry point to AvsManager. */ public static void workloadNetworksDeleteVMGroup(com.azure.resourcemanager.avs.AvsManager manager) { @@ -2042,22 +2218,21 @@ public final class WorkloadNetworksDeleteVMGroupSamples { ### WorkloadNetworks_Get ```java -import com.azure.resourcemanager.avs.models.WorkloadNetworkName; - -/** Samples for WorkloadNetworks Get. */ +/** + * Samples for WorkloadNetworks Get. + */ public final class WorkloadNetworksGetSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/WorkloadNetworks_Get.json + * x-ms-original-file: + * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/WorkloadNetworks_Get.json */ /** * Sample code: WorkloadNetworks_Get. - * + * * @param manager Entry point to AvsManager. */ public static void workloadNetworksGet(com.azure.resourcemanager.avs.AvsManager manager) { - manager - .workloadNetworks() - .getWithResponse("group1", "cloud1", WorkloadNetworkName.DEFAULT, com.azure.core.util.Context.NONE); + manager.workloadNetworks().getWithResponse("group1", "cloud1", com.azure.core.util.Context.NONE); } } ``` @@ -2065,14 +2240,17 @@ public final class WorkloadNetworksGetSamples { ### WorkloadNetworks_GetDhcp ```java -/** Samples for WorkloadNetworks GetDhcp. */ +/** + * Samples for WorkloadNetworks GetDhcp. + */ public final class WorkloadNetworksGetDhcpSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/WorkloadNetworks_GetDhcpConfigurations.json + * x-ms-original-file: + * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/WorkloadNetworks_GetDhcp.json */ /** * Sample code: WorkloadNetworks_GetDhcp. - * + * * @param manager Entry point to AvsManager. */ public static void workloadNetworksGetDhcp(com.azure.resourcemanager.avs.AvsManager manager) { @@ -2084,20 +2262,23 @@ public final class WorkloadNetworksGetDhcpSamples { ### WorkloadNetworks_GetDnsService ```java -/** Samples for WorkloadNetworks GetDnsService. */ +/** + * Samples for WorkloadNetworks GetDnsService. + */ public final class WorkloadNetworksGetDnsServiceSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/WorkloadNetworks_GetDnsServices.json + * x-ms-original-file: + * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/WorkloadNetworks_GetDnsService. + * json */ /** * Sample code: WorkloadNetworks_GetDnsService. - * + * * @param manager Entry point to AvsManager. */ public static void workloadNetworksGetDnsService(com.azure.resourcemanager.avs.AvsManager manager) { - manager - .workloadNetworks() - .getDnsServiceWithResponse("group1", "cloud1", "dnsService1", com.azure.core.util.Context.NONE); + manager.workloadNetworks().getDnsServiceWithResponse("group1", "cloud1", "dnsService1", + com.azure.core.util.Context.NONE); } } ``` @@ -2105,20 +2286,22 @@ public final class WorkloadNetworksGetDnsServiceSamples { ### WorkloadNetworks_GetDnsZone ```java -/** Samples for WorkloadNetworks GetDnsZone. */ +/** + * Samples for WorkloadNetworks GetDnsZone. + */ public final class WorkloadNetworksGetDnsZoneSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/WorkloadNetworks_GetDnsZones.json + * x-ms-original-file: + * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/WorkloadNetworks_GetDnsZone.json */ /** * Sample code: WorkloadNetworks_GetDnsZone. - * + * * @param manager Entry point to AvsManager. */ public static void workloadNetworksGetDnsZone(com.azure.resourcemanager.avs.AvsManager manager) { - manager - .workloadNetworks() - .getDnsZoneWithResponse("group1", "cloud1", "dnsZone1", com.azure.core.util.Context.NONE); + manager.workloadNetworks().getDnsZoneWithResponse("group1", "cloud1", "dnsZone1", + com.azure.core.util.Context.NONE); } } ``` @@ -2126,20 +2309,22 @@ public final class WorkloadNetworksGetDnsZoneSamples { ### WorkloadNetworks_GetGateway ```java -/** Samples for WorkloadNetworks GetGateway. */ +/** + * Samples for WorkloadNetworks GetGateway. + */ public final class WorkloadNetworksGetGatewaySamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/WorkloadNetworks_GetGateway.json + * x-ms-original-file: + * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/WorkloadNetworks_GetGateway.json */ /** * Sample code: WorkloadNetworks_GetGateway. - * + * * @param manager Entry point to AvsManager. */ public static void workloadNetworksGetGateway(com.azure.resourcemanager.avs.AvsManager manager) { - manager - .workloadNetworks() - .getGatewayWithResponse("group1", "cloud1", "gateway1", com.azure.core.util.Context.NONE); + manager.workloadNetworks().getGatewayWithResponse("group1", "cloud1", "gateway1", + com.azure.core.util.Context.NONE); } } ``` @@ -2147,20 +2332,23 @@ public final class WorkloadNetworksGetGatewaySamples { ### WorkloadNetworks_GetPortMirroring ```java -/** Samples for WorkloadNetworks GetPortMirroring. */ +/** + * Samples for WorkloadNetworks GetPortMirroring. + */ public final class WorkloadNetworksGetPortMirroringSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/WorkloadNetworks_GetPortMirroringProfiles.json + * x-ms-original-file: + * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/WorkloadNetworks_GetPortMirroring. + * json */ /** * Sample code: WorkloadNetworks_GetPortMirroring. - * + * * @param manager Entry point to AvsManager. */ public static void workloadNetworksGetPortMirroring(com.azure.resourcemanager.avs.AvsManager manager) { - manager - .workloadNetworks() - .getPortMirroringWithResponse("group1", "cloud1", "portMirroring1", com.azure.core.util.Context.NONE); + manager.workloadNetworks().getPortMirroringWithResponse("group1", "cloud1", "portMirroring1", + com.azure.core.util.Context.NONE); } } ``` @@ -2168,20 +2356,22 @@ public final class WorkloadNetworksGetPortMirroringSamples { ### WorkloadNetworks_GetPublicIp ```java -/** Samples for WorkloadNetworks GetPublicIp. */ +/** + * Samples for WorkloadNetworks GetPublicIp. + */ public final class WorkloadNetworksGetPublicIpSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/WorkloadNetworks_GetPublicIPs.json + * x-ms-original-file: + * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/WorkloadNetworks_GetPublicIP.json */ /** * Sample code: WorkloadNetworks_GetPublicIP. - * + * * @param manager Entry point to AvsManager. */ public static void workloadNetworksGetPublicIP(com.azure.resourcemanager.avs.AvsManager manager) { - manager - .workloadNetworks() - .getPublicIpWithResponse("group1", "cloud1", "publicIP1", com.azure.core.util.Context.NONE); + manager.workloadNetworks().getPublicIpWithResponse("group1", "cloud1", "publicIP1", + com.azure.core.util.Context.NONE); } } ``` @@ -2189,20 +2379,22 @@ public final class WorkloadNetworksGetPublicIpSamples { ### WorkloadNetworks_GetSegment ```java -/** Samples for WorkloadNetworks GetSegment. */ +/** + * Samples for WorkloadNetworks GetSegment. + */ public final class WorkloadNetworksGetSegmentSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/WorkloadNetworks_GetSegments.json + * x-ms-original-file: + * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/WorkloadNetworks_GetSegment.json */ /** * Sample code: WorkloadNetworks_GetSegment. - * + * * @param manager Entry point to AvsManager. */ public static void workloadNetworksGetSegment(com.azure.resourcemanager.avs.AvsManager manager) { - manager - .workloadNetworks() - .getSegmentWithResponse("group1", "cloud1", "segment1", com.azure.core.util.Context.NONE); + manager.workloadNetworks().getSegmentWithResponse("group1", "cloud1", "segment1", + com.azure.core.util.Context.NONE); } } ``` @@ -2210,20 +2402,22 @@ public final class WorkloadNetworksGetSegmentSamples { ### WorkloadNetworks_GetVMGroup ```java -/** Samples for WorkloadNetworks GetVMGroup. */ +/** + * Samples for WorkloadNetworks GetVMGroup. + */ public final class WorkloadNetworksGetVMGroupSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/WorkloadNetworks_GetVMGroups.json + * x-ms-original-file: + * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/WorkloadNetworks_GetVMGroup.json */ /** * Sample code: WorkloadNetworks_GetVMGroup. - * + * * @param manager Entry point to AvsManager. */ public static void workloadNetworksGetVMGroup(com.azure.resourcemanager.avs.AvsManager manager) { - manager - .workloadNetworks() - .getVMGroupWithResponse("group1", "cloud1", "vmGroup1", com.azure.core.util.Context.NONE); + manager.workloadNetworks().getVMGroupWithResponse("group1", "cloud1", "vmGroup1", + com.azure.core.util.Context.NONE); } } ``` @@ -2231,20 +2425,23 @@ public final class WorkloadNetworksGetVMGroupSamples { ### WorkloadNetworks_GetVirtualMachine ```java -/** Samples for WorkloadNetworks GetVirtualMachine. */ +/** + * Samples for WorkloadNetworks GetVirtualMachine. + */ public final class WorkloadNetworksGetVirtualMachineSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/WorkloadNetworks_GetVirtualMachine.json + * x-ms-original-file: + * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/WorkloadNetworks_GetVirtualMachine + * .json */ /** * Sample code: WorkloadNetworks_GetVirtualMachine. - * + * * @param manager Entry point to AvsManager. */ public static void workloadNetworksGetVirtualMachine(com.azure.resourcemanager.avs.AvsManager manager) { - manager - .workloadNetworks() - .getVirtualMachineWithResponse("group1", "cloud1", "vm1", com.azure.core.util.Context.NONE); + manager.workloadNetworks().getVirtualMachineWithResponse("group1", "cloud1", "vm1", + com.azure.core.util.Context.NONE); } } ``` @@ -2252,14 +2449,17 @@ public final class WorkloadNetworksGetVirtualMachineSamples { ### WorkloadNetworks_List ```java -/** Samples for WorkloadNetworks List. */ +/** + * Samples for WorkloadNetworks List. + */ public final class WorkloadNetworksListSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/WorkloadNetworks_List.json + * x-ms-original-file: + * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/WorkloadNetworks_List.json */ /** * Sample code: WorkloadNetworks_List. - * + * * @param manager Entry point to AvsManager. */ public static void workloadNetworksList(com.azure.resourcemanager.avs.AvsManager manager) { @@ -2271,14 +2471,17 @@ public final class WorkloadNetworksListSamples { ### WorkloadNetworks_ListDhcp ```java -/** Samples for WorkloadNetworks ListDhcp. */ +/** + * Samples for WorkloadNetworks ListDhcp. + */ public final class WorkloadNetworksListDhcpSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/WorkloadNetworks_ListDhcpConfigurations.json + * x-ms-original-file: + * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/WorkloadNetworks_ListDhcp.json */ /** * Sample code: WorkloadNetworks_ListDhcp. - * + * * @param manager Entry point to AvsManager. */ public static void workloadNetworksListDhcp(com.azure.resourcemanager.avs.AvsManager manager) { @@ -2290,14 +2493,18 @@ public final class WorkloadNetworksListDhcpSamples { ### WorkloadNetworks_ListDnsServices ```java -/** Samples for WorkloadNetworks ListDnsServices. */ +/** + * Samples for WorkloadNetworks ListDnsServices. + */ public final class WorkloadNetworksListDnsServicesSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/WorkloadNetworks_ListDnsServices.json + * x-ms-original-file: + * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/WorkloadNetworks_ListDnsServices. + * json */ /** * Sample code: WorkloadNetworks_ListDnsServices. - * + * * @param manager Entry point to AvsManager. */ public static void workloadNetworksListDnsServices(com.azure.resourcemanager.avs.AvsManager manager) { @@ -2309,14 +2516,17 @@ public final class WorkloadNetworksListDnsServicesSamples { ### WorkloadNetworks_ListDnsZones ```java -/** Samples for WorkloadNetworks ListDnsZones. */ +/** + * Samples for WorkloadNetworks ListDnsZones. + */ public final class WorkloadNetworksListDnsZonesSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/WorkloadNetworks_ListDnsZones.json + * x-ms-original-file: + * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/WorkloadNetworks_ListDnsZones.json */ /** * Sample code: WorkloadNetworks_ListDnsZones. - * + * * @param manager Entry point to AvsManager. */ public static void workloadNetworksListDnsZones(com.azure.resourcemanager.avs.AvsManager manager) { @@ -2328,14 +2538,17 @@ public final class WorkloadNetworksListDnsZonesSamples { ### WorkloadNetworks_ListGateways ```java -/** Samples for WorkloadNetworks ListGateways. */ +/** + * Samples for WorkloadNetworks ListGateways. + */ public final class WorkloadNetworksListGatewaysSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/WorkloadNetworks_ListGateways.json + * x-ms-original-file: + * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/WorkloadNetworks_ListGateways.json */ /** * Sample code: WorkloadNetworks_ListGateways. - * + * * @param manager Entry point to AvsManager. */ public static void workloadNetworksListGateways(com.azure.resourcemanager.avs.AvsManager manager) { @@ -2347,14 +2560,18 @@ public final class WorkloadNetworksListGatewaysSamples { ### WorkloadNetworks_ListPortMirroring ```java -/** Samples for WorkloadNetworks ListPortMirroring. */ +/** + * Samples for WorkloadNetworks ListPortMirroring. + */ public final class WorkloadNetworksListPortMirroringSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/WorkloadNetworks_ListPortMirroringProfiles.json + * x-ms-original-file: + * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/WorkloadNetworks_ListPortMirroring + * .json */ /** * Sample code: WorkloadNetworks_ListPortMirroring. - * + * * @param manager Entry point to AvsManager. */ public static void workloadNetworksListPortMirroring(com.azure.resourcemanager.avs.AvsManager manager) { @@ -2366,14 +2583,18 @@ public final class WorkloadNetworksListPortMirroringSamples { ### WorkloadNetworks_ListPublicIPs ```java -/** Samples for WorkloadNetworks ListPublicIPs. */ +/** + * Samples for WorkloadNetworks ListPublicIPs. + */ public final class WorkloadNetworksListPublicIPsSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/WorkloadNetworks_ListPublicIPs.json + * x-ms-original-file: + * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/WorkloadNetworks_ListPublicIPs. + * json */ /** * Sample code: WorkloadNetworks_ListPublicIPs. - * + * * @param manager Entry point to AvsManager. */ public static void workloadNetworksListPublicIPs(com.azure.resourcemanager.avs.AvsManager manager) { @@ -2385,14 +2606,17 @@ public final class WorkloadNetworksListPublicIPsSamples { ### WorkloadNetworks_ListSegments ```java -/** Samples for WorkloadNetworks ListSegments. */ +/** + * Samples for WorkloadNetworks ListSegments. + */ public final class WorkloadNetworksListSegmentsSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/WorkloadNetworks_ListSegments.json + * x-ms-original-file: + * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/WorkloadNetworks_ListSegments.json */ /** * Sample code: WorkloadNetworks_ListSegments. - * + * * @param manager Entry point to AvsManager. */ public static void workloadNetworksListSegments(com.azure.resourcemanager.avs.AvsManager manager) { @@ -2404,14 +2628,17 @@ public final class WorkloadNetworksListSegmentsSamples { ### WorkloadNetworks_ListVMGroups ```java -/** Samples for WorkloadNetworks ListVMGroups. */ +/** + * Samples for WorkloadNetworks ListVMGroups. + */ public final class WorkloadNetworksListVMGroupsSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/WorkloadNetworks_ListVMGroups.json + * x-ms-original-file: + * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/WorkloadNetworks_ListVMGroups.json */ /** * Sample code: WorkloadNetworks_ListVMGroups. - * + * * @param manager Entry point to AvsManager. */ public static void workloadNetworksListVMGroups(com.azure.resourcemanager.avs.AvsManager manager) { @@ -2423,14 +2650,17 @@ public final class WorkloadNetworksListVMGroupsSamples { ### WorkloadNetworks_ListVirtualMachines ```java -/** Samples for WorkloadNetworks ListVirtualMachines. */ +/** + * Samples for WorkloadNetworks ListVirtualMachines. + */ public final class WorkloadNetworksListVirtualMachinesSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/WorkloadNetworks_ListVirtualMachines.json + * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/ + * WorkloadNetworks_ListVirtualMachines.json */ /** * Sample code: WorkloadNetworks_ListVirtualMachines. - * + * * @param manager Entry point to AvsManager. */ public static void workloadNetworksListVirtualMachines(com.azure.resourcemanager.avs.AvsManager manager) { @@ -2443,29 +2673,26 @@ public final class WorkloadNetworksListVirtualMachinesSamples { ```java import com.azure.resourcemanager.avs.models.WorkloadNetworkDhcp; -import com.azure.resourcemanager.avs.models.WorkloadNetworkDhcpServer; +import com.azure.resourcemanager.avs.models.WorkloadNetworkDhcpServerUpdate; -/** Samples for WorkloadNetworks UpdateDhcp. */ +/** + * Samples for WorkloadNetworks UpdateDhcp. + */ public final class WorkloadNetworksUpdateDhcpSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/WorkloadNetworks_UpdateDhcpConfigurations.json + * x-ms-original-file: + * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/WorkloadNetworks_UpdateDhcp.json */ /** * Sample code: WorkloadNetworks_UpdateDhcp. - * + * * @param manager Entry point to AvsManager. */ public static void workloadNetworksUpdateDhcp(com.azure.resourcemanager.avs.AvsManager manager) { - WorkloadNetworkDhcp resource = - manager - .workloadNetworks() - .getDhcpWithResponse("group1", "dhcp1", "cloud1", com.azure.core.util.Context.NONE) - .getValue(); - resource - .update() - .withProperties( - new WorkloadNetworkDhcpServer().withRevision(1L).withServerAddress("40.1.5.1/24").withLeaseTime(86400L)) - .apply(); + WorkloadNetworkDhcp resource = manager.workloadNetworks() + .getDhcpWithResponse("group1", "dhcp1", "cloud1", com.azure.core.util.Context.NONE).getValue(); + resource.update().withProperties(new WorkloadNetworkDhcpServerUpdate().withRevision(1L) + .withServerAddress("40.1.5.1/24").withLeaseTime(86400)).apply(); } } ``` @@ -2477,31 +2704,26 @@ import com.azure.resourcemanager.avs.models.DnsServiceLogLevelEnum; import com.azure.resourcemanager.avs.models.WorkloadNetworkDnsService; import java.util.Arrays; -/** Samples for WorkloadNetworks UpdateDnsService. */ +/** + * Samples for WorkloadNetworks UpdateDnsService. + */ public final class WorkloadNetworksUpdateDnsServiceSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/WorkloadNetworks_UpdateDnsServices.json + * x-ms-original-file: + * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/WorkloadNetworks_UpdateDnsService. + * json */ /** * Sample code: WorkloadNetworks_UpdateDnsService. - * + * * @param manager Entry point to AvsManager. */ public static void workloadNetworksUpdateDnsService(com.azure.resourcemanager.avs.AvsManager manager) { - WorkloadNetworkDnsService resource = - manager - .workloadNetworks() - .getDnsServiceWithResponse("group1", "cloud1", "dnsService1", com.azure.core.util.Context.NONE) - .getValue(); - resource - .update() - .withDisplayName("dnsService1") - .withDnsServiceIp("5.5.5.5") - .withDefaultDnsZone("defaultDnsZone1") - .withFqdnZones(Arrays.asList("fqdnZone1")) - .withLogLevel(DnsServiceLogLevelEnum.INFO) - .withRevision(1L) - .apply(); + WorkloadNetworkDnsService resource = manager.workloadNetworks() + .getDnsServiceWithResponse("group1", "cloud1", "dnsService1", com.azure.core.util.Context.NONE).getValue(); + resource.update().withDisplayName("dnsService1").withDnsServiceIp("5.5.5.5") + .withDefaultDnsZone("defaultDnsZone1").withFqdnZones(Arrays.asList("fqdnZone1")) + .withLogLevel(DnsServiceLogLevelEnum.INFO).withRevision(1L).apply(); } } ``` @@ -2512,30 +2734,25 @@ public final class WorkloadNetworksUpdateDnsServiceSamples { import com.azure.resourcemanager.avs.models.WorkloadNetworkDnsZone; import java.util.Arrays; -/** Samples for WorkloadNetworks UpdateDnsZone. */ +/** + * Samples for WorkloadNetworks UpdateDnsZone. + */ public final class WorkloadNetworksUpdateDnsZoneSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/WorkloadNetworks_UpdateDnsZones.json + * x-ms-original-file: + * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/WorkloadNetworks_UpdateDnsZone. + * json */ /** * Sample code: WorkloadNetworks_UpdateDnsZone. - * + * * @param manager Entry point to AvsManager. */ public static void workloadNetworksUpdateDnsZone(com.azure.resourcemanager.avs.AvsManager manager) { - WorkloadNetworkDnsZone resource = - manager - .workloadNetworks() - .getDnsZoneWithResponse("group1", "cloud1", "dnsZone1", com.azure.core.util.Context.NONE) - .getValue(); - resource - .update() - .withDisplayName("dnsZone1") - .withDomain(Arrays.asList()) - .withDnsServerIps(Arrays.asList("1.1.1.1")) - .withSourceIp("8.8.8.8") - .withRevision(1L) - .apply(); + WorkloadNetworkDnsZone resource = manager.workloadNetworks() + .getDnsZoneWithResponse("group1", "cloud1", "dnsZone1", com.azure.core.util.Context.NONE).getValue(); + resource.update().withDisplayName("dnsZone1").withDomain(Arrays.asList()) + .withDnsServerIps(Arrays.asList("1.1.1.1")).withSourceIp("8.8.8.8").withRevision(1L).apply(); } } ``` @@ -2546,29 +2763,25 @@ public final class WorkloadNetworksUpdateDnsZoneSamples { import com.azure.resourcemanager.avs.models.PortMirroringDirectionEnum; import com.azure.resourcemanager.avs.models.WorkloadNetworkPortMirroring; -/** Samples for WorkloadNetworks UpdatePortMirroring. */ +/** + * Samples for WorkloadNetworks UpdatePortMirroring. + */ public final class WorkloadNetworksUpdatePortMirroringSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/WorkloadNetworks_UpdatePortMirroringProfiles.json + * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/ + * WorkloadNetworks_UpdatePortMirroring.json */ /** * Sample code: WorkloadNetworks_UpdatePortMirroring. - * + * * @param manager Entry point to AvsManager. */ public static void workloadNetworksUpdatePortMirroring(com.azure.resourcemanager.avs.AvsManager manager) { - WorkloadNetworkPortMirroring resource = - manager - .workloadNetworks() - .getPortMirroringWithResponse("group1", "cloud1", "portMirroring1", com.azure.core.util.Context.NONE) - .getValue(); - resource - .update() - .withDirection(PortMirroringDirectionEnum.BIDIRECTIONAL) - .withSource("vmGroup1") - .withDestination("vmGroup2") - .withRevision(1L) - .apply(); + WorkloadNetworkPortMirroring resource = manager.workloadNetworks() + .getPortMirroringWithResponse("group1", "cloud1", "portMirroring1", com.azure.core.util.Context.NONE) + .getValue(); + resource.update().withDirection(PortMirroringDirectionEnum.BIDIRECTIONAL).withSource("vmGroup1") + .withDestination("vmGroup2").withRevision(1L).apply(); } } ``` @@ -2580,31 +2793,27 @@ import com.azure.resourcemanager.avs.models.WorkloadNetworkSegment; import com.azure.resourcemanager.avs.models.WorkloadNetworkSegmentSubnet; import java.util.Arrays; -/** Samples for WorkloadNetworks UpdateSegments. */ +/** + * Samples for WorkloadNetworks UpdateSegments. + */ public final class WorkloadNetworksUpdateSegmentsSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/WorkloadNetworks_UpdateSegments.json + * x-ms-original-file: + * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/WorkloadNetworks_UpdateSegments. + * json */ /** * Sample code: WorkloadNetworks_UpdateSegments. - * + * * @param manager Entry point to AvsManager. */ public static void workloadNetworksUpdateSegments(com.azure.resourcemanager.avs.AvsManager manager) { - WorkloadNetworkSegment resource = - manager - .workloadNetworks() - .getSegmentWithResponse("group1", "cloud1", "segment1", com.azure.core.util.Context.NONE) - .getValue(); + WorkloadNetworkSegment resource = manager.workloadNetworks() + .getSegmentWithResponse("group1", "cloud1", "segment1", com.azure.core.util.Context.NONE).getValue(); resource - .update() - .withConnectedGateway("/infra/tier-1s/gateway") - .withSubnet( - new WorkloadNetworkSegmentSubnet() - .withDhcpRanges(Arrays.asList("40.20.0.0-40.20.0.1")) - .withGatewayAddress("40.20.20.20/16")) - .withRevision(1L) - .apply(); + .update().withConnectedGateway("/infra/tier-1s/gateway").withSubnet(new WorkloadNetworkSegmentSubnet() + .withDhcpRanges(Arrays.asList("40.20.0.0-40.20.0.1")).withGatewayAddress("40.20.20.20/16")) + .withRevision(1L).apply(); } } ``` @@ -2615,22 +2824,23 @@ public final class WorkloadNetworksUpdateSegmentsSamples { import com.azure.resourcemanager.avs.models.WorkloadNetworkVMGroup; import java.util.Arrays; -/** Samples for WorkloadNetworks UpdateVMGroup. */ +/** + * Samples for WorkloadNetworks UpdateVMGroup. + */ public final class WorkloadNetworksUpdateVMGroupSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/WorkloadNetworks_UpdateVMGroups.json + * x-ms-original-file: + * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/WorkloadNetworks_UpdateVMGroup. + * json */ /** * Sample code: WorkloadNetworks_UpdateVMGroup. - * + * * @param manager Entry point to AvsManager. */ public static void workloadNetworksUpdateVMGroup(com.azure.resourcemanager.avs.AvsManager manager) { - WorkloadNetworkVMGroup resource = - manager - .workloadNetworks() - .getVMGroupWithResponse("group1", "cloud1", "vmGroup1", com.azure.core.util.Context.NONE) - .getValue(); + WorkloadNetworkVMGroup resource = manager.workloadNetworks() + .getVMGroupWithResponse("group1", "cloud1", "vmGroup1", com.azure.core.util.Context.NONE).getValue(); resource.update().withMembers(Arrays.asList("564d43da-fefc-2a3b-1d92-42855622fa50")).withRevision(1L).apply(); } } diff --git a/sdk/avs/azure-resourcemanager-avs/pom.xml b/sdk/avs/azure-resourcemanager-avs/pom.xml index 1a56cb34f0005..1587979cd0313 100644 --- a/sdk/avs/azure-resourcemanager-avs/pom.xml +++ b/sdk/avs/azure-resourcemanager-avs/pom.xml @@ -18,7 +18,7 @@ jar Microsoft Azure SDK for Avs Management - This package contains Microsoft Azure SDK for Avs Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. Azure VMware Solution API. Package tag package-2023-03-01. + This package contains Microsoft Azure SDK for Avs Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. Azure VMware Solution API. Package tag package-2023-09-01. https://github.com/Azure/azure-sdk-for-java @@ -88,8 +88,6 @@ 4.11.0 test - - net.bytebuddy byte-buddy diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/AvsManager.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/AvsManager.java index 2ddd22520551f..bd688e7689dee 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/AvsManager.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/AvsManager.java @@ -32,6 +32,7 @@ import com.azure.resourcemanager.avs.implementation.DatastoresImpl; import com.azure.resourcemanager.avs.implementation.GlobalReachConnectionsImpl; import com.azure.resourcemanager.avs.implementation.HcxEnterpriseSitesImpl; +import com.azure.resourcemanager.avs.implementation.IscsiPathsImpl; import com.azure.resourcemanager.avs.implementation.LocationsImpl; import com.azure.resourcemanager.avs.implementation.OperationsImpl; import com.azure.resourcemanager.avs.implementation.PlacementPoliciesImpl; @@ -48,6 +49,7 @@ import com.azure.resourcemanager.avs.models.Datastores; import com.azure.resourcemanager.avs.models.GlobalReachConnections; import com.azure.resourcemanager.avs.models.HcxEnterpriseSites; +import com.azure.resourcemanager.avs.models.IscsiPaths; import com.azure.resourcemanager.avs.models.Locations; import com.azure.resourcemanager.avs.models.Operations; import com.azure.resourcemanager.avs.models.PlacementPolicies; @@ -64,7 +66,10 @@ import java.util.Objects; import java.util.stream.Collectors; -/** Entry point to AvsManager. Azure VMware Solution API. */ +/** + * Entry point to AvsManager. + * Azure VMware Solution API. + */ public final class AvsManager { private Operations operations; @@ -72,49 +77,47 @@ public final class AvsManager { private PrivateClouds privateClouds; + private Addons addons; + + private Authorizations authorizations; + + private CloudLinks cloudLinks; + private Clusters clusters; private Datastores datastores; - private HcxEnterpriseSites hcxEnterpriseSites; + private PlacementPolicies placementPolicies; - private Authorizations authorizations; + private VirtualMachines virtualMachines; private GlobalReachConnections globalReachConnections; - private WorkloadNetworks workloadNetworks; - - private CloudLinks cloudLinks; - - private Addons addons; + private HcxEnterpriseSites hcxEnterpriseSites; - private VirtualMachines virtualMachines; + private IscsiPaths iscsiPaths; - private PlacementPolicies placementPolicies; + private ScriptExecutions scriptExecutions; private ScriptPackages scriptPackages; private ScriptCmdlets scriptCmdlets; - private ScriptExecutions scriptExecutions; + private WorkloadNetworks workloadNetworks; private final AvsClient clientObject; private AvsManager(HttpPipeline httpPipeline, AzureProfile profile, Duration defaultPollInterval) { Objects.requireNonNull(httpPipeline, "'httpPipeline' cannot be null."); Objects.requireNonNull(profile, "'profile' cannot be null."); - this.clientObject = - new AvsClientBuilder() - .pipeline(httpPipeline) - .endpoint(profile.getEnvironment().getResourceManagerEndpoint()) - .subscriptionId(profile.getSubscriptionId()) - .defaultPollInterval(defaultPollInterval) - .buildClient(); + this.clientObject = new AvsClientBuilder().pipeline(httpPipeline) + .endpoint(profile.getEnvironment().getResourceManagerEndpoint()).subscriptionId(profile.getSubscriptionId()) + .defaultPollInterval(defaultPollInterval).buildClient(); } /** * Creates an instance of Avs service API entry point. - * + * * @param credential the credential to use. * @param profile the Azure profile for client. * @return the Avs service API instance. @@ -127,7 +130,7 @@ public static AvsManager authenticate(TokenCredential credential, AzureProfile p /** * Creates an instance of Avs service API entry point. - * + * * @param httpPipeline the {@link HttpPipeline} configured with Azure authentication credential. * @param profile the Azure profile for client. * @return the Avs service API instance. @@ -140,14 +143,16 @@ public static AvsManager authenticate(HttpPipeline httpPipeline, AzureProfile pr /** * Gets a Configurable instance that can be used to create AvsManager with optional configuration. - * + * * @return the Configurable instance allowing configurations. */ public static Configurable configure() { return new AvsManager.Configurable(); } - /** The Configurable allowing configurations to be set. */ + /** + * The Configurable allowing configurations to be set. + */ public static final class Configurable { private static final ClientLogger LOGGER = new ClientLogger(Configurable.class); @@ -219,8 +224,8 @@ public Configurable withRetryPolicy(RetryPolicy retryPolicy) { /** * Sets the retry options for the HTTP pipeline retry policy. - * - *

This setting has no effect, if retry policy is set via {@link #withRetryPolicy(RetryPolicy)}. + *

+ * This setting has no effect, if retry policy is set via {@link #withRetryPolicy(RetryPolicy)}. * * @param retryOptions the retry options for the HTTP pipeline retry policy. * @return the configurable object itself. @@ -237,8 +242,8 @@ public Configurable withRetryOptions(RetryOptions retryOptions) { * @return the configurable object itself. */ public Configurable withDefaultPollInterval(Duration defaultPollInterval) { - this.defaultPollInterval = - Objects.requireNonNull(defaultPollInterval, "'defaultPollInterval' cannot be null."); + this.defaultPollInterval + = Objects.requireNonNull(defaultPollInterval, "'defaultPollInterval' cannot be null."); if (this.defaultPollInterval.isNegative()) { throw LOGGER .logExceptionAsError(new IllegalArgumentException("'defaultPollInterval' cannot be negative")); @@ -258,21 +263,12 @@ public AvsManager authenticate(TokenCredential credential, AzureProfile profile) Objects.requireNonNull(profile, "'profile' cannot be null."); StringBuilder userAgentBuilder = new StringBuilder(); - userAgentBuilder - .append("azsdk-java") - .append("-") - .append("com.azure.resourcemanager.avs") - .append("/") - .append("1.1.0"); + userAgentBuilder.append("azsdk-java").append("-").append("com.azure.resourcemanager.avs").append("/") + .append("1.0.0-beta.1"); if (!Configuration.getGlobalConfiguration().get("AZURE_TELEMETRY_DISABLED", false)) { - userAgentBuilder - .append(" (") - .append(Configuration.getGlobalConfiguration().get("java.version")) - .append("; ") - .append(Configuration.getGlobalConfiguration().get("os.name")) - .append("; ") - .append(Configuration.getGlobalConfiguration().get("os.version")) - .append("; auto-generated)"); + userAgentBuilder.append(" (").append(Configuration.getGlobalConfiguration().get("java.version")) + .append("; ").append(Configuration.getGlobalConfiguration().get("os.name")).append("; ") + .append(Configuration.getGlobalConfiguration().get("os.version")).append("; auto-generated)"); } else { userAgentBuilder.append(" (auto-generated)"); } @@ -291,38 +287,25 @@ public AvsManager authenticate(TokenCredential credential, AzureProfile profile) policies.add(new UserAgentPolicy(userAgentBuilder.toString())); policies.add(new AddHeadersFromContextPolicy()); policies.add(new RequestIdPolicy()); - policies - .addAll( - this - .policies - .stream() - .filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_CALL) - .collect(Collectors.toList())); + 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 - .addAll( - this - .policies - .stream() - .filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_RETRY) - .collect(Collectors.toList())); + 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 = - new HttpPipelineBuilder() - .httpClient(httpClient) - .policies(policies.toArray(new HttpPipelinePolicy[0])) - .build(); + HttpPipeline httpPipeline = new HttpPipelineBuilder().httpClient(httpClient) + .policies(policies.toArray(new HttpPipelinePolicy[0])).build(); return new AvsManager(httpPipeline, profile, defaultPollInterval); } } /** * Gets the resource collection API of Operations. - * + * * @return Resource collection API of Operations. */ public Operations operations() { @@ -334,7 +317,7 @@ public Operations operations() { /** * Gets the resource collection API of Locations. - * + * * @return Resource collection API of Locations. */ public Locations locations() { @@ -346,7 +329,7 @@ public Locations locations() { /** * Gets the resource collection API of PrivateClouds. It manages PrivateCloud. - * + * * @return Resource collection API of PrivateClouds. */ public PrivateClouds privateClouds() { @@ -356,9 +339,45 @@ public PrivateClouds privateClouds() { return privateClouds; } + /** + * Gets the resource collection API of Addons. It manages Addon. + * + * @return Resource collection API of Addons. + */ + public Addons addons() { + if (this.addons == null) { + this.addons = new AddonsImpl(clientObject.getAddons(), this); + } + return addons; + } + + /** + * Gets the resource collection API of Authorizations. It manages ExpressRouteAuthorization. + * + * @return Resource collection API of Authorizations. + */ + public Authorizations authorizations() { + if (this.authorizations == null) { + this.authorizations = new AuthorizationsImpl(clientObject.getAuthorizations(), this); + } + return authorizations; + } + + /** + * Gets the resource collection API of CloudLinks. It manages CloudLink. + * + * @return Resource collection API of CloudLinks. + */ + public CloudLinks cloudLinks() { + if (this.cloudLinks == null) { + this.cloudLinks = new CloudLinksImpl(clientObject.getCloudLinks(), this); + } + return cloudLinks; + } + /** * Gets the resource collection API of Clusters. It manages Cluster. - * + * * @return Resource collection API of Clusters. */ public Clusters clusters() { @@ -370,7 +389,7 @@ public Clusters clusters() { /** * Gets the resource collection API of Datastores. It manages Datastore. - * + * * @return Resource collection API of Datastores. */ public Datastores datastores() { @@ -381,107 +400,81 @@ public Datastores datastores() { } /** - * Gets the resource collection API of HcxEnterpriseSites. It manages HcxEnterpriseSite. - * - * @return Resource collection API of HcxEnterpriseSites. + * Gets the resource collection API of PlacementPolicies. It manages PlacementPolicy. + * + * @return Resource collection API of PlacementPolicies. */ - public HcxEnterpriseSites hcxEnterpriseSites() { - if (this.hcxEnterpriseSites == null) { - this.hcxEnterpriseSites = new HcxEnterpriseSitesImpl(clientObject.getHcxEnterpriseSites(), this); + public PlacementPolicies placementPolicies() { + if (this.placementPolicies == null) { + this.placementPolicies = new PlacementPoliciesImpl(clientObject.getPlacementPolicies(), this); } - return hcxEnterpriseSites; + return placementPolicies; } /** - * Gets the resource collection API of Authorizations. It manages ExpressRouteAuthorization. - * - * @return Resource collection API of Authorizations. + * Gets the resource collection API of VirtualMachines. + * + * @return Resource collection API of VirtualMachines. */ - public Authorizations authorizations() { - if (this.authorizations == null) { - this.authorizations = new AuthorizationsImpl(clientObject.getAuthorizations(), this); + public VirtualMachines virtualMachines() { + if (this.virtualMachines == null) { + this.virtualMachines = new VirtualMachinesImpl(clientObject.getVirtualMachines(), this); } - return authorizations; + return virtualMachines; } /** * Gets the resource collection API of GlobalReachConnections. It manages GlobalReachConnection. - * + * * @return Resource collection API of GlobalReachConnections. */ public GlobalReachConnections globalReachConnections() { if (this.globalReachConnections == null) { - this.globalReachConnections = - new GlobalReachConnectionsImpl(clientObject.getGlobalReachConnections(), this); + this.globalReachConnections + = new GlobalReachConnectionsImpl(clientObject.getGlobalReachConnections(), this); } return globalReachConnections; } /** - * Gets the resource collection API of WorkloadNetworks. It manages WorkloadNetworkSegment, WorkloadNetworkDhcp, - * WorkloadNetworkPortMirroring, WorkloadNetworkVMGroup, WorkloadNetworkDnsService, WorkloadNetworkDnsZone, - * WorkloadNetworkPublicIp. - * - * @return Resource collection API of WorkloadNetworks. - */ - public WorkloadNetworks workloadNetworks() { - if (this.workloadNetworks == null) { - this.workloadNetworks = new WorkloadNetworksImpl(clientObject.getWorkloadNetworks(), this); - } - return workloadNetworks; - } - - /** - * Gets the resource collection API of CloudLinks. It manages CloudLink. - * - * @return Resource collection API of CloudLinks. - */ - public CloudLinks cloudLinks() { - if (this.cloudLinks == null) { - this.cloudLinks = new CloudLinksImpl(clientObject.getCloudLinks(), this); - } - return cloudLinks; - } - - /** - * Gets the resource collection API of Addons. It manages Addon. - * - * @return Resource collection API of Addons. + * Gets the resource collection API of HcxEnterpriseSites. It manages HcxEnterpriseSite. + * + * @return Resource collection API of HcxEnterpriseSites. */ - public Addons addons() { - if (this.addons == null) { - this.addons = new AddonsImpl(clientObject.getAddons(), this); + public HcxEnterpriseSites hcxEnterpriseSites() { + if (this.hcxEnterpriseSites == null) { + this.hcxEnterpriseSites = new HcxEnterpriseSitesImpl(clientObject.getHcxEnterpriseSites(), this); } - return addons; + return hcxEnterpriseSites; } /** - * Gets the resource collection API of VirtualMachines. - * - * @return Resource collection API of VirtualMachines. + * Gets the resource collection API of IscsiPaths. + * + * @return Resource collection API of IscsiPaths. */ - public VirtualMachines virtualMachines() { - if (this.virtualMachines == null) { - this.virtualMachines = new VirtualMachinesImpl(clientObject.getVirtualMachines(), this); + public IscsiPaths iscsiPaths() { + if (this.iscsiPaths == null) { + this.iscsiPaths = new IscsiPathsImpl(clientObject.getIscsiPaths(), this); } - return virtualMachines; + return iscsiPaths; } /** - * Gets the resource collection API of PlacementPolicies. It manages PlacementPolicy. - * - * @return Resource collection API of PlacementPolicies. + * Gets the resource collection API of ScriptExecutions. It manages ScriptExecution. + * + * @return Resource collection API of ScriptExecutions. */ - public PlacementPolicies placementPolicies() { - if (this.placementPolicies == null) { - this.placementPolicies = new PlacementPoliciesImpl(clientObject.getPlacementPolicies(), this); + public ScriptExecutions scriptExecutions() { + if (this.scriptExecutions == null) { + this.scriptExecutions = new ScriptExecutionsImpl(clientObject.getScriptExecutions(), this); } - return placementPolicies; + return scriptExecutions; } /** * Gets the resource collection API of ScriptPackages. - * + * * @return Resource collection API of ScriptPackages. */ public ScriptPackages scriptPackages() { @@ -493,7 +486,7 @@ public ScriptPackages scriptPackages() { /** * Gets the resource collection API of ScriptCmdlets. - * + * * @return Resource collection API of ScriptCmdlets. */ public ScriptCmdlets scriptCmdlets() { @@ -504,21 +497,23 @@ public ScriptCmdlets scriptCmdlets() { } /** - * Gets the resource collection API of ScriptExecutions. It manages ScriptExecution. - * - * @return Resource collection API of ScriptExecutions. + * Gets the resource collection API of WorkloadNetworks. It manages WorkloadNetworkDhcp, WorkloadNetworkDnsService, + * WorkloadNetworkDnsZone, WorkloadNetworkPortMirroring, WorkloadNetworkPublicIp, WorkloadNetworkSegment, + * WorkloadNetworkVMGroup. + * + * @return Resource collection API of WorkloadNetworks. */ - public ScriptExecutions scriptExecutions() { - if (this.scriptExecutions == null) { - this.scriptExecutions = new ScriptExecutionsImpl(clientObject.getScriptExecutions(), this); + public WorkloadNetworks workloadNetworks() { + if (this.workloadNetworks == null) { + this.workloadNetworks = new WorkloadNetworksImpl(clientObject.getWorkloadNetworks(), this); } - return scriptExecutions; + return workloadNetworks; } /** * Gets wrapped service client AvsClient providing direct access to the underlying auto-generated API * implementation, based on Azure REST API. - * + * * @return Wrapped service client AvsClient. */ public AvsClient serviceClient() { diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/AddonsClient.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/AddonsClient.java index 56fcc5e42d491..afdf1f6ba3edd 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/AddonsClient.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/AddonsClient.java @@ -13,88 +13,90 @@ import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.avs.fluent.models.AddonInner; -/** An instance of this class provides access to all the operations defined in AddonsClient. */ +/** + * An instance of this class provides access to all the operations defined in AddonsClient. + */ public interface AddonsClient { /** - * List addons in a private cloud. - * + * List Addon resources by PrivateCloud. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. * @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 a paged list of addons as paginated response with {@link PagedIterable}. + * @return the response of a Addon list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(String resourceGroupName, String privateCloudName); /** - * List addons in a private cloud. - * + * List Addon resources by PrivateCloud. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. * @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 a paged list of addons as paginated response with {@link PagedIterable}. + * @return the response of a Addon list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(String resourceGroupName, String privateCloudName, Context context); /** - * Get an addon by name in a private cloud. - * + * Get a Addon. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param addonName Name of the addon for the private cloud. + * @param addonName Name of the addon. * @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 an addon by name in a private cloud along with {@link Response}. + * @return a Addon along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String resourceGroupName, String privateCloudName, String addonName, Context context); + Response getWithResponse(String resourceGroupName, String privateCloudName, String addonName, + Context context); /** - * Get an addon by name in a private cloud. - * + * Get a Addon. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param addonName Name of the addon for the private cloud. + * @param addonName Name of the addon. * @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 an addon by name in a private cloud. + * @return a Addon. */ @ServiceMethod(returns = ReturnType.SINGLE) AddonInner get(String resourceGroupName, String privateCloudName, String addonName); /** - * Create or update a addon in a private cloud. - * + * Create a Addon. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName The name of the private cloud. - * @param addonName Name of the addon for the private cloud. - * @param addon A addon in the private cloud. + * @param privateCloudName Name of the private cloud. + * @param addonName Name of the addon. + * @param addon Resource create parameters. * @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 an addon resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, AddonInner> beginCreateOrUpdate( - String resourceGroupName, String privateCloudName, String addonName, AddonInner addon); + SyncPoller, AddonInner> beginCreateOrUpdate(String resourceGroupName, + String privateCloudName, String addonName, AddonInner addon); /** - * Create or update a addon in a private cloud. - * + * Create a Addon. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName The name of the private cloud. - * @param addonName Name of the addon for the private cloud. - * @param addon A addon in the private cloud. + * @param privateCloudName Name of the private cloud. + * @param addonName Name of the addon. + * @param addon Resource create parameters. * @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. @@ -102,16 +104,16 @@ SyncPoller, AddonInner> beginCreateOrUpdate( * @return the {@link SyncPoller} for polling of an addon resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, AddonInner> beginCreateOrUpdate( - String resourceGroupName, String privateCloudName, String addonName, AddonInner addon, Context context); + SyncPoller, AddonInner> beginCreateOrUpdate(String resourceGroupName, + String privateCloudName, String addonName, AddonInner addon, Context context); /** - * Create or update a addon in a private cloud. - * + * Create a Addon. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName The name of the private cloud. - * @param addonName Name of the addon for the private cloud. - * @param addon A addon in the private cloud. + * @param privateCloudName Name of the private cloud. + * @param addonName Name of the addon. + * @param addon Resource create parameters. * @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. @@ -121,12 +123,12 @@ SyncPoller, AddonInner> beginCreateOrUpdate( AddonInner createOrUpdate(String resourceGroupName, String privateCloudName, String addonName, AddonInner addon); /** - * Create or update a addon in a private cloud. - * + * Create a Addon. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName The name of the private cloud. - * @param addonName Name of the addon for the private cloud. - * @param addon A addon in the private cloud. + * @param privateCloudName Name of the private cloud. + * @param addonName Name of the addon. + * @param addon Resource create parameters. * @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. @@ -134,15 +136,15 @@ SyncPoller, AddonInner> beginCreateOrUpdate( * @return an addon resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - AddonInner createOrUpdate( - String resourceGroupName, String privateCloudName, String addonName, AddonInner addon, Context context); + AddonInner createOrUpdate(String resourceGroupName, String privateCloudName, String addonName, AddonInner addon, + Context context); /** - * Delete a addon in a private cloud. - * + * Delete a Addon. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param addonName Name of the addon for the private cloud. + * @param addonName Name of the addon. * @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. @@ -152,11 +154,11 @@ AddonInner createOrUpdate( SyncPoller, Void> beginDelete(String resourceGroupName, String privateCloudName, String addonName); /** - * Delete a addon in a private cloud. - * + * Delete a Addon. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param addonName Name of the addon for the private cloud. + * @param addonName Name of the addon. * @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. @@ -164,15 +166,15 @@ AddonInner createOrUpdate( * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete( - String resourceGroupName, String privateCloudName, String addonName, Context context); + SyncPoller, Void> beginDelete(String resourceGroupName, String privateCloudName, String addonName, + Context context); /** - * Delete a addon in a private cloud. - * + * Delete a Addon. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param addonName Name of the addon for the private cloud. + * @param addonName Name of the addon. * @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. @@ -181,11 +183,11 @@ SyncPoller, Void> beginDelete( void delete(String resourceGroupName, String privateCloudName, String addonName); /** - * Delete a addon in a private cloud. - * + * Delete a Addon. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param addonName Name of the addon for the private cloud. + * @param addonName Name of the addon. * @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. diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/AuthorizationsClient.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/AuthorizationsClient.java index 9e2932349aa10..a7e16f2f83b97 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/AuthorizationsClient.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/AuthorizationsClient.java @@ -13,73 +13,77 @@ import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.avs.fluent.models.ExpressRouteAuthorizationInner; -/** An instance of this class provides access to all the operations defined in AuthorizationsClient. */ +/** + * An instance of this class provides access to all the operations defined in AuthorizationsClient. + */ public interface AuthorizationsClient { /** - * List ExpressRoute Circuit Authorizations in a private cloud. - * + * List ExpressRouteAuthorization resources by PrivateCloud. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. * @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 a paged list of ExpressRoute Circuit Authorizations as paginated response with {@link PagedIterable}. + * @return the response of a ExpressRouteAuthorization list operation as paginated response with + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(String resourceGroupName, String privateCloudName); /** - * List ExpressRoute Circuit Authorizations in a private cloud. - * + * List ExpressRouteAuthorization resources by PrivateCloud. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. * @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 a paged list of ExpressRoute Circuit Authorizations as paginated response with {@link PagedIterable}. + * @return the response of a ExpressRouteAuthorization list operation as paginated response with + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list( - String resourceGroupName, String privateCloudName, Context context); + PagedIterable list(String resourceGroupName, String privateCloudName, + Context context); /** - * Get an ExpressRoute Circuit Authorization by name in a private cloud. - * + * Get a ExpressRouteAuthorization. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param authorizationName Name of the ExpressRoute Circuit Authorization in the private cloud. + * @param authorizationName Name of the ExpressRoute Circuit Authorization. * @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 an ExpressRoute Circuit Authorization by name in a private cloud along with {@link Response}. + * @return a ExpressRouteAuthorization along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String resourceGroupName, String privateCloudName, String authorizationName, Context context); + Response getWithResponse(String resourceGroupName, String privateCloudName, + String authorizationName, Context context); /** - * Get an ExpressRoute Circuit Authorization by name in a private cloud. - * + * Get a ExpressRouteAuthorization. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param authorizationName Name of the ExpressRoute Circuit Authorization in the private cloud. + * @param authorizationName Name of the ExpressRoute Circuit Authorization. * @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 an ExpressRoute Circuit Authorization by name in a private cloud. + * @return a ExpressRouteAuthorization. */ @ServiceMethod(returns = ReturnType.SINGLE) ExpressRouteAuthorizationInner get(String resourceGroupName, String privateCloudName, String authorizationName); /** - * Create or update an ExpressRoute Circuit Authorization in a private cloud. - * + * Create a ExpressRouteAuthorization. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName The name of the private cloud. - * @param authorizationName Name of the ExpressRoute Circuit Authorization in the private cloud. - * @param authorization An ExpressRoute Circuit Authorization. + * @param privateCloudName Name of the private cloud. + * @param authorizationName Name of the ExpressRoute Circuit Authorization. + * @param authorization Resource create parameters. * @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. @@ -87,18 +91,16 @@ Response getWithResponse( */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, ExpressRouteAuthorizationInner> beginCreateOrUpdate( - String resourceGroupName, - String privateCloudName, - String authorizationName, + String resourceGroupName, String privateCloudName, String authorizationName, ExpressRouteAuthorizationInner authorization); /** - * Create or update an ExpressRoute Circuit Authorization in a private cloud. - * + * Create a ExpressRouteAuthorization. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName The name of the private cloud. - * @param authorizationName Name of the ExpressRoute Circuit Authorization in the private cloud. - * @param authorization An ExpressRoute Circuit Authorization. + * @param privateCloudName Name of the private cloud. + * @param authorizationName Name of the ExpressRoute Circuit Authorization. + * @param authorization Resource create parameters. * @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. @@ -107,38 +109,32 @@ SyncPoller, ExpressRouteAuthorization */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, ExpressRouteAuthorizationInner> beginCreateOrUpdate( - String resourceGroupName, - String privateCloudName, - String authorizationName, - ExpressRouteAuthorizationInner authorization, - Context context); + String resourceGroupName, String privateCloudName, String authorizationName, + ExpressRouteAuthorizationInner authorization, Context context); /** - * Create or update an ExpressRoute Circuit Authorization in a private cloud. - * + * Create a ExpressRouteAuthorization. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName The name of the private cloud. - * @param authorizationName Name of the ExpressRoute Circuit Authorization in the private cloud. - * @param authorization An ExpressRoute Circuit Authorization. + * @param privateCloudName Name of the private cloud. + * @param authorizationName Name of the ExpressRoute Circuit Authorization. + * @param authorization Resource create parameters. * @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 expressRoute Circuit Authorization. */ @ServiceMethod(returns = ReturnType.SINGLE) - ExpressRouteAuthorizationInner createOrUpdate( - String resourceGroupName, - String privateCloudName, - String authorizationName, - ExpressRouteAuthorizationInner authorization); + ExpressRouteAuthorizationInner createOrUpdate(String resourceGroupName, String privateCloudName, + String authorizationName, ExpressRouteAuthorizationInner authorization); /** - * Create or update an ExpressRoute Circuit Authorization in a private cloud. - * + * Create a ExpressRouteAuthorization. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName The name of the private cloud. - * @param authorizationName Name of the ExpressRoute Circuit Authorization in the private cloud. - * @param authorization An ExpressRoute Circuit Authorization. + * @param privateCloudName Name of the private cloud. + * @param authorizationName Name of the ExpressRoute Circuit Authorization. + * @param authorization Resource create parameters. * @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. @@ -146,34 +142,30 @@ ExpressRouteAuthorizationInner createOrUpdate( * @return expressRoute Circuit Authorization. */ @ServiceMethod(returns = ReturnType.SINGLE) - ExpressRouteAuthorizationInner createOrUpdate( - String resourceGroupName, - String privateCloudName, - String authorizationName, - ExpressRouteAuthorizationInner authorization, - Context context); + ExpressRouteAuthorizationInner createOrUpdate(String resourceGroupName, String privateCloudName, + String authorizationName, ExpressRouteAuthorizationInner authorization, Context context); /** - * Delete an ExpressRoute Circuit Authorization in a private cloud. - * + * Delete a ExpressRouteAuthorization. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param authorizationName Name of the ExpressRoute Circuit Authorization in the private cloud. + * @param authorizationName Name of the ExpressRoute Circuit Authorization. * @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> beginDelete( - String resourceGroupName, String privateCloudName, String authorizationName); + SyncPoller, Void> beginDelete(String resourceGroupName, String privateCloudName, + String authorizationName); /** - * Delete an ExpressRoute Circuit Authorization in a private cloud. - * + * Delete a ExpressRouteAuthorization. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param authorizationName Name of the ExpressRoute Circuit Authorization in the private cloud. + * @param authorizationName Name of the ExpressRoute Circuit Authorization. * @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. @@ -181,15 +173,15 @@ SyncPoller, Void> beginDelete( * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete( - String resourceGroupName, String privateCloudName, String authorizationName, Context context); + SyncPoller, Void> beginDelete(String resourceGroupName, String privateCloudName, + String authorizationName, Context context); /** - * Delete an ExpressRoute Circuit Authorization in a private cloud. - * + * Delete a ExpressRouteAuthorization. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param authorizationName Name of the ExpressRoute Circuit Authorization in the private cloud. + * @param authorizationName Name of the ExpressRoute Circuit Authorization. * @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. @@ -198,11 +190,11 @@ SyncPoller, Void> beginDelete( void delete(String resourceGroupName, String privateCloudName, String authorizationName); /** - * Delete an ExpressRoute Circuit Authorization in a private cloud. - * + * Delete a ExpressRouteAuthorization. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param authorizationName Name of the ExpressRoute Circuit Authorization in the private cloud. + * @param authorizationName Name of the ExpressRoute Circuit Authorization. * @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. diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/AvsClient.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/AvsClient.java index ebb59f7de436d..c21c292eb9e4f 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/AvsClient.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/AvsClient.java @@ -7,152 +7,161 @@ import com.azure.core.http.HttpPipeline; import java.time.Duration; -/** The interface for AvsClient class. */ +/** + * The interface for AvsClient class. + */ public interface AvsClient { /** - * Gets The ID of the target subscription. - * + * Gets The ID of the target subscription. The value must be an UUID. + * * @return the subscriptionId value. */ String getSubscriptionId(); /** * Gets server parameter. - * + * * @return the endpoint value. */ String getEndpoint(); /** * Gets Api Version. - * + * * @return the apiVersion value. */ String getApiVersion(); /** * Gets The HTTP pipeline to send requests through. - * + * * @return the httpPipeline value. */ HttpPipeline getHttpPipeline(); /** * Gets The default poll interval for long-running operation. - * + * * @return the defaultPollInterval value. */ Duration getDefaultPollInterval(); /** * Gets the OperationsClient object to access its operations. - * + * * @return the OperationsClient object. */ OperationsClient getOperations(); /** * Gets the LocationsClient object to access its operations. - * + * * @return the LocationsClient object. */ LocationsClient getLocations(); /** * Gets the PrivateCloudsClient object to access its operations. - * + * * @return the PrivateCloudsClient object. */ PrivateCloudsClient getPrivateClouds(); + /** + * Gets the AddonsClient object to access its operations. + * + * @return the AddonsClient object. + */ + AddonsClient getAddons(); + + /** + * Gets the AuthorizationsClient object to access its operations. + * + * @return the AuthorizationsClient object. + */ + AuthorizationsClient getAuthorizations(); + + /** + * Gets the CloudLinksClient object to access its operations. + * + * @return the CloudLinksClient object. + */ + CloudLinksClient getCloudLinks(); + /** * Gets the ClustersClient object to access its operations. - * + * * @return the ClustersClient object. */ ClustersClient getClusters(); /** * Gets the DatastoresClient object to access its operations. - * + * * @return the DatastoresClient object. */ DatastoresClient getDatastores(); /** - * Gets the HcxEnterpriseSitesClient object to access its operations. - * - * @return the HcxEnterpriseSitesClient object. + * Gets the PlacementPoliciesClient object to access its operations. + * + * @return the PlacementPoliciesClient object. */ - HcxEnterpriseSitesClient getHcxEnterpriseSites(); + PlacementPoliciesClient getPlacementPolicies(); /** - * Gets the AuthorizationsClient object to access its operations. - * - * @return the AuthorizationsClient object. + * Gets the VirtualMachinesClient object to access its operations. + * + * @return the VirtualMachinesClient object. */ - AuthorizationsClient getAuthorizations(); + VirtualMachinesClient getVirtualMachines(); /** * Gets the GlobalReachConnectionsClient object to access its operations. - * + * * @return the GlobalReachConnectionsClient object. */ GlobalReachConnectionsClient getGlobalReachConnections(); /** - * Gets the WorkloadNetworksClient object to access its operations. - * - * @return the WorkloadNetworksClient object. - */ - WorkloadNetworksClient getWorkloadNetworks(); - - /** - * Gets the CloudLinksClient object to access its operations. - * - * @return the CloudLinksClient object. + * Gets the HcxEnterpriseSitesClient object to access its operations. + * + * @return the HcxEnterpriseSitesClient object. */ - CloudLinksClient getCloudLinks(); + HcxEnterpriseSitesClient getHcxEnterpriseSites(); /** - * Gets the AddonsClient object to access its operations. - * - * @return the AddonsClient object. + * Gets the IscsiPathsClient object to access its operations. + * + * @return the IscsiPathsClient object. */ - AddonsClient getAddons(); + IscsiPathsClient getIscsiPaths(); /** - * Gets the VirtualMachinesClient object to access its operations. - * - * @return the VirtualMachinesClient object. - */ - VirtualMachinesClient getVirtualMachines(); - - /** - * Gets the PlacementPoliciesClient object to access its operations. - * - * @return the PlacementPoliciesClient object. + * Gets the ScriptExecutionsClient object to access its operations. + * + * @return the ScriptExecutionsClient object. */ - PlacementPoliciesClient getPlacementPolicies(); + ScriptExecutionsClient getScriptExecutions(); /** * Gets the ScriptPackagesClient object to access its operations. - * + * * @return the ScriptPackagesClient object. */ ScriptPackagesClient getScriptPackages(); /** * Gets the ScriptCmdletsClient object to access its operations. - * + * * @return the ScriptCmdletsClient object. */ ScriptCmdletsClient getScriptCmdlets(); /** - * Gets the ScriptExecutionsClient object to access its operations. - * - * @return the ScriptExecutionsClient object. + * Gets the WorkloadNetworksClient object to access its operations. + * + * @return the WorkloadNetworksClient object. */ - ScriptExecutionsClient getScriptExecutions(); + WorkloadNetworksClient getWorkloadNetworks(); } diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/CloudLinksClient.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/CloudLinksClient.java index 026c015c4d458..b8cb20adc8e11 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/CloudLinksClient.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/CloudLinksClient.java @@ -13,88 +13,90 @@ import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.avs.fluent.models.CloudLinkInner; -/** An instance of this class provides access to all the operations defined in CloudLinksClient. */ +/** + * An instance of this class provides access to all the operations defined in CloudLinksClient. + */ public interface CloudLinksClient { /** - * List cloud link in a private cloud. - * + * List CloudLink resources by PrivateCloud. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. * @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 a paged list of cloud links as paginated response with {@link PagedIterable}. + * @return the response of a CloudLink list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(String resourceGroupName, String privateCloudName); /** - * List cloud link in a private cloud. - * + * List CloudLink resources by PrivateCloud. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. * @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 a paged list of cloud links as paginated response with {@link PagedIterable}. + * @return the response of a CloudLink list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(String resourceGroupName, String privateCloudName, Context context); /** - * Get an cloud link by name in a private cloud. - * + * Get a CloudLink. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param cloudLinkName Name of the cloud link resource. + * @param cloudLinkName Name of the cloud link. * @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 an cloud link by name in a private cloud along with {@link Response}. + * @return a CloudLink along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String resourceGroupName, String privateCloudName, String cloudLinkName, Context context); + Response getWithResponse(String resourceGroupName, String privateCloudName, String cloudLinkName, + Context context); /** - * Get an cloud link by name in a private cloud. - * + * Get a CloudLink. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param cloudLinkName Name of the cloud link resource. + * @param cloudLinkName Name of the cloud link. * @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 an cloud link by name in a private cloud. + * @return a CloudLink. */ @ServiceMethod(returns = ReturnType.SINGLE) CloudLinkInner get(String resourceGroupName, String privateCloudName, String cloudLinkName); /** - * Create or update a cloud link in a private cloud. - * + * Create a CloudLink. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName The name of the private cloud. - * @param cloudLinkName Name of the cloud link resource. - * @param cloudLink A cloud link in the private cloud. + * @param privateCloudName Name of the private cloud. + * @param cloudLinkName Name of the cloud link. + * @param cloudLink Resource create parameters. * @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 a cloud link resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, CloudLinkInner> beginCreateOrUpdate( - String resourceGroupName, String privateCloudName, String cloudLinkName, CloudLinkInner cloudLink); + SyncPoller, CloudLinkInner> beginCreateOrUpdate(String resourceGroupName, + String privateCloudName, String cloudLinkName, CloudLinkInner cloudLink); /** - * Create or update a cloud link in a private cloud. - * + * Create a CloudLink. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName The name of the private cloud. - * @param cloudLinkName Name of the cloud link resource. - * @param cloudLink A cloud link in the private cloud. + * @param privateCloudName Name of the private cloud. + * @param cloudLinkName Name of the cloud link. + * @param cloudLink Resource create parameters. * @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. @@ -102,36 +104,32 @@ SyncPoller, CloudLinkInner> beginCreateOrUpdate( * @return the {@link SyncPoller} for polling of a cloud link resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, CloudLinkInner> beginCreateOrUpdate( - String resourceGroupName, - String privateCloudName, - String cloudLinkName, - CloudLinkInner cloudLink, - Context context); + SyncPoller, CloudLinkInner> beginCreateOrUpdate(String resourceGroupName, + String privateCloudName, String cloudLinkName, CloudLinkInner cloudLink, Context context); /** - * Create or update a cloud link in a private cloud. - * + * Create a CloudLink. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName The name of the private cloud. - * @param cloudLinkName Name of the cloud link resource. - * @param cloudLink A cloud link in the private cloud. + * @param privateCloudName Name of the private cloud. + * @param cloudLinkName Name of the cloud link. + * @param cloudLink Resource create parameters. * @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 a cloud link resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - CloudLinkInner createOrUpdate( - String resourceGroupName, String privateCloudName, String cloudLinkName, CloudLinkInner cloudLink); + CloudLinkInner createOrUpdate(String resourceGroupName, String privateCloudName, String cloudLinkName, + CloudLinkInner cloudLink); /** - * Create or update a cloud link in a private cloud. - * + * Create a CloudLink. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName The name of the private cloud. - * @param cloudLinkName Name of the cloud link resource. - * @param cloudLink A cloud link in the private cloud. + * @param privateCloudName Name of the private cloud. + * @param cloudLinkName Name of the cloud link. + * @param cloudLink Resource create parameters. * @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. @@ -139,34 +137,30 @@ CloudLinkInner createOrUpdate( * @return a cloud link resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - CloudLinkInner createOrUpdate( - String resourceGroupName, - String privateCloudName, - String cloudLinkName, - CloudLinkInner cloudLink, - Context context); + CloudLinkInner createOrUpdate(String resourceGroupName, String privateCloudName, String cloudLinkName, + CloudLinkInner cloudLink, Context context); /** - * Delete a cloud link in a private cloud. - * + * Delete a CloudLink. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param cloudLinkName Name of the cloud link resource. + * @param cloudLinkName Name of the cloud link. * @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> beginDelete( - String resourceGroupName, String privateCloudName, String cloudLinkName); + SyncPoller, Void> beginDelete(String resourceGroupName, String privateCloudName, + String cloudLinkName); /** - * Delete a cloud link in a private cloud. - * + * Delete a CloudLink. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param cloudLinkName Name of the cloud link resource. + * @param cloudLinkName Name of the cloud link. * @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. @@ -174,15 +168,15 @@ SyncPoller, Void> beginDelete( * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete( - String resourceGroupName, String privateCloudName, String cloudLinkName, Context context); + SyncPoller, Void> beginDelete(String resourceGroupName, String privateCloudName, + String cloudLinkName, Context context); /** - * Delete a cloud link in a private cloud. - * + * Delete a CloudLink. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param cloudLinkName Name of the cloud link resource. + * @param cloudLinkName Name of the cloud link. * @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. @@ -191,11 +185,11 @@ SyncPoller, Void> beginDelete( void delete(String resourceGroupName, String privateCloudName, String cloudLinkName); /** - * Delete a cloud link in a private cloud. - * + * Delete a CloudLink. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param cloudLinkName Name of the cloud link resource. + * @param cloudLinkName Name of the cloud link. * @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. diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/ClustersClient.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/ClustersClient.java index 83152c1de1ef6..4dcbd4af4e200 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/ClustersClient.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/ClustersClient.java @@ -15,88 +15,90 @@ import com.azure.resourcemanager.avs.fluent.models.ClusterZoneListInner; import com.azure.resourcemanager.avs.models.ClusterUpdate; -/** An instance of this class provides access to all the operations defined in ClustersClient. */ +/** + * An instance of this class provides access to all the operations defined in ClustersClient. + */ public interface ClustersClient { /** - * List clusters in a private cloud. - * + * List Cluster resources by PrivateCloud. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. * @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 a paged list of clusters as paginated response with {@link PagedIterable}. + * @return the response of a Cluster list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(String resourceGroupName, String privateCloudName); /** - * List clusters in a private cloud. - * + * List Cluster resources by PrivateCloud. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. * @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 a paged list of clusters as paginated response with {@link PagedIterable}. + * @return the response of a Cluster list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(String resourceGroupName, String privateCloudName, Context context); /** - * Get a cluster by name in a private cloud. - * + * Get a Cluster. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param clusterName Name of the cluster in the private cloud. + * @param clusterName Name of the cluster. * @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 a cluster by name in a private cloud along with {@link Response}. + * @return a Cluster along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String resourceGroupName, String privateCloudName, String clusterName, Context context); + Response getWithResponse(String resourceGroupName, String privateCloudName, String clusterName, + Context context); /** - * Get a cluster by name in a private cloud. - * + * Get a Cluster. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param clusterName Name of the cluster in the private cloud. + * @param clusterName Name of the cluster. * @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 a cluster by name in a private cloud. + * @return a Cluster. */ @ServiceMethod(returns = ReturnType.SINGLE) ClusterInner get(String resourceGroupName, String privateCloudName, String clusterName); /** - * Create or update a cluster in a private cloud. - * + * Create a Cluster. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName The name of the private cloud. - * @param clusterName Name of the cluster in the private cloud. - * @param cluster A cluster in the private cloud. + * @param privateCloudName Name of the private cloud. + * @param clusterName Name of the cluster. + * @param cluster Resource create parameters. * @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 a cluster resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, ClusterInner> beginCreateOrUpdate( - String resourceGroupName, String privateCloudName, String clusterName, ClusterInner cluster); + SyncPoller, ClusterInner> beginCreateOrUpdate(String resourceGroupName, + String privateCloudName, String clusterName, ClusterInner cluster); /** - * Create or update a cluster in a private cloud. - * + * Create a Cluster. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName The name of the private cloud. - * @param clusterName Name of the cluster in the private cloud. - * @param cluster A cluster in the private cloud. + * @param privateCloudName Name of the private cloud. + * @param clusterName Name of the cluster. + * @param cluster Resource create parameters. * @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. @@ -104,32 +106,32 @@ SyncPoller, ClusterInner> beginCreateOrUpdate( * @return the {@link SyncPoller} for polling of a cluster resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, ClusterInner> beginCreateOrUpdate( - String resourceGroupName, String privateCloudName, String clusterName, ClusterInner cluster, Context context); + SyncPoller, ClusterInner> beginCreateOrUpdate(String resourceGroupName, + String privateCloudName, String clusterName, ClusterInner cluster, Context context); /** - * Create or update a cluster in a private cloud. - * + * Create a Cluster. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName The name of the private cloud. - * @param clusterName Name of the cluster in the private cloud. - * @param cluster A cluster in the private cloud. + * @param privateCloudName Name of the private cloud. + * @param clusterName Name of the cluster. + * @param cluster Resource create parameters. * @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 a cluster resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - ClusterInner createOrUpdate( - String resourceGroupName, String privateCloudName, String clusterName, ClusterInner cluster); + ClusterInner createOrUpdate(String resourceGroupName, String privateCloudName, String clusterName, + ClusterInner cluster); /** - * Create or update a cluster in a private cloud. - * + * Create a Cluster. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName The name of the private cloud. - * @param clusterName Name of the cluster in the private cloud. - * @param cluster A cluster in the private cloud. + * @param privateCloudName Name of the private cloud. + * @param clusterName Name of the cluster. + * @param cluster Resource create parameters. * @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. @@ -137,15 +139,15 @@ ClusterInner createOrUpdate( * @return a cluster resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - ClusterInner createOrUpdate( - String resourceGroupName, String privateCloudName, String clusterName, ClusterInner cluster, Context context); + ClusterInner createOrUpdate(String resourceGroupName, String privateCloudName, String clusterName, + ClusterInner cluster, Context context); /** - * Update a cluster in a private cloud. - * + * Update a Cluster. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param clusterName Name of the cluster in the private cloud. + * @param clusterName Name of the cluster. * @param clusterUpdate The cluster properties to be updated. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -153,15 +155,15 @@ ClusterInner createOrUpdate( * @return the {@link SyncPoller} for polling of a cluster resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, ClusterInner> beginUpdate( - String resourceGroupName, String privateCloudName, String clusterName, ClusterUpdate clusterUpdate); + SyncPoller, ClusterInner> beginUpdate(String resourceGroupName, String privateCloudName, + String clusterName, ClusterUpdate clusterUpdate); /** - * Update a cluster in a private cloud. - * + * Update a Cluster. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param clusterName Name of the cluster in the private cloud. + * @param clusterName Name of the cluster. * @param clusterUpdate The cluster properties to be updated. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -170,19 +172,15 @@ SyncPoller, ClusterInner> beginUpdate( * @return the {@link SyncPoller} for polling of a cluster resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, ClusterInner> beginUpdate( - String resourceGroupName, - String privateCloudName, - String clusterName, - ClusterUpdate clusterUpdate, - Context context); + SyncPoller, ClusterInner> beginUpdate(String resourceGroupName, String privateCloudName, + String clusterName, ClusterUpdate clusterUpdate, Context context); /** - * Update a cluster in a private cloud. - * + * Update a Cluster. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param clusterName Name of the cluster in the private cloud. + * @param clusterName Name of the cluster. * @param clusterUpdate The cluster properties to be updated. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -190,15 +188,15 @@ SyncPoller, ClusterInner> beginUpdate( * @return a cluster resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - ClusterInner update( - String resourceGroupName, String privateCloudName, String clusterName, ClusterUpdate clusterUpdate); + ClusterInner update(String resourceGroupName, String privateCloudName, String clusterName, + ClusterUpdate clusterUpdate); /** - * Update a cluster in a private cloud. - * + * Update a Cluster. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param clusterName Name of the cluster in the private cloud. + * @param clusterName Name of the cluster. * @param clusterUpdate The cluster properties to be updated. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -207,34 +205,30 @@ ClusterInner update( * @return a cluster resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - ClusterInner update( - String resourceGroupName, - String privateCloudName, - String clusterName, - ClusterUpdate clusterUpdate, - Context context); + ClusterInner update(String resourceGroupName, String privateCloudName, String clusterName, + ClusterUpdate clusterUpdate, Context context); /** - * Delete a cluster in a private cloud. - * + * Delete a Cluster. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param clusterName Name of the cluster in the private cloud. + * @param clusterName Name of the cluster. * @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> beginDelete( - String resourceGroupName, String privateCloudName, String clusterName); + SyncPoller, Void> beginDelete(String resourceGroupName, String privateCloudName, + String clusterName); /** - * Delete a cluster in a private cloud. - * + * Delete a Cluster. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param clusterName Name of the cluster in the private cloud. + * @param clusterName Name of the cluster. * @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. @@ -242,15 +236,15 @@ SyncPoller, Void> beginDelete( * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete( - String resourceGroupName, String privateCloudName, String clusterName, Context context); + SyncPoller, Void> beginDelete(String resourceGroupName, String privateCloudName, + String clusterName, Context context); /** - * Delete a cluster in a private cloud. - * + * Delete a Cluster. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param clusterName Name of the cluster in the private cloud. + * @param clusterName Name of the cluster. * @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. @@ -259,11 +253,11 @@ SyncPoller, Void> beginDelete( void delete(String resourceGroupName, String privateCloudName, String clusterName); /** - * Delete a cluster in a private cloud. - * + * Delete a Cluster. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param clusterName Name of the cluster in the private cloud. + * @param clusterName Name of the cluster. * @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. @@ -274,10 +268,10 @@ SyncPoller, Void> beginDelete( /** * List hosts by zone in a cluster. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param clusterName Name of the cluster in the private cloud. + * @param clusterName Name of the cluster. * @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. @@ -285,15 +279,15 @@ SyncPoller, Void> beginDelete( * @return list of all zones and associated hosts for a cluster along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response listZonesWithResponse( - String resourceGroupName, String privateCloudName, String clusterName, Context context); + Response listZonesWithResponse(String resourceGroupName, String privateCloudName, + String clusterName, Context context); /** * List hosts by zone in a cluster. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param clusterName Name of the cluster in the private cloud. + * @param clusterName Name of the cluster. * @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. diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/DatastoresClient.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/DatastoresClient.java index e295cc467074b..327061fc2d0c9 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/DatastoresClient.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/DatastoresClient.java @@ -13,99 +13,97 @@ import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.avs.fluent.models.DatastoreInner; -/** An instance of this class provides access to all the operations defined in DatastoresClient. */ +/** + * An instance of this class provides access to all the operations defined in DatastoresClient. + */ public interface DatastoresClient { /** - * List datastores in a private cloud cluster. - * + * List Datastore resources by Cluster. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param clusterName Name of the cluster in the private cloud. + * @param clusterName Name of the cluster. * @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 a paged list of datastores as paginated response with {@link PagedIterable}. + * @return the response of a Datastore list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(String resourceGroupName, String privateCloudName, String clusterName); /** - * List datastores in a private cloud cluster. - * + * List Datastore resources by Cluster. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param clusterName Name of the cluster in the private cloud. + * @param clusterName Name of the cluster. * @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 a paged list of datastores as paginated response with {@link PagedIterable}. + * @return the response of a Datastore list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list( - String resourceGroupName, String privateCloudName, String clusterName, Context context); + PagedIterable list(String resourceGroupName, String privateCloudName, String clusterName, + Context context); /** - * Get a datastore in a private cloud cluster. - * + * Get a Datastore. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param clusterName Name of the cluster in the private cloud. - * @param datastoreName Name of the datastore in the private cloud cluster. + * @param clusterName Name of the cluster. + * @param datastoreName Name of the datastore. * @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 a datastore in a private cloud cluster along with {@link Response}. + * @return a Datastore along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String resourceGroupName, String privateCloudName, String clusterName, String datastoreName, Context context); + Response getWithResponse(String resourceGroupName, String privateCloudName, String clusterName, + String datastoreName, Context context); /** - * Get a datastore in a private cloud cluster. - * + * Get a Datastore. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param clusterName Name of the cluster in the private cloud. - * @param datastoreName Name of the datastore in the private cloud cluster. + * @param clusterName Name of the cluster. + * @param datastoreName Name of the datastore. * @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 a datastore in a private cloud cluster. + * @return a Datastore. */ @ServiceMethod(returns = ReturnType.SINGLE) DatastoreInner get(String resourceGroupName, String privateCloudName, String clusterName, String datastoreName); /** - * Create or update a datastore in a private cloud cluster. - * + * Create a Datastore. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param clusterName Name of the cluster in the private cloud. - * @param datastoreName Name of the datastore in the private cloud cluster. - * @param datastore A datastore in a private cloud cluster. + * @param clusterName Name of the cluster. + * @param datastoreName Name of the datastore. + * @param datastore Resource create parameters. * @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 a datastore resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, DatastoreInner> beginCreateOrUpdate( - String resourceGroupName, - String privateCloudName, - String clusterName, - String datastoreName, - DatastoreInner datastore); + SyncPoller, DatastoreInner> beginCreateOrUpdate(String resourceGroupName, + String privateCloudName, String clusterName, String datastoreName, DatastoreInner datastore); /** - * Create or update a datastore in a private cloud cluster. - * + * Create a Datastore. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param clusterName Name of the cluster in the private cloud. - * @param datastoreName Name of the datastore in the private cloud cluster. - * @param datastore A datastore in a private cloud cluster. + * @param clusterName Name of the cluster. + * @param datastoreName Name of the datastore. + * @param datastore Resource create parameters. * @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. @@ -113,43 +111,34 @@ SyncPoller, DatastoreInner> beginCreateOrUpdate( * @return the {@link SyncPoller} for polling of a datastore resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, DatastoreInner> beginCreateOrUpdate( - String resourceGroupName, - String privateCloudName, - String clusterName, - String datastoreName, - DatastoreInner datastore, - Context context); + SyncPoller, DatastoreInner> beginCreateOrUpdate(String resourceGroupName, + String privateCloudName, String clusterName, String datastoreName, DatastoreInner datastore, Context context); /** - * Create or update a datastore in a private cloud cluster. - * + * Create a Datastore. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param clusterName Name of the cluster in the private cloud. - * @param datastoreName Name of the datastore in the private cloud cluster. - * @param datastore A datastore in a private cloud cluster. + * @param clusterName Name of the cluster. + * @param datastoreName Name of the datastore. + * @param datastore Resource create parameters. * @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 a datastore resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - DatastoreInner createOrUpdate( - String resourceGroupName, - String privateCloudName, - String clusterName, - String datastoreName, - DatastoreInner datastore); + DatastoreInner createOrUpdate(String resourceGroupName, String privateCloudName, String clusterName, + String datastoreName, DatastoreInner datastore); /** - * Create or update a datastore in a private cloud cluster. - * + * Create a Datastore. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param clusterName Name of the cluster in the private cloud. - * @param datastoreName Name of the datastore in the private cloud cluster. - * @param datastore A datastore in a private cloud cluster. + * @param clusterName Name of the cluster. + * @param datastoreName Name of the datastore. + * @param datastore Resource create parameters. * @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. @@ -157,37 +146,32 @@ DatastoreInner createOrUpdate( * @return a datastore resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - DatastoreInner createOrUpdate( - String resourceGroupName, - String privateCloudName, - String clusterName, - String datastoreName, - DatastoreInner datastore, - Context context); + DatastoreInner createOrUpdate(String resourceGroupName, String privateCloudName, String clusterName, + String datastoreName, DatastoreInner datastore, Context context); /** - * Delete a datastore in a private cloud cluster. - * + * Delete a Datastore. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param clusterName Name of the cluster in the private cloud. - * @param datastoreName Name of the datastore in the private cloud cluster. + * @param clusterName Name of the cluster. + * @param datastoreName Name of the datastore. * @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> beginDelete( - String resourceGroupName, String privateCloudName, String clusterName, String datastoreName); + SyncPoller, Void> beginDelete(String resourceGroupName, String privateCloudName, + String clusterName, String datastoreName); /** - * Delete a datastore in a private cloud cluster. - * + * Delete a Datastore. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param clusterName Name of the cluster in the private cloud. - * @param datastoreName Name of the datastore in the private cloud cluster. + * @param clusterName Name of the cluster. + * @param datastoreName Name of the datastore. * @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. @@ -195,16 +179,16 @@ SyncPoller, Void> beginDelete( * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete( - String resourceGroupName, String privateCloudName, String clusterName, String datastoreName, Context context); + SyncPoller, Void> beginDelete(String resourceGroupName, String privateCloudName, + String clusterName, String datastoreName, Context context); /** - * Delete a datastore in a private cloud cluster. - * + * Delete a Datastore. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param clusterName Name of the cluster in the private cloud. - * @param datastoreName Name of the datastore in the private cloud cluster. + * @param clusterName Name of the cluster. + * @param datastoreName Name of the datastore. * @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. @@ -213,18 +197,18 @@ SyncPoller, Void> beginDelete( void delete(String resourceGroupName, String privateCloudName, String clusterName, String datastoreName); /** - * Delete a datastore in a private cloud cluster. - * + * Delete a Datastore. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param clusterName Name of the cluster in the private cloud. - * @param datastoreName Name of the datastore in the private cloud cluster. + * @param clusterName Name of the cluster. + * @param datastoreName Name of the datastore. * @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 delete( - String resourceGroupName, String privateCloudName, String clusterName, String datastoreName, Context context); + void delete(String resourceGroupName, String privateCloudName, String clusterName, String datastoreName, + Context context); } diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/GlobalReachConnectionsClient.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/GlobalReachConnectionsClient.java index 96c635ed10c7a..ce9a7351d72bc 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/GlobalReachConnectionsClient.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/GlobalReachConnectionsClient.java @@ -13,72 +13,74 @@ import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.avs.fluent.models.GlobalReachConnectionInner; -/** An instance of this class provides access to all the operations defined in GlobalReachConnectionsClient. */ +/** + * An instance of this class provides access to all the operations defined in GlobalReachConnectionsClient. + */ public interface GlobalReachConnectionsClient { /** - * List global reach connections in a private cloud. - * + * List GlobalReachConnection resources by PrivateCloud. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. * @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 a paged list of global reach connections as paginated response with {@link PagedIterable}. + * @return the response of a GlobalReachConnection list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(String resourceGroupName, String privateCloudName); /** - * List global reach connections in a private cloud. - * + * List GlobalReachConnection resources by PrivateCloud. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. * @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 a paged list of global reach connections as paginated response with {@link PagedIterable}. + * @return the response of a GlobalReachConnection list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(String resourceGroupName, String privateCloudName, Context context); /** - * Get a global reach connection by name in a private cloud. - * + * Get a GlobalReachConnection. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param globalReachConnectionName Name of the global reach connection in the private cloud. + * @param globalReachConnectionName Name of the global reach connection. * @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 a global reach connection by name in a private cloud along with {@link Response}. + * @return a GlobalReachConnection along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String resourceGroupName, String privateCloudName, String globalReachConnectionName, Context context); + Response getWithResponse(String resourceGroupName, String privateCloudName, + String globalReachConnectionName, Context context); /** - * Get a global reach connection by name in a private cloud. - * + * Get a GlobalReachConnection. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param globalReachConnectionName Name of the global reach connection in the private cloud. + * @param globalReachConnectionName Name of the global reach connection. * @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 a global reach connection by name in a private cloud. + * @return a GlobalReachConnection. */ @ServiceMethod(returns = ReturnType.SINGLE) GlobalReachConnectionInner get(String resourceGroupName, String privateCloudName, String globalReachConnectionName); /** - * Create or update a global reach connection in a private cloud. - * + * Create a GlobalReachConnection. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName The name of the private cloud. - * @param globalReachConnectionName Name of the global reach connection in the private cloud. - * @param globalReachConnection A global reach connection in the private cloud. + * @param privateCloudName Name of the private cloud. + * @param globalReachConnectionName Name of the global reach connection. + * @param globalReachConnection Resource create parameters. * @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. @@ -86,18 +88,16 @@ Response getWithResponse( */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, GlobalReachConnectionInner> beginCreateOrUpdate( - String resourceGroupName, - String privateCloudName, - String globalReachConnectionName, + String resourceGroupName, String privateCloudName, String globalReachConnectionName, GlobalReachConnectionInner globalReachConnection); /** - * Create or update a global reach connection in a private cloud. - * + * Create a GlobalReachConnection. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName The name of the private cloud. - * @param globalReachConnectionName Name of the global reach connection in the private cloud. - * @param globalReachConnection A global reach connection in the private cloud. + * @param privateCloudName Name of the private cloud. + * @param globalReachConnectionName Name of the global reach connection. + * @param globalReachConnection Resource create parameters. * @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. @@ -106,38 +106,32 @@ SyncPoller, GlobalReachConnectionInner> b */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, GlobalReachConnectionInner> beginCreateOrUpdate( - String resourceGroupName, - String privateCloudName, - String globalReachConnectionName, - GlobalReachConnectionInner globalReachConnection, - Context context); + String resourceGroupName, String privateCloudName, String globalReachConnectionName, + GlobalReachConnectionInner globalReachConnection, Context context); /** - * Create or update a global reach connection in a private cloud. - * + * Create a GlobalReachConnection. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName The name of the private cloud. - * @param globalReachConnectionName Name of the global reach connection in the private cloud. - * @param globalReachConnection A global reach connection in the private cloud. + * @param privateCloudName Name of the private cloud. + * @param globalReachConnectionName Name of the global reach connection. + * @param globalReachConnection Resource create parameters. * @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 a global reach connection resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - GlobalReachConnectionInner createOrUpdate( - String resourceGroupName, - String privateCloudName, - String globalReachConnectionName, - GlobalReachConnectionInner globalReachConnection); + GlobalReachConnectionInner createOrUpdate(String resourceGroupName, String privateCloudName, + String globalReachConnectionName, GlobalReachConnectionInner globalReachConnection); /** - * Create or update a global reach connection in a private cloud. - * + * Create a GlobalReachConnection. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName The name of the private cloud. - * @param globalReachConnectionName Name of the global reach connection in the private cloud. - * @param globalReachConnection A global reach connection in the private cloud. + * @param privateCloudName Name of the private cloud. + * @param globalReachConnectionName Name of the global reach connection. + * @param globalReachConnection Resource create parameters. * @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. @@ -145,34 +139,30 @@ GlobalReachConnectionInner createOrUpdate( * @return a global reach connection resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - GlobalReachConnectionInner createOrUpdate( - String resourceGroupName, - String privateCloudName, - String globalReachConnectionName, - GlobalReachConnectionInner globalReachConnection, - Context context); + GlobalReachConnectionInner createOrUpdate(String resourceGroupName, String privateCloudName, + String globalReachConnectionName, GlobalReachConnectionInner globalReachConnection, Context context); /** - * Delete a global reach connection in a private cloud. - * + * Delete a GlobalReachConnection. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param globalReachConnectionName Name of the global reach connection in the private cloud. + * @param globalReachConnectionName Name of the global reach connection. * @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> beginDelete( - String resourceGroupName, String privateCloudName, String globalReachConnectionName); + SyncPoller, Void> beginDelete(String resourceGroupName, String privateCloudName, + String globalReachConnectionName); /** - * Delete a global reach connection in a private cloud. - * + * Delete a GlobalReachConnection. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param globalReachConnectionName Name of the global reach connection in the private cloud. + * @param globalReachConnectionName Name of the global reach connection. * @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. @@ -180,15 +170,15 @@ SyncPoller, Void> beginDelete( * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete( - String resourceGroupName, String privateCloudName, String globalReachConnectionName, Context context); + SyncPoller, Void> beginDelete(String resourceGroupName, String privateCloudName, + String globalReachConnectionName, Context context); /** - * Delete a global reach connection in a private cloud. - * + * Delete a GlobalReachConnection. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param globalReachConnectionName Name of the global reach connection in the private cloud. + * @param globalReachConnectionName Name of the global reach connection. * @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. @@ -197,11 +187,11 @@ SyncPoller, Void> beginDelete( void delete(String resourceGroupName, String privateCloudName, String globalReachConnectionName); /** - * Delete a global reach connection in a private cloud. - * + * Delete a GlobalReachConnection. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param globalReachConnectionName Name of the global reach connection in the private cloud. + * @param globalReachConnectionName Name of the global reach connection. * @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. diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/HcxEnterpriseSitesClient.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/HcxEnterpriseSitesClient.java index c5259dc758d7e..63409fe329fd7 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/HcxEnterpriseSitesClient.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/HcxEnterpriseSitesClient.java @@ -11,72 +11,74 @@ import com.azure.core.util.Context; import com.azure.resourcemanager.avs.fluent.models.HcxEnterpriseSiteInner; -/** An instance of this class provides access to all the operations defined in HcxEnterpriseSitesClient. */ +/** + * An instance of this class provides access to all the operations defined in HcxEnterpriseSitesClient. + */ public interface HcxEnterpriseSitesClient { /** - * List HCX on-premises key in a private cloud. - * + * List HcxEnterpriseSite resources by PrivateCloud. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. * @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 a paged list of HCX Enterprise Sites as paginated response with {@link PagedIterable}. + * @return the response of a HcxEnterpriseSite list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(String resourceGroupName, String privateCloudName); /** - * List HCX on-premises key in a private cloud. - * + * List HcxEnterpriseSite resources by PrivateCloud. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. * @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 a paged list of HCX Enterprise Sites as paginated response with {@link PagedIterable}. + * @return the response of a HcxEnterpriseSite list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(String resourceGroupName, String privateCloudName, Context context); /** - * Get an HCX on-premises key by name in a private cloud. - * + * Get a HcxEnterpriseSite. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param hcxEnterpriseSiteName Name of the HCX Enterprise Site in the private cloud. + * @param hcxEnterpriseSiteName Name of the HCX Enterprise Site. * @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 an HCX on-premises key by name in a private cloud along with {@link Response}. + * @return a HcxEnterpriseSite along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String resourceGroupName, String privateCloudName, String hcxEnterpriseSiteName, Context context); + Response getWithResponse(String resourceGroupName, String privateCloudName, + String hcxEnterpriseSiteName, Context context); /** - * Get an HCX on-premises key by name in a private cloud. - * + * Get a HcxEnterpriseSite. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param hcxEnterpriseSiteName Name of the HCX Enterprise Site in the private cloud. + * @param hcxEnterpriseSiteName Name of the HCX Enterprise Site. * @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 an HCX on-premises key by name in a private cloud. + * @return a HcxEnterpriseSite. */ @ServiceMethod(returns = ReturnType.SINGLE) HcxEnterpriseSiteInner get(String resourceGroupName, String privateCloudName, String hcxEnterpriseSiteName); /** - * Create or update an activation key for on-premises HCX site. - * + * Create a HcxEnterpriseSite. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName The name of the private cloud. - * @param hcxEnterpriseSiteName Name of the HCX Enterprise Site in the private cloud. - * @param hcxEnterpriseSite The HCX Enterprise Site. + * @param privateCloudName Name of the private cloud. + * @param hcxEnterpriseSiteName Name of the HCX Enterprise Site. + * @param hcxEnterpriseSite Resource create parameters. * @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. @@ -84,38 +86,31 @@ Response getWithResponse( * @return an HCX Enterprise Site resource along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response createOrUpdateWithResponse( - String resourceGroupName, - String privateCloudName, - String hcxEnterpriseSiteName, - HcxEnterpriseSiteInner hcxEnterpriseSite, - Context context); + Response createOrUpdateWithResponse(String resourceGroupName, String privateCloudName, + String hcxEnterpriseSiteName, HcxEnterpriseSiteInner hcxEnterpriseSite, Context context); /** - * Create or update an activation key for on-premises HCX site. - * + * Create a HcxEnterpriseSite. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName The name of the private cloud. - * @param hcxEnterpriseSiteName Name of the HCX Enterprise Site in the private cloud. - * @param hcxEnterpriseSite The HCX Enterprise Site. + * @param privateCloudName Name of the private cloud. + * @param hcxEnterpriseSiteName Name of the HCX Enterprise Site. + * @param hcxEnterpriseSite Resource create parameters. * @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 an HCX Enterprise Site resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - HcxEnterpriseSiteInner createOrUpdate( - String resourceGroupName, - String privateCloudName, - String hcxEnterpriseSiteName, - HcxEnterpriseSiteInner hcxEnterpriseSite); + HcxEnterpriseSiteInner createOrUpdate(String resourceGroupName, String privateCloudName, + String hcxEnterpriseSiteName, HcxEnterpriseSiteInner hcxEnterpriseSite); /** - * Delete HCX on-premises key in a private cloud. - * + * Delete a HcxEnterpriseSite. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param hcxEnterpriseSiteName Name of the HCX Enterprise Site in the private cloud. + * @param hcxEnterpriseSiteName Name of the HCX Enterprise Site. * @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. @@ -123,15 +118,15 @@ HcxEnterpriseSiteInner createOrUpdate( * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response deleteWithResponse( - String resourceGroupName, String privateCloudName, String hcxEnterpriseSiteName, Context context); + Response deleteWithResponse(String resourceGroupName, String privateCloudName, String hcxEnterpriseSiteName, + Context context); /** - * Delete HCX on-premises key in a private cloud. - * + * Delete a HcxEnterpriseSite. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param hcxEnterpriseSiteName Name of the HCX Enterprise Site in the private cloud. + * @param hcxEnterpriseSiteName Name of the HCX Enterprise Site. * @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. diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/IscsiPathsClient.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/IscsiPathsClient.java new file mode 100644 index 0000000000000..43d5ec7ade272 --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/IscsiPathsClient.java @@ -0,0 +1,187 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.avs.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.avs.fluent.models.IscsiPathInner; + +/** + * An instance of this class provides access to all the operations defined in IscsiPathsClient. + */ +public interface IscsiPathsClient { + /** + * List IscsiPath resources by PrivateCloud. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @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 response of a IscsiPath list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByPrivateCloud(String resourceGroupName, String privateCloudName); + + /** + * List IscsiPath resources by PrivateCloud. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @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 response of a IscsiPath list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByPrivateCloud(String resourceGroupName, String privateCloudName, + Context context); + + /** + * Get a IscsiPath. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @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 a IscsiPath along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse(String resourceGroupName, String privateCloudName, Context context); + + /** + * Get a IscsiPath. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @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 a IscsiPath. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + IscsiPathInner get(String resourceGroupName, String privateCloudName); + + /** + * Create a IscsiPath. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param resource Resource create parameters. + * @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 an iSCSI path resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, IscsiPathInner> beginCreateOrUpdate(String resourceGroupName, + String privateCloudName, IscsiPathInner resource); + + /** + * Create a IscsiPath. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param resource Resource create parameters. + * @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 an iSCSI path resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, IscsiPathInner> beginCreateOrUpdate(String resourceGroupName, + String privateCloudName, IscsiPathInner resource, Context context); + + /** + * Create a IscsiPath. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param resource Resource create parameters. + * @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 an iSCSI path resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + IscsiPathInner createOrUpdate(String resourceGroupName, String privateCloudName, IscsiPathInner resource); + + /** + * Create a IscsiPath. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param resource Resource create parameters. + * @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 an iSCSI path resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + IscsiPathInner createOrUpdate(String resourceGroupName, String privateCloudName, IscsiPathInner resource, + Context context); + + /** + * Delete a IscsiPath. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @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> beginDelete(String resourceGroupName, String privateCloudName); + + /** + * Delete a IscsiPath. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @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> beginDelete(String resourceGroupName, String privateCloudName, Context context); + + /** + * Delete a IscsiPath. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @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 privateCloudName); + + /** + * Delete a IscsiPath. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @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 delete(String resourceGroupName, String privateCloudName, Context context); +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/LocationsClient.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/LocationsClient.java index 949b1697d0c74..387314e8244c9 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/LocationsClient.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/LocationsClient.java @@ -12,56 +12,58 @@ import com.azure.resourcemanager.avs.fluent.models.TrialInner; import com.azure.resourcemanager.avs.models.Sku; -/** An instance of this class provides access to all the operations defined in LocationsClient. */ +/** + * An instance of this class provides access to all the operations defined in LocationsClient. + */ public interface LocationsClient { /** - * Return trial status for subscription by region. - * - * @param location Azure region. - * @param sku The sku to check for trial availability. + * Return quota for subscription by region. + * + * @param location The name of the Azure region. * @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 subscription trial availability along with {@link Response}. + * @return subscription quotas along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response checkTrialAvailabilityWithResponse(String location, Sku sku, Context context); + Response checkQuotaAvailabilityWithResponse(String location, Context context); /** - * Return trial status for subscription by region. - * - * @param location Azure region. + * Return quota for subscription by region. + * + * @param location The name of the Azure region. * @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 subscription trial availability. + * @return subscription quotas. */ @ServiceMethod(returns = ReturnType.SINGLE) - TrialInner checkTrialAvailability(String location); + QuotaInner checkQuotaAvailability(String location); /** - * Return quota for subscription by region. - * - * @param location Azure region. + * Return trial status for subscription by region. + * + * @param location The name of the Azure region. + * @param sku Optionally, check for a specific SKU. * @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 subscription quotas along with {@link Response}. + * @return subscription trial availability along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response checkQuotaAvailabilityWithResponse(String location, Context context); + Response checkTrialAvailabilityWithResponse(String location, Sku sku, Context context); /** - * Return quota for subscription by region. - * - * @param location Azure region. + * Return trial status for subscription by region. + * + * @param location The name of the Azure region. * @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 subscription quotas. + * @return subscription trial availability. */ @ServiceMethod(returns = ReturnType.SINGLE) - QuotaInner checkQuotaAvailability(String location); + TrialInner checkTrialAvailability(String location); } diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/OperationsClient.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/OperationsClient.java index 9161726093afc..5cdf6176912ba 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/OperationsClient.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/OperationsClient.java @@ -10,26 +10,30 @@ import com.azure.core.util.Context; import com.azure.resourcemanager.avs.fluent.models.OperationInner; -/** An instance of this class provides access to all the operations defined in OperationsClient. */ +/** + * An instance of this class provides access to all the operations defined in OperationsClient. + */ public interface OperationsClient { /** - * Lists all of the available operations. - * + * List the operations for the provider. + * * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return pageable list of operations as paginated response with {@link PagedIterable}. + * @return a list of REST API operations supported by an Azure Resource Provider as paginated response with + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(); /** - * Lists all of the available operations. - * + * List the operations for the provider. + * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return pageable list of operations as paginated response with {@link PagedIterable}. + * @return a list of REST API operations supported by an Azure Resource Provider as paginated response with + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(Context context); diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/PlacementPoliciesClient.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/PlacementPoliciesClient.java index 906606c62608a..1053a2e7d306f 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/PlacementPoliciesClient.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/PlacementPoliciesClient.java @@ -14,104 +14,98 @@ import com.azure.resourcemanager.avs.fluent.models.PlacementPolicyInner; import com.azure.resourcemanager.avs.models.PlacementPolicyUpdate; -/** An instance of this class provides access to all the operations defined in PlacementPoliciesClient. */ +/** + * An instance of this class provides access to all the operations defined in PlacementPoliciesClient. + */ public interface PlacementPoliciesClient { /** - * List placement policies in a private cloud cluster. - * + * List PlacementPolicy resources by Cluster. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param clusterName Name of the cluster in the private cloud. + * @param clusterName Name of the cluster. * @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 represents list of placement policies as paginated response with {@link PagedIterable}. + * @return the response of a PlacementPolicy list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(String resourceGroupName, String privateCloudName, String clusterName); /** - * List placement policies in a private cloud cluster. - * + * List PlacementPolicy resources by Cluster. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param clusterName Name of the cluster in the private cloud. + * @param clusterName Name of the cluster. * @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 represents list of placement policies as paginated response with {@link PagedIterable}. + * @return the response of a PlacementPolicy list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list( - String resourceGroupName, String privateCloudName, String clusterName, Context context); + PagedIterable list(String resourceGroupName, String privateCloudName, String clusterName, + Context context); /** - * Get a placement policy by name in a private cloud cluster. - * + * Get a PlacementPolicy. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param clusterName Name of the cluster in the private cloud. - * @param placementPolicyName Name of the VMware vSphere Distributed Resource Scheduler (DRS) placement policy. + * @param clusterName Name of the cluster. + * @param placementPolicyName Name of the placement policy. * @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 a placement policy by name in a private cloud cluster along with {@link Response}. + * @return a PlacementPolicy along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String resourceGroupName, - String privateCloudName, - String clusterName, - String placementPolicyName, - Context context); + Response getWithResponse(String resourceGroupName, String privateCloudName, + String clusterName, String placementPolicyName, Context context); /** - * Get a placement policy by name in a private cloud cluster. - * + * Get a PlacementPolicy. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param clusterName Name of the cluster in the private cloud. - * @param placementPolicyName Name of the VMware vSphere Distributed Resource Scheduler (DRS) placement policy. + * @param clusterName Name of the cluster. + * @param placementPolicyName Name of the placement policy. * @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 a placement policy by name in a private cloud cluster. + * @return a PlacementPolicy. */ @ServiceMethod(returns = ReturnType.SINGLE) - PlacementPolicyInner get( - String resourceGroupName, String privateCloudName, String clusterName, String placementPolicyName); + PlacementPolicyInner get(String resourceGroupName, String privateCloudName, String clusterName, + String placementPolicyName); /** - * Create or update a placement policy in a private cloud cluster. - * + * Create a PlacementPolicy. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param clusterName Name of the cluster in the private cloud. - * @param placementPolicyName Name of the VMware vSphere Distributed Resource Scheduler (DRS) placement policy. - * @param placementPolicy A placement policy in the private cloud cluster. + * @param clusterName Name of the cluster. + * @param placementPolicyName Name of the placement policy. + * @param placementPolicy Resource create parameters. * @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 a vSphere Distributed Resource Scheduler (DRS) placement policy. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, PlacementPolicyInner> beginCreateOrUpdate( - String resourceGroupName, - String privateCloudName, - String clusterName, - String placementPolicyName, - PlacementPolicyInner placementPolicy); + SyncPoller, PlacementPolicyInner> beginCreateOrUpdate(String resourceGroupName, + String privateCloudName, String clusterName, String placementPolicyName, PlacementPolicyInner placementPolicy); /** - * Create or update a placement policy in a private cloud cluster. - * + * Create a PlacementPolicy. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param clusterName Name of the cluster in the private cloud. - * @param placementPolicyName Name of the VMware vSphere Distributed Resource Scheduler (DRS) placement policy. - * @param placementPolicy A placement policy in the private cloud cluster. + * @param clusterName Name of the cluster. + * @param placementPolicyName Name of the placement policy. + * @param placementPolicy Resource create parameters. * @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. @@ -119,43 +113,35 @@ SyncPoller, PlacementPolicyInner> beginCreateOr * @return the {@link SyncPoller} for polling of a vSphere Distributed Resource Scheduler (DRS) placement policy. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, PlacementPolicyInner> beginCreateOrUpdate( - String resourceGroupName, - String privateCloudName, - String clusterName, - String placementPolicyName, - PlacementPolicyInner placementPolicy, + SyncPoller, PlacementPolicyInner> beginCreateOrUpdate(String resourceGroupName, + String privateCloudName, String clusterName, String placementPolicyName, PlacementPolicyInner placementPolicy, Context context); /** - * Create or update a placement policy in a private cloud cluster. - * + * Create a PlacementPolicy. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param clusterName Name of the cluster in the private cloud. - * @param placementPolicyName Name of the VMware vSphere Distributed Resource Scheduler (DRS) placement policy. - * @param placementPolicy A placement policy in the private cloud cluster. + * @param clusterName Name of the cluster. + * @param placementPolicyName Name of the placement policy. + * @param placementPolicy Resource create parameters. * @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 a vSphere Distributed Resource Scheduler (DRS) placement policy. */ @ServiceMethod(returns = ReturnType.SINGLE) - PlacementPolicyInner createOrUpdate( - String resourceGroupName, - String privateCloudName, - String clusterName, - String placementPolicyName, - PlacementPolicyInner placementPolicy); + PlacementPolicyInner createOrUpdate(String resourceGroupName, String privateCloudName, String clusterName, + String placementPolicyName, PlacementPolicyInner placementPolicy); /** - * Create or update a placement policy in a private cloud cluster. - * + * Create a PlacementPolicy. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param clusterName Name of the cluster in the private cloud. - * @param placementPolicyName Name of the VMware vSphere Distributed Resource Scheduler (DRS) placement policy. - * @param placementPolicy A placement policy in the private cloud cluster. + * @param clusterName Name of the cluster. + * @param placementPolicyName Name of the placement policy. + * @param placementPolicy Resource create parameters. * @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. @@ -163,43 +149,35 @@ PlacementPolicyInner createOrUpdate( * @return a vSphere Distributed Resource Scheduler (DRS) placement policy. */ @ServiceMethod(returns = ReturnType.SINGLE) - PlacementPolicyInner createOrUpdate( - String resourceGroupName, - String privateCloudName, - String clusterName, - String placementPolicyName, - PlacementPolicyInner placementPolicy, - Context context); + PlacementPolicyInner createOrUpdate(String resourceGroupName, String privateCloudName, String clusterName, + String placementPolicyName, PlacementPolicyInner placementPolicy, Context context); /** - * Update a placement policy in a private cloud cluster. - * + * Update a PlacementPolicy. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param clusterName Name of the cluster in the private cloud. - * @param placementPolicyName Name of the VMware vSphere Distributed Resource Scheduler (DRS) placement policy. - * @param placementPolicyUpdate The placement policy properties that may be updated. + * @param clusterName Name of the cluster. + * @param placementPolicyName Name of the placement policy. + * @param placementPolicyUpdate The placement policy properties to be updated. * @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 a vSphere Distributed Resource Scheduler (DRS) placement policy. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, PlacementPolicyInner> beginUpdate( - String resourceGroupName, - String privateCloudName, - String clusterName, - String placementPolicyName, + SyncPoller, PlacementPolicyInner> beginUpdate(String resourceGroupName, + String privateCloudName, String clusterName, String placementPolicyName, PlacementPolicyUpdate placementPolicyUpdate); /** - * Update a placement policy in a private cloud cluster. - * + * Update a PlacementPolicy. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param clusterName Name of the cluster in the private cloud. - * @param placementPolicyName Name of the VMware vSphere Distributed Resource Scheduler (DRS) placement policy. - * @param placementPolicyUpdate The placement policy properties that may be updated. + * @param clusterName Name of the cluster. + * @param placementPolicyName Name of the placement policy. + * @param placementPolicyUpdate The placement policy properties to be updated. * @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. @@ -207,43 +185,35 @@ SyncPoller, PlacementPolicyInner> beginUpdate( * @return the {@link SyncPoller} for polling of a vSphere Distributed Resource Scheduler (DRS) placement policy. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, PlacementPolicyInner> beginUpdate( - String resourceGroupName, - String privateCloudName, - String clusterName, - String placementPolicyName, - PlacementPolicyUpdate placementPolicyUpdate, - Context context); + SyncPoller, PlacementPolicyInner> beginUpdate(String resourceGroupName, + String privateCloudName, String clusterName, String placementPolicyName, + PlacementPolicyUpdate placementPolicyUpdate, Context context); /** - * Update a placement policy in a private cloud cluster. - * + * Update a PlacementPolicy. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param clusterName Name of the cluster in the private cloud. - * @param placementPolicyName Name of the VMware vSphere Distributed Resource Scheduler (DRS) placement policy. - * @param placementPolicyUpdate The placement policy properties that may be updated. + * @param clusterName Name of the cluster. + * @param placementPolicyName Name of the placement policy. + * @param placementPolicyUpdate The placement policy properties to be updated. * @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 a vSphere Distributed Resource Scheduler (DRS) placement policy. */ @ServiceMethod(returns = ReturnType.SINGLE) - PlacementPolicyInner update( - String resourceGroupName, - String privateCloudName, - String clusterName, - String placementPolicyName, - PlacementPolicyUpdate placementPolicyUpdate); + PlacementPolicyInner update(String resourceGroupName, String privateCloudName, String clusterName, + String placementPolicyName, PlacementPolicyUpdate placementPolicyUpdate); /** - * Update a placement policy in a private cloud cluster. - * + * Update a PlacementPolicy. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param clusterName Name of the cluster in the private cloud. - * @param placementPolicyName Name of the VMware vSphere Distributed Resource Scheduler (DRS) placement policy. - * @param placementPolicyUpdate The placement policy properties that may be updated. + * @param clusterName Name of the cluster. + * @param placementPolicyName Name of the placement policy. + * @param placementPolicyUpdate The placement policy properties to be updated. * @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. @@ -251,37 +221,32 @@ PlacementPolicyInner update( * @return a vSphere Distributed Resource Scheduler (DRS) placement policy. */ @ServiceMethod(returns = ReturnType.SINGLE) - PlacementPolicyInner update( - String resourceGroupName, - String privateCloudName, - String clusterName, - String placementPolicyName, - PlacementPolicyUpdate placementPolicyUpdate, - Context context); + PlacementPolicyInner update(String resourceGroupName, String privateCloudName, String clusterName, + String placementPolicyName, PlacementPolicyUpdate placementPolicyUpdate, Context context); /** - * Delete a placement policy in a private cloud cluster. - * + * Delete a PlacementPolicy. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param clusterName Name of the cluster in the private cloud. - * @param placementPolicyName Name of the VMware vSphere Distributed Resource Scheduler (DRS) placement policy. + * @param clusterName Name of the cluster. + * @param placementPolicyName Name of the placement policy. * @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> beginDelete( - String resourceGroupName, String privateCloudName, String clusterName, String placementPolicyName); + SyncPoller, Void> beginDelete(String resourceGroupName, String privateCloudName, + String clusterName, String placementPolicyName); /** - * Delete a placement policy in a private cloud cluster. - * + * Delete a PlacementPolicy. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param clusterName Name of the cluster in the private cloud. - * @param placementPolicyName Name of the VMware vSphere Distributed Resource Scheduler (DRS) placement policy. + * @param clusterName Name of the cluster. + * @param placementPolicyName Name of the placement policy. * @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. @@ -289,20 +254,16 @@ SyncPoller, Void> beginDelete( * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete( - String resourceGroupName, - String privateCloudName, - String clusterName, - String placementPolicyName, - Context context); + SyncPoller, Void> beginDelete(String resourceGroupName, String privateCloudName, + String clusterName, String placementPolicyName, Context context); /** - * Delete a placement policy in a private cloud cluster. - * + * Delete a PlacementPolicy. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param clusterName Name of the cluster in the private cloud. - * @param placementPolicyName Name of the VMware vSphere Distributed Resource Scheduler (DRS) placement policy. + * @param clusterName Name of the cluster. + * @param placementPolicyName Name of the placement policy. * @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. @@ -311,22 +272,18 @@ SyncPoller, Void> beginDelete( void delete(String resourceGroupName, String privateCloudName, String clusterName, String placementPolicyName); /** - * Delete a placement policy in a private cloud cluster. - * + * Delete a PlacementPolicy. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param clusterName Name of the cluster in the private cloud. - * @param placementPolicyName Name of the VMware vSphere Distributed Resource Scheduler (DRS) placement policy. + * @param clusterName Name of the cluster. + * @param placementPolicyName Name of the placement policy. * @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 delete( - String resourceGroupName, - String privateCloudName, - String clusterName, - String placementPolicyName, + void delete(String resourceGroupName, String privateCloudName, String clusterName, String placementPolicyName, Context context); } diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/PrivateCloudsClient.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/PrivateCloudsClient.java index 35bb4483977c2..749f3460f4f54 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/PrivateCloudsClient.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/PrivateCloudsClient.java @@ -15,104 +15,106 @@ import com.azure.resourcemanager.avs.fluent.models.PrivateCloudInner; import com.azure.resourcemanager.avs.models.PrivateCloudUpdate; -/** An instance of this class provides access to all the operations defined in PrivateCloudsClient. */ +/** + * An instance of this class provides access to all the operations defined in PrivateCloudsClient. + */ public interface PrivateCloudsClient { /** - * List private clouds in a resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. + * List PrivateCloud resources by subscription ID. + * * @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 a paged list of private clouds as paginated response with {@link PagedIterable}. + * @return the response of a PrivateCloud list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByResourceGroup(String resourceGroupName); + PagedIterable list(); /** - * List private clouds in a resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * List PrivateCloud resources by subscription ID. + * * @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 a paged list of private clouds as paginated response with {@link PagedIterable}. + * @return the response of a PrivateCloud list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByResourceGroup(String resourceGroupName, Context context); + PagedIterable list(Context context); /** - * List private clouds in a subscription. - * + * List PrivateCloud resources by 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 a paged list of private clouds as paginated response with {@link PagedIterable}. + * @return the response of a PrivateCloud list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(); + PagedIterable listByResourceGroup(String resourceGroupName); /** - * List private clouds in a subscription. - * + * List PrivateCloud resources by 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 a paged list of private clouds as paginated response with {@link PagedIterable}. + * @return the response of a PrivateCloud list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(Context context); + PagedIterable listByResourceGroup(String resourceGroupName, Context context); /** - * Get a private cloud. - * + * Get a PrivateCloud. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. * @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 a private cloud along with {@link Response}. + * @return a PrivateCloud along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getByResourceGroupWithResponse( - String resourceGroupName, String privateCloudName, Context context); + Response getByResourceGroupWithResponse(String resourceGroupName, String privateCloudName, + Context context); /** - * Get a private cloud. - * + * Get a PrivateCloud. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. * @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 a private cloud. + * @return a PrivateCloud. */ @ServiceMethod(returns = ReturnType.SINGLE) PrivateCloudInner getByResourceGroup(String resourceGroupName, String privateCloudName); /** - * Create or update a private cloud. - * + * Create a PrivateCloud. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param privateCloud The private cloud. + * @param privateCloud Resource create parameters. * @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 a private cloud resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, PrivateCloudInner> beginCreateOrUpdate( - String resourceGroupName, String privateCloudName, PrivateCloudInner privateCloud); + SyncPoller, PrivateCloudInner> beginCreateOrUpdate(String resourceGroupName, + String privateCloudName, PrivateCloudInner privateCloud); /** - * Create or update a private cloud. - * + * Create a PrivateCloud. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param privateCloud The private cloud. + * @param privateCloud Resource create parameters. * @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. @@ -120,15 +122,15 @@ SyncPoller, PrivateCloudInner> beginCreateOrUpdate * @return the {@link SyncPoller} for polling of a private cloud resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, PrivateCloudInner> beginCreateOrUpdate( - String resourceGroupName, String privateCloudName, PrivateCloudInner privateCloud, Context context); + SyncPoller, PrivateCloudInner> beginCreateOrUpdate(String resourceGroupName, + String privateCloudName, PrivateCloudInner privateCloud, Context context); /** - * Create or update a private cloud. - * + * Create a PrivateCloud. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param privateCloud The private cloud. + * @param privateCloud Resource create parameters. * @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. @@ -138,11 +140,11 @@ SyncPoller, PrivateCloudInner> beginCreateOrUpdate PrivateCloudInner createOrUpdate(String resourceGroupName, String privateCloudName, PrivateCloudInner privateCloud); /** - * Create or update a private cloud. - * + * Create a PrivateCloud. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param privateCloud The private cloud. + * @param privateCloud Resource create parameters. * @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. @@ -150,12 +152,12 @@ SyncPoller, PrivateCloudInner> beginCreateOrUpdate * @return a private cloud resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - PrivateCloudInner createOrUpdate( - String resourceGroupName, String privateCloudName, PrivateCloudInner privateCloud, Context context); + PrivateCloudInner createOrUpdate(String resourceGroupName, String privateCloudName, PrivateCloudInner privateCloud, + Context context); /** - * Update a private cloud. - * + * Update a PrivateCloud. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. * @param privateCloudUpdate The private cloud properties to be updated. @@ -165,12 +167,12 @@ PrivateCloudInner createOrUpdate( * @return the {@link SyncPoller} for polling of a private cloud resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, PrivateCloudInner> beginUpdate( - String resourceGroupName, String privateCloudName, PrivateCloudUpdate privateCloudUpdate); + SyncPoller, PrivateCloudInner> beginUpdate(String resourceGroupName, + String privateCloudName, PrivateCloudUpdate privateCloudUpdate); /** - * Update a private cloud. - * + * Update a PrivateCloud. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. * @param privateCloudUpdate The private cloud properties to be updated. @@ -181,12 +183,12 @@ SyncPoller, PrivateCloudInner> beginUpdate( * @return the {@link SyncPoller} for polling of a private cloud resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, PrivateCloudInner> beginUpdate( - String resourceGroupName, String privateCloudName, PrivateCloudUpdate privateCloudUpdate, Context context); + SyncPoller, PrivateCloudInner> beginUpdate(String resourceGroupName, + String privateCloudName, PrivateCloudUpdate privateCloudUpdate, Context context); /** - * Update a private cloud. - * + * Update a PrivateCloud. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. * @param privateCloudUpdate The private cloud properties to be updated. @@ -199,8 +201,8 @@ SyncPoller, PrivateCloudInner> beginUpdate( PrivateCloudInner update(String resourceGroupName, String privateCloudName, PrivateCloudUpdate privateCloudUpdate); /** - * Update a private cloud. - * + * Update a PrivateCloud. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. * @param privateCloudUpdate The private cloud properties to be updated. @@ -211,12 +213,12 @@ SyncPoller, PrivateCloudInner> beginUpdate( * @return a private cloud resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - PrivateCloudInner update( - String resourceGroupName, String privateCloudName, PrivateCloudUpdate privateCloudUpdate, Context context); + PrivateCloudInner update(String resourceGroupName, String privateCloudName, PrivateCloudUpdate privateCloudUpdate, + Context context); /** - * Delete a private cloud. - * + * Delete a PrivateCloud. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -228,8 +230,8 @@ PrivateCloudInner update( SyncPoller, Void> beginDelete(String resourceGroupName, String privateCloudName); /** - * Delete a private cloud. - * + * Delete a PrivateCloud. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. * @param context The context to associate with this operation. @@ -242,8 +244,8 @@ PrivateCloudInner update( SyncPoller, Void> beginDelete(String resourceGroupName, String privateCloudName, Context context); /** - * Delete a private cloud. - * + * Delete a PrivateCloud. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -254,8 +256,8 @@ PrivateCloudInner update( void delete(String resourceGroupName, String privateCloudName); /** - * Delete a private cloud. - * + * Delete a PrivateCloud. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. * @param context The context to associate with this operation. @@ -267,136 +269,136 @@ PrivateCloudInner update( void delete(String resourceGroupName, String privateCloudName, Context context); /** - * Rotate the vCenter password. - * + * List the admin credentials for the private cloud. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @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. + * @return administrative credentials for accessing vCenter and NSX-T along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginRotateVcenterPassword(String resourceGroupName, String privateCloudName); + @ServiceMethod(returns = ReturnType.SINGLE) + Response listAdminCredentialsWithResponse(String resourceGroupName, String privateCloudName, + Context context); /** - * Rotate the vCenter password. - * + * List the admin credentials for the private cloud. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @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. + * @return administrative credentials for accessing vCenter and NSX-T. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginRotateVcenterPassword( - String resourceGroupName, String privateCloudName, Context context); + @ServiceMethod(returns = ReturnType.SINGLE) + AdminCredentialsInner listAdminCredentials(String resourceGroupName, String privateCloudName); /** - * Rotate the vCenter password. - * + * Rotate the NSX-T Manager password. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. * @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.SINGLE) - void rotateVcenterPassword(String resourceGroupName, String privateCloudName); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginRotateNsxtPassword(String resourceGroupName, String privateCloudName); /** - * Rotate the vCenter password. - * + * Rotate the NSX-T Manager password. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. * @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.SINGLE) - void rotateVcenterPassword(String resourceGroupName, String privateCloudName, Context context); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginRotateNsxtPassword(String resourceGroupName, String privateCloudName, + Context context); /** * Rotate the NSX-T Manager password. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. * @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> beginRotateNsxtPassword(String resourceGroupName, String privateCloudName); + @ServiceMethod(returns = ReturnType.SINGLE) + void rotateNsxtPassword(String resourceGroupName, String privateCloudName); /** * Rotate the NSX-T Manager password. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. * @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> beginRotateNsxtPassword( - String resourceGroupName, String privateCloudName, Context context); + @ServiceMethod(returns = ReturnType.SINGLE) + void rotateNsxtPassword(String resourceGroupName, String privateCloudName, Context context); /** - * Rotate the NSX-T Manager password. - * + * Rotate the vCenter password. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. * @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.SINGLE) - void rotateNsxtPassword(String resourceGroupName, String privateCloudName); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginRotateVcenterPassword(String resourceGroupName, String privateCloudName); /** - * Rotate the NSX-T Manager password. - * + * Rotate the vCenter password. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. * @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.SINGLE) - void rotateNsxtPassword(String resourceGroupName, String privateCloudName, Context context); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginRotateVcenterPassword(String resourceGroupName, String privateCloudName, + Context context); /** - * List the admin credentials for the private cloud. - * + * Rotate the vCenter password. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @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 administrative credentials for accessing vCenter and NSX-T along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response listAdminCredentialsWithResponse( - String resourceGroupName, String privateCloudName, Context context); + void rotateVcenterPassword(String resourceGroupName, String privateCloudName); /** - * List the admin credentials for the private cloud. - * + * Rotate the vCenter password. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @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 administrative credentials for accessing vCenter and NSX-T. */ @ServiceMethod(returns = ReturnType.SINGLE) - AdminCredentialsInner listAdminCredentials(String resourceGroupName, String privateCloudName); + void rotateVcenterPassword(String resourceGroupName, String privateCloudName, Context context); } diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/ScriptCmdletsClient.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/ScriptCmdletsClient.java index dcd10a29ff642..1cd9ca32de8db 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/ScriptCmdletsClient.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/ScriptCmdletsClient.java @@ -11,74 +11,70 @@ import com.azure.core.util.Context; import com.azure.resourcemanager.avs.fluent.models.ScriptCmdletInner; -/** An instance of this class provides access to all the operations defined in ScriptCmdletsClient. */ +/** + * An instance of this class provides access to all the operations defined in ScriptCmdletsClient. + */ public interface ScriptCmdletsClient { /** - * List script cmdlet resources available for a private cloud to create a script execution resource on a private - * cloud. - * + * List ScriptCmdlet resources by ScriptPackage. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param scriptPackageName Name of the script package in the private cloud. + * @param scriptPackageName Name of the script package. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return pageable list of scripts/cmdlets as paginated response with {@link PagedIterable}. + * @return the response of a ScriptCmdlet list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(String resourceGroupName, String privateCloudName, String scriptPackageName); /** - * List script cmdlet resources available for a private cloud to create a script execution resource on a private - * cloud. - * + * List ScriptCmdlet resources by ScriptPackage. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param scriptPackageName Name of the script package in the private cloud. + * @param scriptPackageName Name of the script package. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return pageable list of scripts/cmdlets as paginated response with {@link PagedIterable}. + * @return the response of a ScriptCmdlet list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list( - String resourceGroupName, String privateCloudName, String scriptPackageName, Context context); + PagedIterable list(String resourceGroupName, String privateCloudName, String scriptPackageName, + Context context); /** - * Return information about a script cmdlet resource in a specific package on a private cloud. - * + * Get a ScriptCmdlet. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param scriptPackageName Name of the script package in the private cloud. - * @param scriptCmdletName Name of the script cmdlet resource in the script package in the private cloud. + * @param scriptPackageName Name of the script package. + * @param scriptCmdletName Name of the script cmdlet. * @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 a cmdlet available for script execution along with {@link Response}. + * @return a ScriptCmdlet along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String resourceGroupName, - String privateCloudName, - String scriptPackageName, - String scriptCmdletName, - Context context); + Response getWithResponse(String resourceGroupName, String privateCloudName, + String scriptPackageName, String scriptCmdletName, Context context); /** - * Return information about a script cmdlet resource in a specific package on a private cloud. - * + * Get a ScriptCmdlet. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param scriptPackageName Name of the script package in the private cloud. - * @param scriptCmdletName Name of the script cmdlet resource in the script package in the private cloud. + * @param scriptPackageName Name of the script package. + * @param scriptCmdletName Name of the script cmdlet. * @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 a cmdlet available for script execution. + * @return a ScriptCmdlet. */ @ServiceMethod(returns = ReturnType.SINGLE) - ScriptCmdletInner get( - String resourceGroupName, String privateCloudName, String scriptPackageName, String scriptCmdletName); + ScriptCmdletInner get(String resourceGroupName, String privateCloudName, String scriptPackageName, + String scriptCmdletName); } diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/ScriptExecutionsClient.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/ScriptExecutionsClient.java index 3771d9787c94f..f4776b2d7f700 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/ScriptExecutionsClient.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/ScriptExecutionsClient.java @@ -15,91 +15,90 @@ import com.azure.resourcemanager.avs.models.ScriptOutputStreamType; import java.util.List; -/** An instance of this class provides access to all the operations defined in ScriptExecutionsClient. */ +/** + * An instance of this class provides access to all the operations defined in ScriptExecutionsClient. + */ public interface ScriptExecutionsClient { /** - * List script executions in a private cloud. - * + * List ScriptExecution resources by PrivateCloud. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return pageable list of script executions as paginated response with {@link PagedIterable}. + * @return the response of a ScriptExecution list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(String resourceGroupName, String privateCloudName); /** - * List script executions in a private cloud. - * + * List ScriptExecution resources by PrivateCloud. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return pageable list of script executions as paginated response with {@link PagedIterable}. + * @return the response of a ScriptExecution list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(String resourceGroupName, String privateCloudName, Context context); /** - * Get an script execution by name in a private cloud. - * + * Get a ScriptExecution. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param scriptExecutionName Name of the user-invoked script execution resource. + * @param scriptExecutionName Name of the script cmdlet. * @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 an script execution by name in a private cloud along with {@link Response}. + * @return a ScriptExecution along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String resourceGroupName, String privateCloudName, String scriptExecutionName, Context context); + Response getWithResponse(String resourceGroupName, String privateCloudName, + String scriptExecutionName, Context context); /** - * Get an script execution by name in a private cloud. - * + * Get a ScriptExecution. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param scriptExecutionName Name of the user-invoked script execution resource. + * @param scriptExecutionName Name of the script cmdlet. * @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 an script execution by name in a private cloud. + * @return a ScriptExecution. */ @ServiceMethod(returns = ReturnType.SINGLE) ScriptExecutionInner get(String resourceGroupName, String privateCloudName, String scriptExecutionName); /** - * Create or update a script execution in a private cloud. - * + * Create a ScriptExecution. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName The name of the private cloud. - * @param scriptExecutionName Name of the user-invoked script execution resource. - * @param scriptExecution A script running in the private cloud. + * @param privateCloudName Name of the private cloud. + * @param scriptExecutionName Name of the script cmdlet. + * @param scriptExecution Resource create parameters. * @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 an instance of a script executed by a user - custom or AVS. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, ScriptExecutionInner> beginCreateOrUpdate( - String resourceGroupName, - String privateCloudName, - String scriptExecutionName, - ScriptExecutionInner scriptExecution); + SyncPoller, ScriptExecutionInner> beginCreateOrUpdate(String resourceGroupName, + String privateCloudName, String scriptExecutionName, ScriptExecutionInner scriptExecution); /** - * Create or update a script execution in a private cloud. - * + * Create a ScriptExecution. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName The name of the private cloud. - * @param scriptExecutionName Name of the user-invoked script execution resource. - * @param scriptExecution A script running in the private cloud. + * @param privateCloudName Name of the private cloud. + * @param scriptExecutionName Name of the script cmdlet. + * @param scriptExecution Resource create parameters. * @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. @@ -107,39 +106,32 @@ SyncPoller, ScriptExecutionInner> beginCreateOr * @return the {@link SyncPoller} for polling of an instance of a script executed by a user - custom or AVS. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, ScriptExecutionInner> beginCreateOrUpdate( - String resourceGroupName, - String privateCloudName, - String scriptExecutionName, - ScriptExecutionInner scriptExecution, - Context context); + SyncPoller, ScriptExecutionInner> beginCreateOrUpdate(String resourceGroupName, + String privateCloudName, String scriptExecutionName, ScriptExecutionInner scriptExecution, Context context); /** - * Create or update a script execution in a private cloud. - * + * Create a ScriptExecution. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName The name of the private cloud. - * @param scriptExecutionName Name of the user-invoked script execution resource. - * @param scriptExecution A script running in the private cloud. + * @param privateCloudName Name of the private cloud. + * @param scriptExecutionName Name of the script cmdlet. + * @param scriptExecution Resource create parameters. * @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 an instance of a script executed by a user - custom or AVS. */ @ServiceMethod(returns = ReturnType.SINGLE) - ScriptExecutionInner createOrUpdate( - String resourceGroupName, - String privateCloudName, - String scriptExecutionName, + ScriptExecutionInner createOrUpdate(String resourceGroupName, String privateCloudName, String scriptExecutionName, ScriptExecutionInner scriptExecution); /** - * Create or update a script execution in a private cloud. - * + * Create a ScriptExecution. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName The name of the private cloud. - * @param scriptExecutionName Name of the user-invoked script execution resource. - * @param scriptExecution A script running in the private cloud. + * @param privateCloudName Name of the private cloud. + * @param scriptExecutionName Name of the script cmdlet. + * @param scriptExecution Resource create parameters. * @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. @@ -147,34 +139,30 @@ ScriptExecutionInner createOrUpdate( * @return an instance of a script executed by a user - custom or AVS. */ @ServiceMethod(returns = ReturnType.SINGLE) - ScriptExecutionInner createOrUpdate( - String resourceGroupName, - String privateCloudName, - String scriptExecutionName, - ScriptExecutionInner scriptExecution, - Context context); + ScriptExecutionInner createOrUpdate(String resourceGroupName, String privateCloudName, String scriptExecutionName, + ScriptExecutionInner scriptExecution, Context context); /** - * Cancel a ScriptExecution in a private cloud. - * + * Delete a ScriptExecution. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param scriptExecutionName Name of the user-invoked script execution resource. + * @param scriptExecutionName Name of the script cmdlet. * @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> beginDelete( - String resourceGroupName, String privateCloudName, String scriptExecutionName); + SyncPoller, Void> beginDelete(String resourceGroupName, String privateCloudName, + String scriptExecutionName); /** - * Cancel a ScriptExecution in a private cloud. - * + * Delete a ScriptExecution. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param scriptExecutionName Name of the user-invoked script execution resource. + * @param scriptExecutionName Name of the script cmdlet. * @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. @@ -182,15 +170,15 @@ SyncPoller, Void> beginDelete( * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete( - String resourceGroupName, String privateCloudName, String scriptExecutionName, Context context); + SyncPoller, Void> beginDelete(String resourceGroupName, String privateCloudName, + String scriptExecutionName, Context context); /** - * Cancel a ScriptExecution in a private cloud. - * + * Delete a ScriptExecution. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param scriptExecutionName Name of the user-invoked script execution resource. + * @param scriptExecutionName Name of the script cmdlet. * @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. @@ -199,11 +187,11 @@ SyncPoller, Void> beginDelete( void delete(String resourceGroupName, String privateCloudName, String scriptExecutionName); /** - * Cancel a ScriptExecution in a private cloud. - * + * Delete a ScriptExecution. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param scriptExecutionName Name of the user-invoked script execution resource. + * @param scriptExecutionName Name of the script cmdlet. * @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. @@ -214,12 +202,12 @@ SyncPoller, Void> beginDelete( /** * Return the logs for a script execution resource. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param scriptExecutionName Name of the user-invoked script execution resource. + * @param scriptExecutionName Name of the script cmdlet. * @param scriptOutputStreamType Name of the desired output stream to return. If not provided, will return all. An - * empty array will return nothing. + * empty array will return nothing. * @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. @@ -227,25 +215,21 @@ SyncPoller, Void> beginDelete( * @return an instance of a script executed by a user - custom or AVS along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getExecutionLogsWithResponse( - String resourceGroupName, - String privateCloudName, - String scriptExecutionName, - List scriptOutputStreamType, - Context context); + Response getExecutionLogsWithResponse(String resourceGroupName, String privateCloudName, + String scriptExecutionName, List scriptOutputStreamType, Context context); /** * Return the logs for a script execution resource. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param scriptExecutionName Name of the user-invoked script execution resource. + * @param scriptExecutionName Name of the script cmdlet. * @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 an instance of a script executed by a user - custom or AVS. */ @ServiceMethod(returns = ReturnType.SINGLE) - ScriptExecutionInner getExecutionLogs( - String resourceGroupName, String privateCloudName, String scriptExecutionName); + ScriptExecutionInner getExecutionLogs(String resourceGroupName, String privateCloudName, + String scriptExecutionName); } diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/ScriptPackagesClient.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/ScriptPackagesClient.java index fc101fbe0aee8..b5b2ef561f8e3 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/ScriptPackagesClient.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/ScriptPackagesClient.java @@ -11,61 +11,63 @@ import com.azure.core.util.Context; import com.azure.resourcemanager.avs.fluent.models.ScriptPackageInner; -/** An instance of this class provides access to all the operations defined in ScriptPackagesClient. */ +/** + * An instance of this class provides access to all the operations defined in ScriptPackagesClient. + */ public interface ScriptPackagesClient { /** - * List script packages available to run on the private cloud. - * + * List ScriptPackage resources by PrivateCloud. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. * @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 a list of the available script packages as paginated response with {@link PagedIterable}. + * @return the response of a ScriptPackage list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(String resourceGroupName, String privateCloudName); /** - * List script packages available to run on the private cloud. - * + * List ScriptPackage resources by PrivateCloud. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. * @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 a list of the available script packages as paginated response with {@link PagedIterable}. + * @return the response of a ScriptPackage list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(String resourceGroupName, String privateCloudName, Context context); /** - * Get a script package available to run on a private cloud. - * + * Get a ScriptPackage. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param scriptPackageName Name of the script package in the private cloud. + * @param scriptPackageName Name of the script package. * @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 a script package available to run on a private cloud along with {@link Response}. + * @return a ScriptPackage along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String resourceGroupName, String privateCloudName, String scriptPackageName, Context context); + Response getWithResponse(String resourceGroupName, String privateCloudName, + String scriptPackageName, Context context); /** - * Get a script package available to run on a private cloud. - * + * Get a ScriptPackage. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param scriptPackageName Name of the script package in the private cloud. + * @param scriptPackageName Name of the script package. * @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 a script package available to run on a private cloud. + * @return a ScriptPackage. */ @ServiceMethod(returns = ReturnType.SINGLE) ScriptPackageInner get(String resourceGroupName, String privateCloudName, String scriptPackageName); diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/VirtualMachinesClient.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/VirtualMachinesClient.java index fc52260fdceed..3b7548a5c8ec4 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/VirtualMachinesClient.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/VirtualMachinesClient.java @@ -14,104 +14,98 @@ import com.azure.resourcemanager.avs.fluent.models.VirtualMachineInner; import com.azure.resourcemanager.avs.models.VirtualMachineRestrictMovement; -/** An instance of this class provides access to all the operations defined in VirtualMachinesClient. */ +/** + * An instance of this class provides access to all the operations defined in VirtualMachinesClient. + */ public interface VirtualMachinesClient { /** - * List of virtual machines in a private cloud cluster. - * + * List VirtualMachine resources by Cluster. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param clusterName Name of the cluster in the private cloud. + * @param clusterName Name of the cluster. * @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 a list of Virtual Machines as paginated response with {@link PagedIterable}. + * @return the response of a VirtualMachine list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(String resourceGroupName, String privateCloudName, String clusterName); /** - * List of virtual machines in a private cloud cluster. - * + * List VirtualMachine resources by Cluster. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param clusterName Name of the cluster in the private cloud. + * @param clusterName Name of the cluster. * @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 a list of Virtual Machines as paginated response with {@link PagedIterable}. + * @return the response of a VirtualMachine list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list( - String resourceGroupName, String privateCloudName, String clusterName, Context context); + PagedIterable list(String resourceGroupName, String privateCloudName, String clusterName, + Context context); /** - * Get a virtual machine by id in a private cloud cluster. - * + * Get a VirtualMachine. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param clusterName Name of the cluster in the private cloud. - * @param virtualMachineId Virtual Machine identifier. + * @param clusterName Name of the cluster. + * @param virtualMachineId ID of the virtual machine. * @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 a virtual machine by id in a private cloud cluster along with {@link Response}. + * @return a VirtualMachine along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String resourceGroupName, - String privateCloudName, - String clusterName, - String virtualMachineId, - Context context); + Response getWithResponse(String resourceGroupName, String privateCloudName, String clusterName, + String virtualMachineId, Context context); /** - * Get a virtual machine by id in a private cloud cluster. - * + * Get a VirtualMachine. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param clusterName Name of the cluster in the private cloud. - * @param virtualMachineId Virtual Machine identifier. + * @param clusterName Name of the cluster. + * @param virtualMachineId ID of the virtual machine. * @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 a virtual machine by id in a private cloud cluster. + * @return a VirtualMachine. */ @ServiceMethod(returns = ReturnType.SINGLE) - VirtualMachineInner get( - String resourceGroupName, String privateCloudName, String clusterName, String virtualMachineId); + VirtualMachineInner get(String resourceGroupName, String privateCloudName, String clusterName, + String virtualMachineId); /** * Enable or disable DRS-driven VM movement restriction. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param clusterName Name of the cluster in the private cloud. - * @param virtualMachineId Virtual Machine identifier. - * @param restrictMovement Whether VM DRS-driven movement is restricted (Enabled) or not (Disabled). + * @param clusterName Name of the cluster. + * @param virtualMachineId ID of the virtual machine. + * @param restrictMovement The body type of the operation request. * @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> beginRestrictMovement( - String resourceGroupName, - String privateCloudName, - String clusterName, - String virtualMachineId, - VirtualMachineRestrictMovement restrictMovement); + SyncPoller, Void> beginRestrictMovement(String resourceGroupName, String privateCloudName, + String clusterName, String virtualMachineId, VirtualMachineRestrictMovement restrictMovement); /** * Enable or disable DRS-driven VM movement restriction. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param clusterName Name of the cluster in the private cloud. - * @param virtualMachineId Virtual Machine identifier. - * @param restrictMovement Whether VM DRS-driven movement is restricted (Enabled) or not (Disabled). + * @param clusterName Name of the cluster. + * @param virtualMachineId ID of the virtual machine. + * @param restrictMovement The body type of the operation request. * @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. @@ -119,53 +113,39 @@ SyncPoller, Void> beginRestrictMovement( * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginRestrictMovement( - String resourceGroupName, - String privateCloudName, - String clusterName, - String virtualMachineId, - VirtualMachineRestrictMovement restrictMovement, - Context context); + SyncPoller, Void> beginRestrictMovement(String resourceGroupName, String privateCloudName, + String clusterName, String virtualMachineId, VirtualMachineRestrictMovement restrictMovement, Context context); /** * Enable or disable DRS-driven VM movement restriction. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param clusterName Name of the cluster in the private cloud. - * @param virtualMachineId Virtual Machine identifier. - * @param restrictMovement Whether VM DRS-driven movement is restricted (Enabled) or not (Disabled). + * @param clusterName Name of the cluster. + * @param virtualMachineId ID of the virtual machine. + * @param restrictMovement The body type of the operation request. * @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 restrictMovement( - String resourceGroupName, - String privateCloudName, - String clusterName, - String virtualMachineId, - VirtualMachineRestrictMovement restrictMovement); + void restrictMovement(String resourceGroupName, String privateCloudName, String clusterName, + String virtualMachineId, VirtualMachineRestrictMovement restrictMovement); /** * Enable or disable DRS-driven VM movement restriction. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param clusterName Name of the cluster in the private cloud. - * @param virtualMachineId Virtual Machine identifier. - * @param restrictMovement Whether VM DRS-driven movement is restricted (Enabled) or not (Disabled). + * @param clusterName Name of the cluster. + * @param virtualMachineId ID of the virtual machine. + * @param restrictMovement The body type of the operation request. * @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 restrictMovement( - String resourceGroupName, - String privateCloudName, - String clusterName, - String virtualMachineId, - VirtualMachineRestrictMovement restrictMovement, - Context context); + void restrictMovement(String resourceGroupName, String privateCloudName, String clusterName, + String virtualMachineId, VirtualMachineRestrictMovement restrictMovement, Context context); } diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/WorkloadNetworksClient.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/WorkloadNetworksClient.java index 51ede42b52bc2..35a855e113ddb 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/WorkloadNetworksClient.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/WorkloadNetworksClient.java @@ -21,307 +21,282 @@ import com.azure.resourcemanager.avs.fluent.models.WorkloadNetworkSegmentInner; import com.azure.resourcemanager.avs.fluent.models.WorkloadNetworkVMGroupInner; import com.azure.resourcemanager.avs.fluent.models.WorkloadNetworkVirtualMachineInner; -import com.azure.resourcemanager.avs.models.WorkloadNetworkName; - -/** An instance of this class provides access to all the operations defined in WorkloadNetworksClient. */ +import com.azure.resourcemanager.avs.models.WorkloadNetworkDhcpUpdate; +import com.azure.resourcemanager.avs.models.WorkloadNetworkDnsServiceUpdate; +import com.azure.resourcemanager.avs.models.WorkloadNetworkDnsZoneUpdate; +import com.azure.resourcemanager.avs.models.WorkloadNetworkPortMirroringUpdate; +import com.azure.resourcemanager.avs.models.WorkloadNetworkSegmentUpdate; +import com.azure.resourcemanager.avs.models.WorkloadNetworkVMGroupUpdate; + +/** + * An instance of this class provides access to all the operations defined in WorkloadNetworksClient. + */ public interface WorkloadNetworksClient { /** - * Get a private cloud workload network. - * + * List WorkloadNetwork resources by PrivateCloud. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param workloadNetworkName Name for the workload network in the private cloud. - * @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 a private cloud workload network along with {@link Response}. + * @return the response of a WorkloadNetwork list operation as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String resourceGroupName, String privateCloudName, WorkloadNetworkName workloadNetworkName, Context context); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String privateCloudName); /** - * Get a private cloud workload network. - * + * List WorkloadNetwork resources by PrivateCloud. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param workloadNetworkName Name for the workload network in the private cloud. + * @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 a private cloud workload network. + * @return the response of a WorkloadNetwork list operation as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - WorkloadNetworkInner get( - String resourceGroupName, String privateCloudName, WorkloadNetworkName workloadNetworkName); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String privateCloudName, Context context); /** - * List of workload networks in a private cloud. - * + * Get a WorkloadNetwork. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @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 a list of workload networks as paginated response with {@link PagedIterable}. + * @return a WorkloadNetwork along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String privateCloudName); + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse(String resourceGroupName, String privateCloudName, Context context); /** - * List of workload networks in a private cloud. - * + * Get a WorkloadNetwork. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @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 a list of workload networks as paginated response with {@link PagedIterable}. + * @return a WorkloadNetwork. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String privateCloudName, Context context); + @ServiceMethod(returns = ReturnType.SINGLE) + WorkloadNetworkInner get(String resourceGroupName, String privateCloudName); /** - * List of segments in a private cloud workload network. - * + * List WorkloadNetworkDhcp resources by WorkloadNetwork. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. * @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 a list of NSX Segments as paginated response with {@link PagedIterable}. + * @return the response of a WorkloadNetworkDhcp list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listSegments(String resourceGroupName, String privateCloudName); + PagedIterable listDhcp(String resourceGroupName, String privateCloudName); /** - * List of segments in a private cloud workload network. - * + * List WorkloadNetworkDhcp resources by WorkloadNetwork. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. * @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 a list of NSX Segments as paginated response with {@link PagedIterable}. + * @return the response of a WorkloadNetworkDhcp list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listSegments( - String resourceGroupName, String privateCloudName, Context context); + PagedIterable listDhcp(String resourceGroupName, String privateCloudName, + Context context); /** - * Get a segment by id in a private cloud workload network. - * + * Get a WorkloadNetworkDhcp. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dhcpId The ID of the DHCP configuration. * @param privateCloudName Name of the private cloud. - * @param segmentId NSX Segment identifier. Generally the same as the Segment's display name. * @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 a segment by id in a private cloud workload network along with {@link Response}. + * @return a WorkloadNetworkDhcp along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getSegmentWithResponse( - String resourceGroupName, String privateCloudName, String segmentId, Context context); + Response getDhcpWithResponse(String resourceGroupName, String dhcpId, + String privateCloudName, Context context); /** - * Get a segment by id in a private cloud workload network. - * + * Get a WorkloadNetworkDhcp. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dhcpId The ID of the DHCP configuration. * @param privateCloudName Name of the private cloud. - * @param segmentId NSX Segment identifier. Generally the same as the Segment's display name. * @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 a segment by id in a private cloud workload network. + * @return a WorkloadNetworkDhcp. */ @ServiceMethod(returns = ReturnType.SINGLE) - WorkloadNetworkSegmentInner getSegment(String resourceGroupName, String privateCloudName, String segmentId); + WorkloadNetworkDhcpInner getDhcp(String resourceGroupName, String dhcpId, String privateCloudName); /** - * Create a segment by id in a private cloud workload network. - * + * Create a WorkloadNetworkDhcp. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param segmentId NSX Segment identifier. Generally the same as the Segment's display name. - * @param workloadNetworkSegment NSX Segment. + * @param dhcpId The ID of the DHCP configuration. + * @param workloadNetworkDhcp Resource create parameters. * @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 nSX Segment. + * @return the {@link SyncPoller} for polling of nSX DHCP. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, WorkloadNetworkSegmentInner> beginCreateSegments( - String resourceGroupName, - String privateCloudName, - String segmentId, - WorkloadNetworkSegmentInner workloadNetworkSegment); + SyncPoller, WorkloadNetworkDhcpInner> beginCreateDhcp(String resourceGroupName, + String privateCloudName, String dhcpId, WorkloadNetworkDhcpInner workloadNetworkDhcp); /** - * Create a segment by id in a private cloud workload network. - * + * Create a WorkloadNetworkDhcp. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param segmentId NSX Segment identifier. Generally the same as the Segment's display name. - * @param workloadNetworkSegment NSX Segment. + * @param dhcpId The ID of the DHCP configuration. + * @param workloadNetworkDhcp Resource create parameters. * @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 nSX Segment. + * @return the {@link SyncPoller} for polling of nSX DHCP. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, WorkloadNetworkSegmentInner> beginCreateSegments( - String resourceGroupName, - String privateCloudName, - String segmentId, - WorkloadNetworkSegmentInner workloadNetworkSegment, - Context context); + SyncPoller, WorkloadNetworkDhcpInner> beginCreateDhcp(String resourceGroupName, + String privateCloudName, String dhcpId, WorkloadNetworkDhcpInner workloadNetworkDhcp, Context context); /** - * Create a segment by id in a private cloud workload network. - * + * Create a WorkloadNetworkDhcp. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param segmentId NSX Segment identifier. Generally the same as the Segment's display name. - * @param workloadNetworkSegment NSX Segment. + * @param dhcpId The ID of the DHCP configuration. + * @param workloadNetworkDhcp Resource create parameters. * @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 nSX Segment. + * @return nSX DHCP. */ @ServiceMethod(returns = ReturnType.SINGLE) - WorkloadNetworkSegmentInner createSegments( - String resourceGroupName, - String privateCloudName, - String segmentId, - WorkloadNetworkSegmentInner workloadNetworkSegment); + WorkloadNetworkDhcpInner createDhcp(String resourceGroupName, String privateCloudName, String dhcpId, + WorkloadNetworkDhcpInner workloadNetworkDhcp); /** - * Create a segment by id in a private cloud workload network. - * + * Create a WorkloadNetworkDhcp. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param segmentId NSX Segment identifier. Generally the same as the Segment's display name. - * @param workloadNetworkSegment NSX Segment. + * @param dhcpId The ID of the DHCP configuration. + * @param workloadNetworkDhcp Resource create parameters. * @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 nSX Segment. + * @return nSX DHCP. */ @ServiceMethod(returns = ReturnType.SINGLE) - WorkloadNetworkSegmentInner createSegments( - String resourceGroupName, - String privateCloudName, - String segmentId, - WorkloadNetworkSegmentInner workloadNetworkSegment, - Context context); + WorkloadNetworkDhcpInner createDhcp(String resourceGroupName, String privateCloudName, String dhcpId, + WorkloadNetworkDhcpInner workloadNetworkDhcp, Context context); /** - * Create or update a segment by id in a private cloud workload network. - * + * Update a WorkloadNetworkDhcp. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param segmentId NSX Segment identifier. Generally the same as the Segment's display name. - * @param workloadNetworkSegment NSX Segment. + * @param dhcpId The ID of the DHCP configuration. + * @param workloadNetworkDhcp The resource properties to be updated. * @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 nSX Segment. + * @return the {@link SyncPoller} for polling of nSX DHCP. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, WorkloadNetworkSegmentInner> beginUpdateSegments( - String resourceGroupName, - String privateCloudName, - String segmentId, - WorkloadNetworkSegmentInner workloadNetworkSegment); + SyncPoller, WorkloadNetworkDhcpInner> beginUpdateDhcp(String resourceGroupName, + String privateCloudName, String dhcpId, WorkloadNetworkDhcpUpdate workloadNetworkDhcp); /** - * Create or update a segment by id in a private cloud workload network. - * + * Update a WorkloadNetworkDhcp. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param segmentId NSX Segment identifier. Generally the same as the Segment's display name. - * @param workloadNetworkSegment NSX Segment. + * @param dhcpId The ID of the DHCP configuration. + * @param workloadNetworkDhcp The resource properties to be updated. * @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 nSX Segment. + * @return the {@link SyncPoller} for polling of nSX DHCP. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, WorkloadNetworkSegmentInner> beginUpdateSegments( - String resourceGroupName, - String privateCloudName, - String segmentId, - WorkloadNetworkSegmentInner workloadNetworkSegment, - Context context); + SyncPoller, WorkloadNetworkDhcpInner> beginUpdateDhcp(String resourceGroupName, + String privateCloudName, String dhcpId, WorkloadNetworkDhcpUpdate workloadNetworkDhcp, Context context); /** - * Create or update a segment by id in a private cloud workload network. - * + * Update a WorkloadNetworkDhcp. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param segmentId NSX Segment identifier. Generally the same as the Segment's display name. - * @param workloadNetworkSegment NSX Segment. + * @param dhcpId The ID of the DHCP configuration. + * @param workloadNetworkDhcp The resource properties to be updated. * @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 nSX Segment. + * @return nSX DHCP. */ @ServiceMethod(returns = ReturnType.SINGLE) - WorkloadNetworkSegmentInner updateSegments( - String resourceGroupName, - String privateCloudName, - String segmentId, - WorkloadNetworkSegmentInner workloadNetworkSegment); + WorkloadNetworkDhcpInner updateDhcp(String resourceGroupName, String privateCloudName, String dhcpId, + WorkloadNetworkDhcpUpdate workloadNetworkDhcp); /** - * Create or update a segment by id in a private cloud workload network. - * + * Update a WorkloadNetworkDhcp. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param segmentId NSX Segment identifier. Generally the same as the Segment's display name. - * @param workloadNetworkSegment NSX Segment. + * @param dhcpId The ID of the DHCP configuration. + * @param workloadNetworkDhcp The resource properties to be updated. * @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 nSX Segment. + * @return nSX DHCP. */ @ServiceMethod(returns = ReturnType.SINGLE) - WorkloadNetworkSegmentInner updateSegments( - String resourceGroupName, - String privateCloudName, - String segmentId, - WorkloadNetworkSegmentInner workloadNetworkSegment, - Context context); + WorkloadNetworkDhcpInner updateDhcp(String resourceGroupName, String privateCloudName, String dhcpId, + WorkloadNetworkDhcpUpdate workloadNetworkDhcp, Context context); /** - * Delete a segment by id in a private cloud workload network. - * + * Delete a WorkloadNetworkDhcp. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param segmentId NSX Segment identifier. Generally the same as the Segment's display name. + * @param dhcpId The ID of the DHCP configuration. * @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> beginDeleteSegment( - String resourceGroupName, String privateCloudName, String segmentId); + SyncPoller, Void> beginDeleteDhcp(String resourceGroupName, String privateCloudName, + String dhcpId); /** - * Delete a segment by id in a private cloud workload network. - * + * Delete a WorkloadNetworkDhcp. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param segmentId NSX Segment identifier. Generally the same as the Segment's display name. + * @param dhcpId The ID of the DHCP configuration. * @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. @@ -329,263 +304,254 @@ SyncPoller, Void> beginDeleteSegment( * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDeleteSegment( - String resourceGroupName, String privateCloudName, String segmentId, Context context); + SyncPoller, Void> beginDeleteDhcp(String resourceGroupName, String privateCloudName, String dhcpId, + Context context); /** - * Delete a segment by id in a private cloud workload network. - * + * Delete a WorkloadNetworkDhcp. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param segmentId NSX Segment identifier. Generally the same as the Segment's display name. + * @param dhcpId The ID of the DHCP configuration. * @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 deleteSegment(String resourceGroupName, String privateCloudName, String segmentId); + void deleteDhcp(String resourceGroupName, String privateCloudName, String dhcpId); /** - * Delete a segment by id in a private cloud workload network. - * + * Delete a WorkloadNetworkDhcp. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param segmentId NSX Segment identifier. Generally the same as the Segment's display name. + * @param dhcpId The ID of the DHCP configuration. * @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 deleteSegment(String resourceGroupName, String privateCloudName, String segmentId, Context context); + void deleteDhcp(String resourceGroupName, String privateCloudName, String dhcpId, Context context); /** - * List dhcp in a private cloud workload network. - * + * List WorkloadNetworkDnsService resources by WorkloadNetwork. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. * @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 a list of NSX dhcp entities as paginated response with {@link PagedIterable}. + * @return the response of a WorkloadNetworkDnsService list operation as paginated response with + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listDhcp(String resourceGroupName, String privateCloudName); + PagedIterable listDnsServices(String resourceGroupName, String privateCloudName); /** - * List dhcp in a private cloud workload network. - * + * List WorkloadNetworkDnsService resources by WorkloadNetwork. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. * @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 a list of NSX dhcp entities as paginated response with {@link PagedIterable}. + * @return the response of a WorkloadNetworkDnsService list operation as paginated response with + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listDhcp( - String resourceGroupName, String privateCloudName, Context context); + PagedIterable listDnsServices(String resourceGroupName, String privateCloudName, + Context context); /** - * Get dhcp by id in a private cloud workload network. - * + * Get a WorkloadNetworkDnsService. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dhcpId NSX DHCP identifier. Generally the same as the DHCP display name. * @param privateCloudName Name of the private cloud. + * @param dnsServiceId ID of the DNS service. * @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 dhcp by id in a private cloud workload network along with {@link Response}. + * @return a WorkloadNetworkDnsService along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getDhcpWithResponse( - String resourceGroupName, String dhcpId, String privateCloudName, Context context); + Response getDnsServiceWithResponse(String resourceGroupName, + String privateCloudName, String dnsServiceId, Context context); /** - * Get dhcp by id in a private cloud workload network. - * + * Get a WorkloadNetworkDnsService. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dhcpId NSX DHCP identifier. Generally the same as the DHCP display name. * @param privateCloudName Name of the private cloud. + * @param dnsServiceId ID of the DNS service. * @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 dhcp by id in a private cloud workload network. + * @return a WorkloadNetworkDnsService. */ @ServiceMethod(returns = ReturnType.SINGLE) - WorkloadNetworkDhcpInner getDhcp(String resourceGroupName, String dhcpId, String privateCloudName); + WorkloadNetworkDnsServiceInner getDnsService(String resourceGroupName, String privateCloudName, + String dnsServiceId); /** - * Create dhcp by id in a private cloud workload network. - * + * Create a WorkloadNetworkDnsService. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param dhcpId NSX DHCP identifier. Generally the same as the DHCP display name. - * @param workloadNetworkDhcp NSX DHCP. + * @param dnsServiceId ID of the DNS service. + * @param workloadNetworkDnsService Resource create parameters. * @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 nSX DHCP. + * @return the {@link SyncPoller} for polling of nSX DNS Service. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, WorkloadNetworkDhcpInner> beginCreateDhcp( - String resourceGroupName, String privateCloudName, String dhcpId, WorkloadNetworkDhcpInner workloadNetworkDhcp); + SyncPoller, WorkloadNetworkDnsServiceInner> beginCreateDnsService( + String resourceGroupName, String privateCloudName, String dnsServiceId, + WorkloadNetworkDnsServiceInner workloadNetworkDnsService); /** - * Create dhcp by id in a private cloud workload network. - * + * Create a WorkloadNetworkDnsService. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param dhcpId NSX DHCP identifier. Generally the same as the DHCP display name. - * @param workloadNetworkDhcp NSX DHCP. + * @param dnsServiceId ID of the DNS service. + * @param workloadNetworkDnsService Resource create parameters. * @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 nSX DHCP. + * @return the {@link SyncPoller} for polling of nSX DNS Service. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, WorkloadNetworkDhcpInner> beginCreateDhcp( - String resourceGroupName, - String privateCloudName, - String dhcpId, - WorkloadNetworkDhcpInner workloadNetworkDhcp, - Context context); + SyncPoller, WorkloadNetworkDnsServiceInner> beginCreateDnsService( + String resourceGroupName, String privateCloudName, String dnsServiceId, + WorkloadNetworkDnsServiceInner workloadNetworkDnsService, Context context); /** - * Create dhcp by id in a private cloud workload network. - * + * Create a WorkloadNetworkDnsService. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param dhcpId NSX DHCP identifier. Generally the same as the DHCP display name. - * @param workloadNetworkDhcp NSX DHCP. + * @param dnsServiceId ID of the DNS service. + * @param workloadNetworkDnsService Resource create parameters. * @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 nSX DHCP. + * @return nSX DNS Service. */ @ServiceMethod(returns = ReturnType.SINGLE) - WorkloadNetworkDhcpInner createDhcp( - String resourceGroupName, String privateCloudName, String dhcpId, WorkloadNetworkDhcpInner workloadNetworkDhcp); + WorkloadNetworkDnsServiceInner createDnsService(String resourceGroupName, String privateCloudName, + String dnsServiceId, WorkloadNetworkDnsServiceInner workloadNetworkDnsService); /** - * Create dhcp by id in a private cloud workload network. - * + * Create a WorkloadNetworkDnsService. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param dhcpId NSX DHCP identifier. Generally the same as the DHCP display name. - * @param workloadNetworkDhcp NSX DHCP. + * @param dnsServiceId ID of the DNS service. + * @param workloadNetworkDnsService Resource create parameters. * @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 nSX DHCP. + * @return nSX DNS Service. */ @ServiceMethod(returns = ReturnType.SINGLE) - WorkloadNetworkDhcpInner createDhcp( - String resourceGroupName, - String privateCloudName, - String dhcpId, - WorkloadNetworkDhcpInner workloadNetworkDhcp, - Context context); + WorkloadNetworkDnsServiceInner createDnsService(String resourceGroupName, String privateCloudName, + String dnsServiceId, WorkloadNetworkDnsServiceInner workloadNetworkDnsService, Context context); /** - * Create or update dhcp by id in a private cloud workload network. - * + * Update a WorkloadNetworkDnsService. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param dhcpId NSX DHCP identifier. Generally the same as the DHCP display name. - * @param workloadNetworkDhcp NSX DHCP. + * @param dnsServiceId ID of the DNS service. + * @param workloadNetworkDnsService The resource properties to be updated. * @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 nSX DHCP. + * @return the {@link SyncPoller} for polling of nSX DNS Service. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, WorkloadNetworkDhcpInner> beginUpdateDhcp( - String resourceGroupName, String privateCloudName, String dhcpId, WorkloadNetworkDhcpInner workloadNetworkDhcp); + SyncPoller, WorkloadNetworkDnsServiceInner> beginUpdateDnsService( + String resourceGroupName, String privateCloudName, String dnsServiceId, + WorkloadNetworkDnsServiceUpdate workloadNetworkDnsService); /** - * Create or update dhcp by id in a private cloud workload network. - * + * Update a WorkloadNetworkDnsService. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param dhcpId NSX DHCP identifier. Generally the same as the DHCP display name. - * @param workloadNetworkDhcp NSX DHCP. + * @param dnsServiceId ID of the DNS service. + * @param workloadNetworkDnsService The resource properties to be updated. * @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 nSX DHCP. + * @return the {@link SyncPoller} for polling of nSX DNS Service. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, WorkloadNetworkDhcpInner> beginUpdateDhcp( - String resourceGroupName, - String privateCloudName, - String dhcpId, - WorkloadNetworkDhcpInner workloadNetworkDhcp, - Context context); + SyncPoller, WorkloadNetworkDnsServiceInner> beginUpdateDnsService( + String resourceGroupName, String privateCloudName, String dnsServiceId, + WorkloadNetworkDnsServiceUpdate workloadNetworkDnsService, Context context); /** - * Create or update dhcp by id in a private cloud workload network. - * + * Update a WorkloadNetworkDnsService. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param dhcpId NSX DHCP identifier. Generally the same as the DHCP display name. - * @param workloadNetworkDhcp NSX DHCP. + * @param dnsServiceId ID of the DNS service. + * @param workloadNetworkDnsService The resource properties to be updated. * @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 nSX DHCP. + * @return nSX DNS Service. */ @ServiceMethod(returns = ReturnType.SINGLE) - WorkloadNetworkDhcpInner updateDhcp( - String resourceGroupName, String privateCloudName, String dhcpId, WorkloadNetworkDhcpInner workloadNetworkDhcp); + WorkloadNetworkDnsServiceInner updateDnsService(String resourceGroupName, String privateCloudName, + String dnsServiceId, WorkloadNetworkDnsServiceUpdate workloadNetworkDnsService); /** - * Create or update dhcp by id in a private cloud workload network. - * + * Update a WorkloadNetworkDnsService. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param dhcpId NSX DHCP identifier. Generally the same as the DHCP display name. - * @param workloadNetworkDhcp NSX DHCP. + * @param dnsServiceId ID of the DNS service. + * @param workloadNetworkDnsService The resource properties to be updated. * @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 nSX DHCP. + * @return nSX DNS Service. */ @ServiceMethod(returns = ReturnType.SINGLE) - WorkloadNetworkDhcpInner updateDhcp( - String resourceGroupName, - String privateCloudName, - String dhcpId, - WorkloadNetworkDhcpInner workloadNetworkDhcp, - Context context); + WorkloadNetworkDnsServiceInner updateDnsService(String resourceGroupName, String privateCloudName, + String dnsServiceId, WorkloadNetworkDnsServiceUpdate workloadNetworkDnsService, Context context); /** - * Delete dhcp by id in a private cloud workload network. - * + * Delete a WorkloadNetworkDnsService. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dnsServiceId ID of the DNS service. * @param privateCloudName Name of the private cloud. - * @param dhcpId NSX DHCP identifier. Generally the same as the DHCP display name. * @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> beginDeleteDhcp( - String resourceGroupName, String privateCloudName, String dhcpId); + SyncPoller, Void> beginDeleteDnsService(String resourceGroupName, String dnsServiceId, + String privateCloudName); /** - * Delete dhcp by id in a private cloud workload network. - * + * Delete a WorkloadNetworkDnsService. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dnsServiceId ID of the DNS service. * @param privateCloudName Name of the private cloud. - * @param dhcpId NSX DHCP identifier. Generally the same as the DHCP display name. * @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. @@ -593,600 +559,549 @@ SyncPoller, Void> beginDeleteDhcp( * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDeleteDhcp( - String resourceGroupName, String privateCloudName, String dhcpId, Context context); + SyncPoller, Void> beginDeleteDnsService(String resourceGroupName, String dnsServiceId, + String privateCloudName, Context context); /** - * Delete dhcp by id in a private cloud workload network. - * + * Delete a WorkloadNetworkDnsService. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dnsServiceId ID of the DNS service. * @param privateCloudName Name of the private cloud. - * @param dhcpId NSX DHCP identifier. Generally the same as the DHCP display name. * @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 deleteDhcp(String resourceGroupName, String privateCloudName, String dhcpId); + void deleteDnsService(String resourceGroupName, String dnsServiceId, String privateCloudName); /** - * Delete dhcp by id in a private cloud workload network. - * + * Delete a WorkloadNetworkDnsService. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dnsServiceId ID of the DNS service. * @param privateCloudName Name of the private cloud. - * @param dhcpId NSX DHCP identifier. Generally the same as the DHCP display name. * @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 deleteDhcp(String resourceGroupName, String privateCloudName, String dhcpId, Context context); + void deleteDnsService(String resourceGroupName, String dnsServiceId, String privateCloudName, Context context); /** - * List of gateways in a private cloud workload network. - * + * List WorkloadNetworkDnsZone resources by WorkloadNetwork. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. * @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 a list of NSX Gateways as paginated response with {@link PagedIterable}. + * @return the response of a WorkloadNetworkDnsZone list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listGateways(String resourceGroupName, String privateCloudName); + PagedIterable listDnsZones(String resourceGroupName, String privateCloudName); /** - * List of gateways in a private cloud workload network. - * + * List WorkloadNetworkDnsZone resources by WorkloadNetwork. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. * @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 a list of NSX Gateways as paginated response with {@link PagedIterable}. + * @return the response of a WorkloadNetworkDnsZone list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listGateways( - String resourceGroupName, String privateCloudName, Context context); + PagedIterable listDnsZones(String resourceGroupName, String privateCloudName, + Context context); /** - * Get a gateway by id in a private cloud workload network. - * + * Get a WorkloadNetworkDnsZone. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param gatewayId NSX Gateway identifier. Generally the same as the Gateway's display name. + * @param dnsZoneId ID of the DNS zone. * @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 a gateway by id in a private cloud workload network along with {@link Response}. + * @return a WorkloadNetworkDnsZone along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getGatewayWithResponse( - String resourceGroupName, String privateCloudName, String gatewayId, Context context); + Response getDnsZoneWithResponse(String resourceGroupName, String privateCloudName, + String dnsZoneId, Context context); /** - * Get a gateway by id in a private cloud workload network. - * + * Get a WorkloadNetworkDnsZone. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param gatewayId NSX Gateway identifier. Generally the same as the Gateway's display name. + * @param dnsZoneId ID of the DNS zone. * @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 a gateway by id in a private cloud workload network. + * @return a WorkloadNetworkDnsZone. */ @ServiceMethod(returns = ReturnType.SINGLE) - WorkloadNetworkGatewayInner getGateway(String resourceGroupName, String privateCloudName, String gatewayId); + WorkloadNetworkDnsZoneInner getDnsZone(String resourceGroupName, String privateCloudName, String dnsZoneId); /** - * List of port mirroring profiles in a private cloud workload network. - * + * Create a WorkloadNetworkDnsZone. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param dnsZoneId ID of the DNS zone. + * @param workloadNetworkDnsZone Resource create parameters. * @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 a list of NSX Port Mirroring as paginated response with {@link PagedIterable}. + * @return the {@link SyncPoller} for polling of nSX DNS Zone. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listPortMirroring( - String resourceGroupName, String privateCloudName); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, WorkloadNetworkDnsZoneInner> beginCreateDnsZone( + String resourceGroupName, String privateCloudName, String dnsZoneId, + WorkloadNetworkDnsZoneInner workloadNetworkDnsZone); /** - * List of port mirroring profiles in a private cloud workload network. - * + * Create a WorkloadNetworkDnsZone. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param dnsZoneId ID of the DNS zone. + * @param workloadNetworkDnsZone Resource create parameters. * @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 a list of NSX Port Mirroring as paginated response with {@link PagedIterable}. + * @return the {@link SyncPoller} for polling of nSX DNS Zone. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listPortMirroring( - String resourceGroupName, String privateCloudName, Context context); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, WorkloadNetworkDnsZoneInner> beginCreateDnsZone( + String resourceGroupName, String privateCloudName, String dnsZoneId, + WorkloadNetworkDnsZoneInner workloadNetworkDnsZone, Context context); /** - * Get a port mirroring profile by id in a private cloud workload network. - * + * Create a WorkloadNetworkDnsZone. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param portMirroringId NSX Port Mirroring identifier. Generally the same as the Port Mirroring display name. - * @param context The context to associate with this operation. + * @param dnsZoneId ID of the DNS zone. + * @param workloadNetworkDnsZone Resource create parameters. * @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 a port mirroring profile by id in a private cloud workload network along with {@link Response}. + * @return nSX DNS Zone. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getPortMirroringWithResponse( - String resourceGroupName, String privateCloudName, String portMirroringId, Context context); + WorkloadNetworkDnsZoneInner createDnsZone(String resourceGroupName, String privateCloudName, String dnsZoneId, + WorkloadNetworkDnsZoneInner workloadNetworkDnsZone); /** - * Get a port mirroring profile by id in a private cloud workload network. - * + * Create a WorkloadNetworkDnsZone. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param portMirroringId NSX Port Mirroring identifier. Generally the same as the Port Mirroring display name. + * @param dnsZoneId ID of the DNS zone. + * @param workloadNetworkDnsZone Resource create parameters. + * @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 a port mirroring profile by id in a private cloud workload network. + * @return nSX DNS Zone. */ @ServiceMethod(returns = ReturnType.SINGLE) - WorkloadNetworkPortMirroringInner getPortMirroring( - String resourceGroupName, String privateCloudName, String portMirroringId); + WorkloadNetworkDnsZoneInner createDnsZone(String resourceGroupName, String privateCloudName, String dnsZoneId, + WorkloadNetworkDnsZoneInner workloadNetworkDnsZone, Context context); /** - * Create a port mirroring profile by id in a private cloud workload network. - * + * Update a WorkloadNetworkDnsZone. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param portMirroringId NSX Port Mirroring identifier. Generally the same as the Port Mirroring display name. - * @param workloadNetworkPortMirroring NSX port mirroring. + * @param dnsZoneId ID of the DNS zone. + * @param workloadNetworkDnsZone The resource properties to be updated. * @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 nSX Port Mirroring. + * @return the {@link SyncPoller} for polling of nSX DNS Zone. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, WorkloadNetworkPortMirroringInner> - beginCreatePortMirroring( - String resourceGroupName, - String privateCloudName, - String portMirroringId, - WorkloadNetworkPortMirroringInner workloadNetworkPortMirroring); + SyncPoller, WorkloadNetworkDnsZoneInner> beginUpdateDnsZone( + String resourceGroupName, String privateCloudName, String dnsZoneId, + WorkloadNetworkDnsZoneUpdate workloadNetworkDnsZone); /** - * Create a port mirroring profile by id in a private cloud workload network. - * + * Update a WorkloadNetworkDnsZone. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param portMirroringId NSX Port Mirroring identifier. Generally the same as the Port Mirroring display name. - * @param workloadNetworkPortMirroring NSX port mirroring. + * @param dnsZoneId ID of the DNS zone. + * @param workloadNetworkDnsZone The resource properties to be updated. * @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 nSX Port Mirroring. + * @return the {@link SyncPoller} for polling of nSX DNS Zone. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, WorkloadNetworkPortMirroringInner> - beginCreatePortMirroring( - String resourceGroupName, - String privateCloudName, - String portMirroringId, - WorkloadNetworkPortMirroringInner workloadNetworkPortMirroring, - Context context); + SyncPoller, WorkloadNetworkDnsZoneInner> beginUpdateDnsZone( + String resourceGroupName, String privateCloudName, String dnsZoneId, + WorkloadNetworkDnsZoneUpdate workloadNetworkDnsZone, Context context); /** - * Create a port mirroring profile by id in a private cloud workload network. - * + * Update a WorkloadNetworkDnsZone. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param portMirroringId NSX Port Mirroring identifier. Generally the same as the Port Mirroring display name. - * @param workloadNetworkPortMirroring NSX port mirroring. + * @param dnsZoneId ID of the DNS zone. + * @param workloadNetworkDnsZone The resource properties to be updated. * @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 nSX Port Mirroring. + * @return nSX DNS Zone. */ @ServiceMethod(returns = ReturnType.SINGLE) - WorkloadNetworkPortMirroringInner createPortMirroring( - String resourceGroupName, - String privateCloudName, - String portMirroringId, - WorkloadNetworkPortMirroringInner workloadNetworkPortMirroring); + WorkloadNetworkDnsZoneInner updateDnsZone(String resourceGroupName, String privateCloudName, String dnsZoneId, + WorkloadNetworkDnsZoneUpdate workloadNetworkDnsZone); /** - * Create a port mirroring profile by id in a private cloud workload network. - * + * Update a WorkloadNetworkDnsZone. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param portMirroringId NSX Port Mirroring identifier. Generally the same as the Port Mirroring display name. - * @param workloadNetworkPortMirroring NSX port mirroring. + * @param dnsZoneId ID of the DNS zone. + * @param workloadNetworkDnsZone The resource properties to be updated. * @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 nSX Port Mirroring. + * @return nSX DNS Zone. */ @ServiceMethod(returns = ReturnType.SINGLE) - WorkloadNetworkPortMirroringInner createPortMirroring( - String resourceGroupName, - String privateCloudName, - String portMirroringId, - WorkloadNetworkPortMirroringInner workloadNetworkPortMirroring, - Context context); + WorkloadNetworkDnsZoneInner updateDnsZone(String resourceGroupName, String privateCloudName, String dnsZoneId, + WorkloadNetworkDnsZoneUpdate workloadNetworkDnsZone, Context context); /** - * Create or update a port mirroring profile by id in a private cloud workload network. - * + * Delete a WorkloadNetworkDnsZone. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dnsZoneId ID of the DNS zone. * @param privateCloudName Name of the private cloud. - * @param portMirroringId NSX Port Mirroring identifier. Generally the same as the Port Mirroring display name. - * @param workloadNetworkPortMirroring NSX port mirroring. * @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 nSX Port Mirroring. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, WorkloadNetworkPortMirroringInner> - beginUpdatePortMirroring( - String resourceGroupName, - String privateCloudName, - String portMirroringId, - WorkloadNetworkPortMirroringInner workloadNetworkPortMirroring); + SyncPoller, Void> beginDeleteDnsZone(String resourceGroupName, String dnsZoneId, + String privateCloudName); /** - * Create or update a port mirroring profile by id in a private cloud workload network. - * + * Delete a WorkloadNetworkDnsZone. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dnsZoneId ID of the DNS zone. * @param privateCloudName Name of the private cloud. - * @param portMirroringId NSX Port Mirroring identifier. Generally the same as the Port Mirroring display name. - * @param workloadNetworkPortMirroring NSX port mirroring. * @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 nSX Port Mirroring. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, WorkloadNetworkPortMirroringInner> - beginUpdatePortMirroring( - String resourceGroupName, - String privateCloudName, - String portMirroringId, - WorkloadNetworkPortMirroringInner workloadNetworkPortMirroring, - Context context); + SyncPoller, Void> beginDeleteDnsZone(String resourceGroupName, String dnsZoneId, + String privateCloudName, Context context); /** - * Create or update a port mirroring profile by id in a private cloud workload network. - * + * Delete a WorkloadNetworkDnsZone. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dnsZoneId ID of the DNS zone. * @param privateCloudName Name of the private cloud. - * @param portMirroringId NSX Port Mirroring identifier. Generally the same as the Port Mirroring display name. - * @param workloadNetworkPortMirroring NSX port mirroring. * @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 nSX Port Mirroring. */ @ServiceMethod(returns = ReturnType.SINGLE) - WorkloadNetworkPortMirroringInner updatePortMirroring( - String resourceGroupName, - String privateCloudName, - String portMirroringId, - WorkloadNetworkPortMirroringInner workloadNetworkPortMirroring); + void deleteDnsZone(String resourceGroupName, String dnsZoneId, String privateCloudName); /** - * Create or update a port mirroring profile by id in a private cloud workload network. - * + * Delete a WorkloadNetworkDnsZone. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dnsZoneId ID of the DNS zone. * @param privateCloudName Name of the private cloud. - * @param portMirroringId NSX Port Mirroring identifier. Generally the same as the Port Mirroring display name. - * @param workloadNetworkPortMirroring NSX port mirroring. * @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 nSX Port Mirroring. */ @ServiceMethod(returns = ReturnType.SINGLE) - WorkloadNetworkPortMirroringInner updatePortMirroring( - String resourceGroupName, - String privateCloudName, - String portMirroringId, - WorkloadNetworkPortMirroringInner workloadNetworkPortMirroring, - Context context); + void deleteDnsZone(String resourceGroupName, String dnsZoneId, String privateCloudName, Context context); /** - * Delete a port mirroring profile by id in a private cloud workload network. - * + * List WorkloadNetworkGateway resources by WorkloadNetwork. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param portMirroringId NSX Port Mirroring identifier. Generally the same as the Port Mirroring display name. * @param privateCloudName Name of the private cloud. * @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. + * @return the response of a WorkloadNetworkGateway list operation as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDeletePortMirroring( - String resourceGroupName, String portMirroringId, String privateCloudName); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listGateways(String resourceGroupName, String privateCloudName); /** - * Delete a port mirroring profile by id in a private cloud workload network. - * + * List WorkloadNetworkGateway resources by WorkloadNetwork. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param portMirroringId NSX Port Mirroring identifier. Generally the same as the Port Mirroring display name. * @param privateCloudName Name of the private cloud. * @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. + * @return the response of a WorkloadNetworkGateway list operation as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDeletePortMirroring( - String resourceGroupName, String portMirroringId, String privateCloudName, Context context); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listGateways(String resourceGroupName, String privateCloudName, + Context context); /** - * Delete a port mirroring profile by id in a private cloud workload network. - * + * Get a WorkloadNetworkGateway. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param portMirroringId NSX Port Mirroring identifier. Generally the same as the Port Mirroring display name. * @param privateCloudName Name of the private cloud. + * @param gatewayId The ID of the NSX Gateway. + * @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 a WorkloadNetworkGateway along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - void deletePortMirroring(String resourceGroupName, String portMirroringId, String privateCloudName); + Response getGatewayWithResponse(String resourceGroupName, String privateCloudName, + String gatewayId, Context context); /** - * Delete a port mirroring profile by id in a private cloud workload network. - * + * Get a WorkloadNetworkGateway. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param portMirroringId NSX Port Mirroring identifier. Generally the same as the Port Mirroring display name. * @param privateCloudName Name of the private cloud. - * @param context The context to associate with this operation. + * @param gatewayId The ID of the NSX Gateway. * @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 a WorkloadNetworkGateway. */ @ServiceMethod(returns = ReturnType.SINGLE) - void deletePortMirroring( - String resourceGroupName, String portMirroringId, String privateCloudName, Context context); + WorkloadNetworkGatewayInner getGateway(String resourceGroupName, String privateCloudName, String gatewayId); /** - * List of vm groups in a private cloud workload network. - * + * List WorkloadNetworkPortMirroring resources by WorkloadNetwork. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. * @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 a list of NSX VM Groups as paginated response with {@link PagedIterable}. + * @return the response of a WorkloadNetworkPortMirroring list operation as paginated response with + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listVMGroups(String resourceGroupName, String privateCloudName); + PagedIterable listPortMirroring(String resourceGroupName, + String privateCloudName); /** - * List of vm groups in a private cloud workload network. - * + * List WorkloadNetworkPortMirroring resources by WorkloadNetwork. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. * @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 a list of NSX VM Groups as paginated response with {@link PagedIterable}. + * @return the response of a WorkloadNetworkPortMirroring list operation as paginated response with + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listVMGroups( - String resourceGroupName, String privateCloudName, Context context); + PagedIterable listPortMirroring(String resourceGroupName, + String privateCloudName, Context context); /** - * Get a vm group by id in a private cloud workload network. - * + * Get a WorkloadNetworkPortMirroring. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param vmGroupId NSX VM Group identifier. Generally the same as the VM Group's display name. + * @param portMirroringId ID of the NSX port mirroring profile. * @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 a vm group by id in a private cloud workload network along with {@link Response}. + * @return a WorkloadNetworkPortMirroring along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getVMGroupWithResponse( - String resourceGroupName, String privateCloudName, String vmGroupId, Context context); + Response getPortMirroringWithResponse(String resourceGroupName, + String privateCloudName, String portMirroringId, Context context); /** - * Get a vm group by id in a private cloud workload network. - * + * Get a WorkloadNetworkPortMirroring. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param vmGroupId NSX VM Group identifier. Generally the same as the VM Group's display name. + * @param portMirroringId ID of the NSX port mirroring profile. * @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 a vm group by id in a private cloud workload network. + * @return a WorkloadNetworkPortMirroring. */ @ServiceMethod(returns = ReturnType.SINGLE) - WorkloadNetworkVMGroupInner getVMGroup(String resourceGroupName, String privateCloudName, String vmGroupId); + WorkloadNetworkPortMirroringInner getPortMirroring(String resourceGroupName, String privateCloudName, + String portMirroringId); /** - * Create a vm group by id in a private cloud workload network. - * + * Create a WorkloadNetworkPortMirroring. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param vmGroupId NSX VM Group identifier. Generally the same as the VM Group's display name. - * @param workloadNetworkVMGroup NSX VM Group. + * @param portMirroringId ID of the NSX port mirroring profile. + * @param workloadNetworkPortMirroring Resource create parameters. * @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 nSX VM Group. + * @return the {@link SyncPoller} for polling of nSX Port Mirroring. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, WorkloadNetworkVMGroupInner> beginCreateVMGroup( - String resourceGroupName, - String privateCloudName, - String vmGroupId, - WorkloadNetworkVMGroupInner workloadNetworkVMGroup); + SyncPoller, WorkloadNetworkPortMirroringInner> + beginCreatePortMirroring(String resourceGroupName, String privateCloudName, String portMirroringId, + WorkloadNetworkPortMirroringInner workloadNetworkPortMirroring); /** - * Create a vm group by id in a private cloud workload network. - * + * Create a WorkloadNetworkPortMirroring. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param vmGroupId NSX VM Group identifier. Generally the same as the VM Group's display name. - * @param workloadNetworkVMGroup NSX VM Group. + * @param portMirroringId ID of the NSX port mirroring profile. + * @param workloadNetworkPortMirroring Resource create parameters. * @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 nSX VM Group. + * @return the {@link SyncPoller} for polling of nSX Port Mirroring. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, WorkloadNetworkVMGroupInner> beginCreateVMGroup( - String resourceGroupName, - String privateCloudName, - String vmGroupId, - WorkloadNetworkVMGroupInner workloadNetworkVMGroup, - Context context); + SyncPoller, WorkloadNetworkPortMirroringInner> + beginCreatePortMirroring(String resourceGroupName, String privateCloudName, String portMirroringId, + WorkloadNetworkPortMirroringInner workloadNetworkPortMirroring, Context context); /** - * Create a vm group by id in a private cloud workload network. - * + * Create a WorkloadNetworkPortMirroring. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param vmGroupId NSX VM Group identifier. Generally the same as the VM Group's display name. - * @param workloadNetworkVMGroup NSX VM Group. + * @param portMirroringId ID of the NSX port mirroring profile. + * @param workloadNetworkPortMirroring Resource create parameters. * @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 nSX VM Group. + * @return nSX Port Mirroring. */ @ServiceMethod(returns = ReturnType.SINGLE) - WorkloadNetworkVMGroupInner createVMGroup( - String resourceGroupName, - String privateCloudName, - String vmGroupId, - WorkloadNetworkVMGroupInner workloadNetworkVMGroup); + WorkloadNetworkPortMirroringInner createPortMirroring(String resourceGroupName, String privateCloudName, + String portMirroringId, WorkloadNetworkPortMirroringInner workloadNetworkPortMirroring); /** - * Create a vm group by id in a private cloud workload network. - * + * Create a WorkloadNetworkPortMirroring. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param vmGroupId NSX VM Group identifier. Generally the same as the VM Group's display name. - * @param workloadNetworkVMGroup NSX VM Group. + * @param portMirroringId ID of the NSX port mirroring profile. + * @param workloadNetworkPortMirroring Resource create parameters. * @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 nSX VM Group. + * @return nSX Port Mirroring. */ @ServiceMethod(returns = ReturnType.SINGLE) - WorkloadNetworkVMGroupInner createVMGroup( - String resourceGroupName, - String privateCloudName, - String vmGroupId, - WorkloadNetworkVMGroupInner workloadNetworkVMGroup, - Context context); + WorkloadNetworkPortMirroringInner createPortMirroring(String resourceGroupName, String privateCloudName, + String portMirroringId, WorkloadNetworkPortMirroringInner workloadNetworkPortMirroring, Context context); /** - * Create or update a vm group by id in a private cloud workload network. - * + * Update a WorkloadNetworkPortMirroring. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param vmGroupId NSX VM Group identifier. Generally the same as the VM Group's display name. - * @param workloadNetworkVMGroup NSX VM Group. + * @param portMirroringId ID of the NSX port mirroring profile. + * @param workloadNetworkPortMirroring The resource properties to be updated. * @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 nSX VM Group. + * @return the {@link SyncPoller} for polling of nSX Port Mirroring. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, WorkloadNetworkVMGroupInner> beginUpdateVMGroup( - String resourceGroupName, - String privateCloudName, - String vmGroupId, - WorkloadNetworkVMGroupInner workloadNetworkVMGroup); + SyncPoller, WorkloadNetworkPortMirroringInner> + beginUpdatePortMirroring(String resourceGroupName, String privateCloudName, String portMirroringId, + WorkloadNetworkPortMirroringUpdate workloadNetworkPortMirroring); /** - * Create or update a vm group by id in a private cloud workload network. - * + * Update a WorkloadNetworkPortMirroring. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param vmGroupId NSX VM Group identifier. Generally the same as the VM Group's display name. - * @param workloadNetworkVMGroup NSX VM Group. + * @param portMirroringId ID of the NSX port mirroring profile. + * @param workloadNetworkPortMirroring The resource properties to be updated. * @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 nSX VM Group. + * @return the {@link SyncPoller} for polling of nSX Port Mirroring. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, WorkloadNetworkVMGroupInner> beginUpdateVMGroup( - String resourceGroupName, - String privateCloudName, - String vmGroupId, - WorkloadNetworkVMGroupInner workloadNetworkVMGroup, - Context context); + SyncPoller, WorkloadNetworkPortMirroringInner> + beginUpdatePortMirroring(String resourceGroupName, String privateCloudName, String portMirroringId, + WorkloadNetworkPortMirroringUpdate workloadNetworkPortMirroring, Context context); /** - * Create or update a vm group by id in a private cloud workload network. - * + * Update a WorkloadNetworkPortMirroring. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param vmGroupId NSX VM Group identifier. Generally the same as the VM Group's display name. - * @param workloadNetworkVMGroup NSX VM Group. + * @param portMirroringId ID of the NSX port mirroring profile. + * @param workloadNetworkPortMirroring The resource properties to be updated. * @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 nSX VM Group. + * @return nSX Port Mirroring. */ @ServiceMethod(returns = ReturnType.SINGLE) - WorkloadNetworkVMGroupInner updateVMGroup( - String resourceGroupName, - String privateCloudName, - String vmGroupId, - WorkloadNetworkVMGroupInner workloadNetworkVMGroup); + WorkloadNetworkPortMirroringInner updatePortMirroring(String resourceGroupName, String privateCloudName, + String portMirroringId, WorkloadNetworkPortMirroringUpdate workloadNetworkPortMirroring); /** - * Create or update a vm group by id in a private cloud workload network. - * + * Update a WorkloadNetworkPortMirroring. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param vmGroupId NSX VM Group identifier. Generally the same as the VM Group's display name. - * @param workloadNetworkVMGroup NSX VM Group. + * @param portMirroringId ID of the NSX port mirroring profile. + * @param workloadNetworkPortMirroring The resource properties to be updated. * @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 nSX VM Group. + * @return nSX Port Mirroring. */ @ServiceMethod(returns = ReturnType.SINGLE) - WorkloadNetworkVMGroupInner updateVMGroup( - String resourceGroupName, - String privateCloudName, - String vmGroupId, - WorkloadNetworkVMGroupInner workloadNetworkVMGroup, - Context context); + WorkloadNetworkPortMirroringInner updatePortMirroring(String resourceGroupName, String privateCloudName, + String portMirroringId, WorkloadNetworkPortMirroringUpdate workloadNetworkPortMirroring, Context context); /** - * Delete a vm group by id in a private cloud workload network. - * + * Delete a WorkloadNetworkPortMirroring. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param vmGroupId NSX VM Group identifier. Generally the same as the VM Group's display name. + * @param portMirroringId ID of the NSX port mirroring profile. * @param privateCloudName Name of the private cloud. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -1194,14 +1109,14 @@ WorkloadNetworkVMGroupInner updateVMGroup( * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDeleteVMGroup( - String resourceGroupName, String vmGroupId, String privateCloudName); + SyncPoller, Void> beginDeletePortMirroring(String resourceGroupName, String portMirroringId, + String privateCloudName); /** - * Delete a vm group by id in a private cloud workload network. - * + * Delete a WorkloadNetworkPortMirroring. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param vmGroupId NSX VM Group identifier. Generally the same as the VM Group's display name. + * @param portMirroringId ID of the NSX port mirroring profile. * @param privateCloudName Name of the private cloud. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1210,27 +1125,27 @@ SyncPoller, Void> beginDeleteVMGroup( * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDeleteVMGroup( - String resourceGroupName, String vmGroupId, String privateCloudName, Context context); + SyncPoller, Void> beginDeletePortMirroring(String resourceGroupName, String portMirroringId, + String privateCloudName, Context context); /** - * Delete a vm group by id in a private cloud workload network. - * + * Delete a WorkloadNetworkPortMirroring. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param vmGroupId NSX VM Group identifier. Generally the same as the VM Group's display name. + * @param portMirroringId ID of the NSX port mirroring profile. * @param privateCloudName Name of the private cloud. * @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 deleteVMGroup(String resourceGroupName, String vmGroupId, String privateCloudName); + void deletePortMirroring(String resourceGroupName, String portMirroringId, String privateCloudName); /** - * Delete a vm group by id in a private cloud workload network. - * + * Delete a WorkloadNetworkPortMirroring. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param vmGroupId NSX VM Group identifier. Generally the same as the VM Group's display name. + * @param portMirroringId ID of the NSX port mirroring profile. * @param privateCloudName Name of the private cloud. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1238,764 +1153,708 @@ SyncPoller, Void> beginDeleteVMGroup( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ @ServiceMethod(returns = ReturnType.SINGLE) - void deleteVMGroup(String resourceGroupName, String vmGroupId, String privateCloudName, Context context); + void deletePortMirroring(String resourceGroupName, String portMirroringId, String privateCloudName, + Context context); /** - * List of virtual machines in a private cloud workload network. - * + * List WorkloadNetworkPublicIP resources by WorkloadNetwork. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. * @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 a list of NSX Virtual Machines as paginated response with {@link PagedIterable}. + * @return the response of a WorkloadNetworkPublicIP list operation as paginated response with + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listVirtualMachines( - String resourceGroupName, String privateCloudName); + PagedIterable listPublicIPs(String resourceGroupName, String privateCloudName); /** - * List of virtual machines in a private cloud workload network. - * + * List WorkloadNetworkPublicIP resources by WorkloadNetwork. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. * @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 a list of NSX Virtual Machines as paginated response with {@link PagedIterable}. + * @return the response of a WorkloadNetworkPublicIP list operation as paginated response with + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listVirtualMachines( - String resourceGroupName, String privateCloudName, Context context); + PagedIterable listPublicIPs(String resourceGroupName, String privateCloudName, + Context context); /** - * Get a virtual machine by id in a private cloud workload network. - * + * Get a WorkloadNetworkPublicIP. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param virtualMachineId Virtual Machine identifier. + * @param publicIpId ID of the DNS zone. * @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 a virtual machine by id in a private cloud workload network along with {@link Response}. + * @return a WorkloadNetworkPublicIP along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getVirtualMachineWithResponse( - String resourceGroupName, String privateCloudName, String virtualMachineId, Context context); + Response getPublicIpWithResponse(String resourceGroupName, String privateCloudName, + String publicIpId, Context context); /** - * Get a virtual machine by id in a private cloud workload network. - * + * Get a WorkloadNetworkPublicIP. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param virtualMachineId Virtual Machine identifier. + * @param publicIpId ID of the DNS zone. * @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 a virtual machine by id in a private cloud workload network. + * @return a WorkloadNetworkPublicIP. */ @ServiceMethod(returns = ReturnType.SINGLE) - WorkloadNetworkVirtualMachineInner getVirtualMachine( - String resourceGroupName, String privateCloudName, String virtualMachineId); + WorkloadNetworkPublicIpInner getPublicIp(String resourceGroupName, String privateCloudName, String publicIpId); /** - * List of DNS services in a private cloud workload network. - * + * Create a WorkloadNetworkPublicIP. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param publicIpId ID of the DNS zone. + * @param workloadNetworkPublicIp Resource create parameters. * @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 a list of NSX DNS Services as paginated response with {@link PagedIterable}. + * @return the {@link SyncPoller} for polling of nSX Public IP Block. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listDnsServices(String resourceGroupName, String privateCloudName); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, WorkloadNetworkPublicIpInner> beginCreatePublicIp( + String resourceGroupName, String privateCloudName, String publicIpId, + WorkloadNetworkPublicIpInner workloadNetworkPublicIp); /** - * List of DNS services in a private cloud workload network. - * + * Create a WorkloadNetworkPublicIP. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param publicIpId ID of the DNS zone. + * @param workloadNetworkPublicIp Resource create parameters. * @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 a list of NSX DNS Services as paginated response with {@link PagedIterable}. + * @return the {@link SyncPoller} for polling of nSX Public IP Block. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listDnsServices( - String resourceGroupName, String privateCloudName, Context context); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, WorkloadNetworkPublicIpInner> beginCreatePublicIp( + String resourceGroupName, String privateCloudName, String publicIpId, + WorkloadNetworkPublicIpInner workloadNetworkPublicIp, Context context); /** - * Get a DNS service by id in a private cloud workload network. - * + * Create a WorkloadNetworkPublicIP. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param dnsServiceId NSX DNS Service identifier. Generally the same as the DNS Service's display name. - * @param context The context to associate with this operation. + * @param publicIpId ID of the DNS zone. + * @param workloadNetworkPublicIp Resource create parameters. * @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 a DNS service by id in a private cloud workload network along with {@link Response}. + * @return nSX Public IP Block. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getDnsServiceWithResponse( - String resourceGroupName, String privateCloudName, String dnsServiceId, Context context); + WorkloadNetworkPublicIpInner createPublicIp(String resourceGroupName, String privateCloudName, String publicIpId, + WorkloadNetworkPublicIpInner workloadNetworkPublicIp); /** - * Get a DNS service by id in a private cloud workload network. - * + * Create a WorkloadNetworkPublicIP. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param dnsServiceId NSX DNS Service identifier. Generally the same as the DNS Service's display name. + * @param publicIpId ID of the DNS zone. + * @param workloadNetworkPublicIp Resource create parameters. + * @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 a DNS service by id in a private cloud workload network. + * @return nSX Public IP Block. */ @ServiceMethod(returns = ReturnType.SINGLE) - WorkloadNetworkDnsServiceInner getDnsService( - String resourceGroupName, String privateCloudName, String dnsServiceId); + WorkloadNetworkPublicIpInner createPublicIp(String resourceGroupName, String privateCloudName, String publicIpId, + WorkloadNetworkPublicIpInner workloadNetworkPublicIp, Context context); /** - * Create a DNS service by id in a private cloud workload network. - * + * Delete a WorkloadNetworkPublicIP. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param publicIpId ID of the DNS zone. * @param privateCloudName Name of the private cloud. - * @param dnsServiceId NSX DNS Service identifier. Generally the same as the DNS Service's display name. - * @param workloadNetworkDnsService NSX DNS Service. * @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 nSX DNS Service. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, WorkloadNetworkDnsServiceInner> beginCreateDnsService( - String resourceGroupName, - String privateCloudName, - String dnsServiceId, - WorkloadNetworkDnsServiceInner workloadNetworkDnsService); + SyncPoller, Void> beginDeletePublicIp(String resourceGroupName, String publicIpId, + String privateCloudName); /** - * Create a DNS service by id in a private cloud workload network. - * + * Delete a WorkloadNetworkPublicIP. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param publicIpId ID of the DNS zone. * @param privateCloudName Name of the private cloud. - * @param dnsServiceId NSX DNS Service identifier. Generally the same as the DNS Service's display name. - * @param workloadNetworkDnsService NSX DNS Service. * @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 nSX DNS Service. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, WorkloadNetworkDnsServiceInner> beginCreateDnsService( - String resourceGroupName, - String privateCloudName, - String dnsServiceId, - WorkloadNetworkDnsServiceInner workloadNetworkDnsService, - Context context); + SyncPoller, Void> beginDeletePublicIp(String resourceGroupName, String publicIpId, + String privateCloudName, Context context); /** - * Create a DNS service by id in a private cloud workload network. - * + * Delete a WorkloadNetworkPublicIP. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param publicIpId ID of the DNS zone. * @param privateCloudName Name of the private cloud. - * @param dnsServiceId NSX DNS Service identifier. Generally the same as the DNS Service's display name. - * @param workloadNetworkDnsService NSX DNS Service. * @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 nSX DNS Service. */ @ServiceMethod(returns = ReturnType.SINGLE) - WorkloadNetworkDnsServiceInner createDnsService( - String resourceGroupName, - String privateCloudName, - String dnsServiceId, - WorkloadNetworkDnsServiceInner workloadNetworkDnsService); + void deletePublicIp(String resourceGroupName, String publicIpId, String privateCloudName); /** - * Create a DNS service by id in a private cloud workload network. - * + * Delete a WorkloadNetworkPublicIP. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param publicIpId ID of the DNS zone. * @param privateCloudName Name of the private cloud. - * @param dnsServiceId NSX DNS Service identifier. Generally the same as the DNS Service's display name. - * @param workloadNetworkDnsService NSX DNS Service. * @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 nSX DNS Service. */ @ServiceMethod(returns = ReturnType.SINGLE) - WorkloadNetworkDnsServiceInner createDnsService( - String resourceGroupName, - String privateCloudName, - String dnsServiceId, - WorkloadNetworkDnsServiceInner workloadNetworkDnsService, - Context context); + void deletePublicIp(String resourceGroupName, String publicIpId, String privateCloudName, Context context); /** - * Create or update a DNS service by id in a private cloud workload network. - * + * List WorkloadNetworkSegment resources by WorkloadNetwork. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param dnsServiceId NSX DNS Service identifier. Generally the same as the DNS Service's display name. - * @param workloadNetworkDnsService NSX DNS Service. * @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 nSX DNS Service. + * @return the response of a WorkloadNetworkSegment list operation as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, WorkloadNetworkDnsServiceInner> beginUpdateDnsService( - String resourceGroupName, - String privateCloudName, - String dnsServiceId, - WorkloadNetworkDnsServiceInner workloadNetworkDnsService); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listSegments(String resourceGroupName, String privateCloudName); /** - * Create or update a DNS service by id in a private cloud workload network. - * + * List WorkloadNetworkSegment resources by WorkloadNetwork. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param dnsServiceId NSX DNS Service identifier. Generally the same as the DNS Service's display name. - * @param workloadNetworkDnsService NSX DNS Service. * @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 nSX DNS Service. + * @return the response of a WorkloadNetworkSegment list operation as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, WorkloadNetworkDnsServiceInner> beginUpdateDnsService( - String resourceGroupName, - String privateCloudName, - String dnsServiceId, - WorkloadNetworkDnsServiceInner workloadNetworkDnsService, + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listSegments(String resourceGroupName, String privateCloudName, Context context); /** - * Create or update a DNS service by id in a private cloud workload network. - * + * Get a WorkloadNetworkSegment. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param dnsServiceId NSX DNS Service identifier. Generally the same as the DNS Service's display name. - * @param workloadNetworkDnsService NSX DNS Service. + * @param segmentId The ID of the NSX Segment. + * @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 nSX DNS Service. + * @return a WorkloadNetworkSegment along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - WorkloadNetworkDnsServiceInner updateDnsService( - String resourceGroupName, - String privateCloudName, - String dnsServiceId, - WorkloadNetworkDnsServiceInner workloadNetworkDnsService); + Response getSegmentWithResponse(String resourceGroupName, String privateCloudName, + String segmentId, Context context); /** - * Create or update a DNS service by id in a private cloud workload network. - * + * Get a WorkloadNetworkSegment. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param dnsServiceId NSX DNS Service identifier. Generally the same as the DNS Service's display name. - * @param workloadNetworkDnsService NSX DNS Service. - * @param context The context to associate with this operation. + * @param segmentId The ID of the NSX Segment. * @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 nSX DNS Service. + * @return a WorkloadNetworkSegment. */ @ServiceMethod(returns = ReturnType.SINGLE) - WorkloadNetworkDnsServiceInner updateDnsService( - String resourceGroupName, - String privateCloudName, - String dnsServiceId, - WorkloadNetworkDnsServiceInner workloadNetworkDnsService, - Context context); + WorkloadNetworkSegmentInner getSegment(String resourceGroupName, String privateCloudName, String segmentId); /** - * Delete a DNS service by id in a private cloud workload network. - * + * Create a WorkloadNetworkSegment. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dnsServiceId NSX DNS Service identifier. Generally the same as the DNS Service's display name. * @param privateCloudName Name of the private cloud. + * @param segmentId The ID of the NSX Segment. + * @param workloadNetworkSegment Resource create parameters. * @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. + * @return the {@link SyncPoller} for polling of nSX Segment. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDeleteDnsService( - String resourceGroupName, String dnsServiceId, String privateCloudName); + SyncPoller, WorkloadNetworkSegmentInner> beginCreateSegments( + String resourceGroupName, String privateCloudName, String segmentId, + WorkloadNetworkSegmentInner workloadNetworkSegment); /** - * Delete a DNS service by id in a private cloud workload network. - * + * Create a WorkloadNetworkSegment. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dnsServiceId NSX DNS Service identifier. Generally the same as the DNS Service's display name. * @param privateCloudName Name of the private cloud. + * @param segmentId The ID of the NSX Segment. + * @param workloadNetworkSegment Resource create parameters. * @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. + * @return the {@link SyncPoller} for polling of nSX Segment. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDeleteDnsService( - String resourceGroupName, String dnsServiceId, String privateCloudName, Context context); + SyncPoller, WorkloadNetworkSegmentInner> beginCreateSegments( + String resourceGroupName, String privateCloudName, String segmentId, + WorkloadNetworkSegmentInner workloadNetworkSegment, Context context); /** - * Delete a DNS service by id in a private cloud workload network. - * + * Create a WorkloadNetworkSegment. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dnsServiceId NSX DNS Service identifier. Generally the same as the DNS Service's display name. * @param privateCloudName Name of the private cloud. + * @param segmentId The ID of the NSX Segment. + * @param workloadNetworkSegment Resource create parameters. * @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 nSX Segment. */ @ServiceMethod(returns = ReturnType.SINGLE) - void deleteDnsService(String resourceGroupName, String dnsServiceId, String privateCloudName); + WorkloadNetworkSegmentInner createSegments(String resourceGroupName, String privateCloudName, String segmentId, + WorkloadNetworkSegmentInner workloadNetworkSegment); /** - * Delete a DNS service by id in a private cloud workload network. - * + * Create a WorkloadNetworkSegment. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dnsServiceId NSX DNS Service identifier. Generally the same as the DNS Service's display name. * @param privateCloudName Name of the private cloud. + * @param segmentId The ID of the NSX Segment. + * @param workloadNetworkSegment Resource create parameters. * @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 nSX Segment. */ @ServiceMethod(returns = ReturnType.SINGLE) - void deleteDnsService(String resourceGroupName, String dnsServiceId, String privateCloudName, Context context); + WorkloadNetworkSegmentInner createSegments(String resourceGroupName, String privateCloudName, String segmentId, + WorkloadNetworkSegmentInner workloadNetworkSegment, Context context); /** - * List of DNS zones in a private cloud workload network. - * + * Update a WorkloadNetworkSegment. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param segmentId The ID of the NSX Segment. + * @param workloadNetworkSegment The resource properties to be updated. * @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 a list of NSX DNS Zones as paginated response with {@link PagedIterable}. + * @return the {@link SyncPoller} for polling of nSX Segment. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listDnsZones(String resourceGroupName, String privateCloudName); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, WorkloadNetworkSegmentInner> beginUpdateSegments( + String resourceGroupName, String privateCloudName, String segmentId, + WorkloadNetworkSegmentUpdate workloadNetworkSegment); /** - * List of DNS zones in a private cloud workload network. - * + * Update a WorkloadNetworkSegment. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param segmentId The ID of the NSX Segment. + * @param workloadNetworkSegment The resource properties to be updated. * @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 a list of NSX DNS Zones as paginated response with {@link PagedIterable}. + * @return the {@link SyncPoller} for polling of nSX Segment. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listDnsZones( - String resourceGroupName, String privateCloudName, Context context); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, WorkloadNetworkSegmentInner> beginUpdateSegments( + String resourceGroupName, String privateCloudName, String segmentId, + WorkloadNetworkSegmentUpdate workloadNetworkSegment, Context context); /** - * Get a DNS zone by id in a private cloud workload network. - * + * Update a WorkloadNetworkSegment. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param dnsZoneId NSX DNS Zone identifier. Generally the same as the DNS Zone's display name. - * @param context The context to associate with this operation. + * @param segmentId The ID of the NSX Segment. + * @param workloadNetworkSegment The resource properties to be updated. * @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 a DNS zone by id in a private cloud workload network along with {@link Response}. + * @return nSX Segment. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getDnsZoneWithResponse( - String resourceGroupName, String privateCloudName, String dnsZoneId, Context context); + WorkloadNetworkSegmentInner updateSegments(String resourceGroupName, String privateCloudName, String segmentId, + WorkloadNetworkSegmentUpdate workloadNetworkSegment); /** - * Get a DNS zone by id in a private cloud workload network. - * + * Update a WorkloadNetworkSegment. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param dnsZoneId NSX DNS Zone identifier. Generally the same as the DNS Zone's display name. + * @param segmentId The ID of the NSX Segment. + * @param workloadNetworkSegment The resource properties to be updated. + * @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 a DNS zone by id in a private cloud workload network. + * @return nSX Segment. */ @ServiceMethod(returns = ReturnType.SINGLE) - WorkloadNetworkDnsZoneInner getDnsZone(String resourceGroupName, String privateCloudName, String dnsZoneId); + WorkloadNetworkSegmentInner updateSegments(String resourceGroupName, String privateCloudName, String segmentId, + WorkloadNetworkSegmentUpdate workloadNetworkSegment, Context context); /** - * Create a DNS zone by id in a private cloud workload network. - * + * Delete a WorkloadNetworkSegment. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param dnsZoneId NSX DNS Zone identifier. Generally the same as the DNS Zone's display name. - * @param workloadNetworkDnsZone NSX DNS Zone. + * @param segmentId The ID of the NSX Segment. * @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 nSX DNS Zone. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, WorkloadNetworkDnsZoneInner> beginCreateDnsZone( - String resourceGroupName, - String privateCloudName, - String dnsZoneId, - WorkloadNetworkDnsZoneInner workloadNetworkDnsZone); + SyncPoller, Void> beginDeleteSegment(String resourceGroupName, String privateCloudName, + String segmentId); /** - * Create a DNS zone by id in a private cloud workload network. - * + * Delete a WorkloadNetworkSegment. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param dnsZoneId NSX DNS Zone identifier. Generally the same as the DNS Zone's display name. - * @param workloadNetworkDnsZone NSX DNS Zone. + * @param segmentId The ID of the NSX Segment. * @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 nSX DNS Zone. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, WorkloadNetworkDnsZoneInner> beginCreateDnsZone( - String resourceGroupName, - String privateCloudName, - String dnsZoneId, - WorkloadNetworkDnsZoneInner workloadNetworkDnsZone, - Context context); + SyncPoller, Void> beginDeleteSegment(String resourceGroupName, String privateCloudName, + String segmentId, Context context); /** - * Create a DNS zone by id in a private cloud workload network. - * + * Delete a WorkloadNetworkSegment. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param dnsZoneId NSX DNS Zone identifier. Generally the same as the DNS Zone's display name. - * @param workloadNetworkDnsZone NSX DNS Zone. + * @param segmentId The ID of the NSX Segment. * @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 nSX DNS Zone. */ @ServiceMethod(returns = ReturnType.SINGLE) - WorkloadNetworkDnsZoneInner createDnsZone( - String resourceGroupName, - String privateCloudName, - String dnsZoneId, - WorkloadNetworkDnsZoneInner workloadNetworkDnsZone); + void deleteSegment(String resourceGroupName, String privateCloudName, String segmentId); /** - * Create a DNS zone by id in a private cloud workload network. - * + * Delete a WorkloadNetworkSegment. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param dnsZoneId NSX DNS Zone identifier. Generally the same as the DNS Zone's display name. - * @param workloadNetworkDnsZone NSX DNS Zone. + * @param segmentId The ID of the NSX Segment. * @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 nSX DNS Zone. */ @ServiceMethod(returns = ReturnType.SINGLE) - WorkloadNetworkDnsZoneInner createDnsZone( - String resourceGroupName, - String privateCloudName, - String dnsZoneId, - WorkloadNetworkDnsZoneInner workloadNetworkDnsZone, - Context context); + void deleteSegment(String resourceGroupName, String privateCloudName, String segmentId, Context context); /** - * Create or update a DNS zone by id in a private cloud workload network. - * + * List WorkloadNetworkVirtualMachine resources by WorkloadNetwork. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param dnsZoneId NSX DNS Zone identifier. Generally the same as the DNS Zone's display name. - * @param workloadNetworkDnsZone NSX DNS Zone. * @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 nSX DNS Zone. + * @return the response of a WorkloadNetworkVirtualMachine list operation as paginated response with + * {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, WorkloadNetworkDnsZoneInner> beginUpdateDnsZone( - String resourceGroupName, - String privateCloudName, - String dnsZoneId, - WorkloadNetworkDnsZoneInner workloadNetworkDnsZone); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listVirtualMachines(String resourceGroupName, + String privateCloudName); /** - * Create or update a DNS zone by id in a private cloud workload network. - * + * List WorkloadNetworkVirtualMachine resources by WorkloadNetwork. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param dnsZoneId NSX DNS Zone identifier. Generally the same as the DNS Zone's display name. - * @param workloadNetworkDnsZone NSX DNS Zone. * @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 nSX DNS Zone. + * @return the response of a WorkloadNetworkVirtualMachine list operation as paginated response with + * {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, WorkloadNetworkDnsZoneInner> beginUpdateDnsZone( - String resourceGroupName, - String privateCloudName, - String dnsZoneId, - WorkloadNetworkDnsZoneInner workloadNetworkDnsZone, - Context context); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listVirtualMachines(String resourceGroupName, + String privateCloudName, Context context); /** - * Create or update a DNS zone by id in a private cloud workload network. - * + * Get a WorkloadNetworkVirtualMachine. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param dnsZoneId NSX DNS Zone identifier. Generally the same as the DNS Zone's display name. - * @param workloadNetworkDnsZone NSX DNS Zone. + * @param virtualMachineId ID of the virtual machine. + * @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 nSX DNS Zone. + * @return a WorkloadNetworkVirtualMachine along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - WorkloadNetworkDnsZoneInner updateDnsZone( - String resourceGroupName, - String privateCloudName, - String dnsZoneId, - WorkloadNetworkDnsZoneInner workloadNetworkDnsZone); + Response getVirtualMachineWithResponse(String resourceGroupName, + String privateCloudName, String virtualMachineId, Context context); /** - * Create or update a DNS zone by id in a private cloud workload network. - * + * Get a WorkloadNetworkVirtualMachine. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param dnsZoneId NSX DNS Zone identifier. Generally the same as the DNS Zone's display name. - * @param workloadNetworkDnsZone NSX DNS Zone. - * @param context The context to associate with this operation. + * @param virtualMachineId ID of the virtual machine. * @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 nSX DNS Zone. + * @return a WorkloadNetworkVirtualMachine. */ @ServiceMethod(returns = ReturnType.SINGLE) - WorkloadNetworkDnsZoneInner updateDnsZone( - String resourceGroupName, - String privateCloudName, - String dnsZoneId, - WorkloadNetworkDnsZoneInner workloadNetworkDnsZone, - Context context); + WorkloadNetworkVirtualMachineInner getVirtualMachine(String resourceGroupName, String privateCloudName, + String virtualMachineId); /** - * Delete a DNS zone by id in a private cloud workload network. - * + * List WorkloadNetworkVMGroup resources by WorkloadNetwork. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dnsZoneId NSX DNS Zone identifier. Generally the same as the DNS Zone's display name. * @param privateCloudName Name of the private cloud. * @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. + * @return the response of a WorkloadNetworkVMGroup list operation as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDeleteDnsZone( - String resourceGroupName, String dnsZoneId, String privateCloudName); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listVMGroups(String resourceGroupName, String privateCloudName); /** - * Delete a DNS zone by id in a private cloud workload network. - * + * List WorkloadNetworkVMGroup resources by WorkloadNetwork. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dnsZoneId NSX DNS Zone identifier. Generally the same as the DNS Zone's display name. * @param privateCloudName Name of the private cloud. * @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. + * @return the response of a WorkloadNetworkVMGroup list operation as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDeleteDnsZone( - String resourceGroupName, String dnsZoneId, String privateCloudName, Context context); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listVMGroups(String resourceGroupName, String privateCloudName, + Context context); /** - * Delete a DNS zone by id in a private cloud workload network. - * + * Get a WorkloadNetworkVMGroup. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dnsZoneId NSX DNS Zone identifier. Generally the same as the DNS Zone's display name. * @param privateCloudName Name of the private cloud. + * @param vmGroupId ID of the VM group. + * @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 a WorkloadNetworkVMGroup along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - void deleteDnsZone(String resourceGroupName, String dnsZoneId, String privateCloudName); + Response getVMGroupWithResponse(String resourceGroupName, String privateCloudName, + String vmGroupId, Context context); /** - * Delete a DNS zone by id in a private cloud workload network. - * + * Get a WorkloadNetworkVMGroup. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dnsZoneId NSX DNS Zone identifier. Generally the same as the DNS Zone's display name. * @param privateCloudName Name of the private cloud. - * @param context The context to associate with this operation. + * @param vmGroupId ID of the VM group. * @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 a WorkloadNetworkVMGroup. */ @ServiceMethod(returns = ReturnType.SINGLE) - void deleteDnsZone(String resourceGroupName, String dnsZoneId, String privateCloudName, Context context); + WorkloadNetworkVMGroupInner getVMGroup(String resourceGroupName, String privateCloudName, String vmGroupId); /** - * List of Public IP Blocks in a private cloud workload network. - * + * Create a WorkloadNetworkVMGroup. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param vmGroupId ID of the VM group. + * @param workloadNetworkVMGroup Resource create parameters. * @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 a list of NSX Public IP Blocks as paginated response with {@link PagedIterable}. + * @return the {@link SyncPoller} for polling of nSX VM Group. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listPublicIPs(String resourceGroupName, String privateCloudName); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, WorkloadNetworkVMGroupInner> beginCreateVMGroup( + String resourceGroupName, String privateCloudName, String vmGroupId, + WorkloadNetworkVMGroupInner workloadNetworkVMGroup); /** - * List of Public IP Blocks in a private cloud workload network. - * + * Create a WorkloadNetworkVMGroup. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param vmGroupId ID of the VM group. + * @param workloadNetworkVMGroup Resource create parameters. * @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 a list of NSX Public IP Blocks as paginated response with {@link PagedIterable}. + * @return the {@link SyncPoller} for polling of nSX VM Group. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listPublicIPs( - String resourceGroupName, String privateCloudName, Context context); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, WorkloadNetworkVMGroupInner> beginCreateVMGroup( + String resourceGroupName, String privateCloudName, String vmGroupId, + WorkloadNetworkVMGroupInner workloadNetworkVMGroup, Context context); /** - * Get a Public IP Block by id in a private cloud workload network. - * + * Create a WorkloadNetworkVMGroup. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param publicIpId NSX Public IP Block identifier. Generally the same as the Public IP Block's display name. - * @param context The context to associate with this operation. + * @param vmGroupId ID of the VM group. + * @param workloadNetworkVMGroup Resource create parameters. * @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 a Public IP Block by id in a private cloud workload network along with {@link Response}. + * @return nSX VM Group. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getPublicIpWithResponse( - String resourceGroupName, String privateCloudName, String publicIpId, Context context); + WorkloadNetworkVMGroupInner createVMGroup(String resourceGroupName, String privateCloudName, String vmGroupId, + WorkloadNetworkVMGroupInner workloadNetworkVMGroup); /** - * Get a Public IP Block by id in a private cloud workload network. - * + * Create a WorkloadNetworkVMGroup. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param publicIpId NSX Public IP Block identifier. Generally the same as the Public IP Block's display name. + * @param vmGroupId ID of the VM group. + * @param workloadNetworkVMGroup Resource create parameters. + * @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 a Public IP Block by id in a private cloud workload network. + * @return nSX VM Group. */ @ServiceMethod(returns = ReturnType.SINGLE) - WorkloadNetworkPublicIpInner getPublicIp(String resourceGroupName, String privateCloudName, String publicIpId); + WorkloadNetworkVMGroupInner createVMGroup(String resourceGroupName, String privateCloudName, String vmGroupId, + WorkloadNetworkVMGroupInner workloadNetworkVMGroup, Context context); /** - * Create a Public IP Block by id in a private cloud workload network. - * + * Update a WorkloadNetworkVMGroup. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param publicIpId NSX Public IP Block identifier. Generally the same as the Public IP Block's display name. - * @param workloadNetworkPublicIp NSX Public IP Block. + * @param vmGroupId ID of the VM group. + * @param workloadNetworkVMGroup The resource properties to be updated. * @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 nSX Public IP Block. + * @return the {@link SyncPoller} for polling of nSX VM Group. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, WorkloadNetworkPublicIpInner> beginCreatePublicIp( - String resourceGroupName, - String privateCloudName, - String publicIpId, - WorkloadNetworkPublicIpInner workloadNetworkPublicIp); + SyncPoller, WorkloadNetworkVMGroupInner> beginUpdateVMGroup( + String resourceGroupName, String privateCloudName, String vmGroupId, + WorkloadNetworkVMGroupUpdate workloadNetworkVMGroup); /** - * Create a Public IP Block by id in a private cloud workload network. - * + * Update a WorkloadNetworkVMGroup. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param publicIpId NSX Public IP Block identifier. Generally the same as the Public IP Block's display name. - * @param workloadNetworkPublicIp NSX Public IP Block. + * @param vmGroupId ID of the VM group. + * @param workloadNetworkVMGroup The resource properties to be updated. * @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 nSX Public IP Block. + * @return the {@link SyncPoller} for polling of nSX VM Group. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, WorkloadNetworkPublicIpInner> beginCreatePublicIp( - String resourceGroupName, - String privateCloudName, - String publicIpId, - WorkloadNetworkPublicIpInner workloadNetworkPublicIp, - Context context); + SyncPoller, WorkloadNetworkVMGroupInner> beginUpdateVMGroup( + String resourceGroupName, String privateCloudName, String vmGroupId, + WorkloadNetworkVMGroupUpdate workloadNetworkVMGroup, Context context); /** - * Create a Public IP Block by id in a private cloud workload network. - * + * Update a WorkloadNetworkVMGroup. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param publicIpId NSX Public IP Block identifier. Generally the same as the Public IP Block's display name. - * @param workloadNetworkPublicIp NSX Public IP Block. + * @param vmGroupId ID of the VM group. + * @param workloadNetworkVMGroup The resource properties to be updated. * @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 nSX Public IP Block. + * @return nSX VM Group. */ @ServiceMethod(returns = ReturnType.SINGLE) - WorkloadNetworkPublicIpInner createPublicIp( - String resourceGroupName, - String privateCloudName, - String publicIpId, - WorkloadNetworkPublicIpInner workloadNetworkPublicIp); + WorkloadNetworkVMGroupInner updateVMGroup(String resourceGroupName, String privateCloudName, String vmGroupId, + WorkloadNetworkVMGroupUpdate workloadNetworkVMGroup); /** - * Create a Public IP Block by id in a private cloud workload network. - * + * Update a WorkloadNetworkVMGroup. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param publicIpId NSX Public IP Block identifier. Generally the same as the Public IP Block's display name. - * @param workloadNetworkPublicIp NSX Public IP Block. + * @param vmGroupId ID of the VM group. + * @param workloadNetworkVMGroup The resource properties to be updated. * @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 nSX Public IP Block. + * @return nSX VM Group. */ @ServiceMethod(returns = ReturnType.SINGLE) - WorkloadNetworkPublicIpInner createPublicIp( - String resourceGroupName, - String privateCloudName, - String publicIpId, - WorkloadNetworkPublicIpInner workloadNetworkPublicIp, - Context context); + WorkloadNetworkVMGroupInner updateVMGroup(String resourceGroupName, String privateCloudName, String vmGroupId, + WorkloadNetworkVMGroupUpdate workloadNetworkVMGroup, Context context); /** - * Delete a Public IP Block by id in a private cloud workload network. - * + * Delete a WorkloadNetworkVMGroup. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param publicIpId NSX Public IP Block identifier. Generally the same as the Public IP Block's display name. + * @param vmGroupId ID of the VM group. * @param privateCloudName Name of the private cloud. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -2003,14 +1862,14 @@ WorkloadNetworkPublicIpInner createPublicIp( * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDeletePublicIp( - String resourceGroupName, String publicIpId, String privateCloudName); + SyncPoller, Void> beginDeleteVMGroup(String resourceGroupName, String vmGroupId, + String privateCloudName); /** - * Delete a Public IP Block by id in a private cloud workload network. - * + * Delete a WorkloadNetworkVMGroup. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param publicIpId NSX Public IP Block identifier. Generally the same as the Public IP Block's display name. + * @param vmGroupId ID of the VM group. * @param privateCloudName Name of the private cloud. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -2019,27 +1878,27 @@ SyncPoller, Void> beginDeletePublicIp( * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDeletePublicIp( - String resourceGroupName, String publicIpId, String privateCloudName, Context context); + SyncPoller, Void> beginDeleteVMGroup(String resourceGroupName, String vmGroupId, + String privateCloudName, Context context); /** - * Delete a Public IP Block by id in a private cloud workload network. - * + * Delete a WorkloadNetworkVMGroup. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param publicIpId NSX Public IP Block identifier. Generally the same as the Public IP Block's display name. + * @param vmGroupId ID of the VM group. * @param privateCloudName Name of the private cloud. * @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 deletePublicIp(String resourceGroupName, String publicIpId, String privateCloudName); + void deleteVMGroup(String resourceGroupName, String vmGroupId, String privateCloudName); /** - * Delete a Public IP Block by id in a private cloud workload network. - * + * Delete a WorkloadNetworkVMGroup. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param publicIpId NSX Public IP Block identifier. Generally the same as the Public IP Block's display name. + * @param vmGroupId ID of the VM group. * @param privateCloudName Name of the private cloud. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -2047,5 +1906,5 @@ SyncPoller, Void> beginDeletePublicIp( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ @ServiceMethod(returns = ReturnType.SINGLE) - void deletePublicIp(String resourceGroupName, String publicIpId, String privateCloudName, Context context); + void deleteVMGroup(String resourceGroupName, String vmGroupId, String privateCloudName, Context context); } diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/AddonInner.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/AddonInner.java index 2d3bd1b34ce8f..25a7e7f04ef86 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/AddonInner.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/AddonInner.java @@ -6,25 +6,36 @@ import com.azure.core.annotation.Fluent; import com.azure.core.management.ProxyResource; +import com.azure.core.management.SystemData; import com.azure.resourcemanager.avs.models.AddonProperties; import com.fasterxml.jackson.annotation.JsonProperty; -/** An addon resource. */ +/** + * An addon resource. + */ @Fluent public final class AddonInner extends ProxyResource { /* - * The properties of an addon resource + * The resource-specific properties for this resource. */ @JsonProperty(value = "properties") private AddonProperties properties; - /** Creates an instance of AddonInner class. */ + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) + private SystemData systemData; + + /** + * Creates an instance of AddonInner class. + */ public AddonInner() { } /** - * Get the properties property: The properties of an addon resource. - * + * Get the properties property: The resource-specific properties for this resource. + * * @return the properties value. */ public AddonProperties properties() { @@ -32,8 +43,8 @@ public AddonProperties properties() { } /** - * Set the properties property: The properties of an addon resource. - * + * Set the properties property: The resource-specific properties for this resource. + * * @param properties the properties value to set. * @return the AddonInner object itself. */ @@ -42,9 +53,18 @@ public AddonInner withProperties(AddonProperties properties) { 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; + } + /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/AdminCredentialsInner.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/AdminCredentialsInner.java index f08bbd7362a6c..21dc7769b75ee 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/AdminCredentialsInner.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/AdminCredentialsInner.java @@ -7,7 +7,9 @@ import com.azure.core.annotation.Immutable; import com.fasterxml.jackson.annotation.JsonProperty; -/** Administrative credentials for accessing vCenter and NSX-T. */ +/** + * Administrative credentials for accessing vCenter and NSX-T. + */ @Immutable public final class AdminCredentialsInner { /* @@ -34,13 +36,15 @@ public final class AdminCredentialsInner { @JsonProperty(value = "vcenterPassword", access = JsonProperty.Access.WRITE_ONLY) private String vcenterPassword; - /** Creates an instance of AdminCredentialsInner class. */ + /** + * Creates an instance of AdminCredentialsInner class. + */ public AdminCredentialsInner() { } /** * Get the nsxtUsername property: NSX-T Manager username. - * + * * @return the nsxtUsername value. */ public String nsxtUsername() { @@ -49,7 +53,7 @@ public String nsxtUsername() { /** * Get the nsxtPassword property: NSX-T Manager password. - * + * * @return the nsxtPassword value. */ public String nsxtPassword() { @@ -58,7 +62,7 @@ public String nsxtPassword() { /** * Get the vcenterUsername property: vCenter admin username. - * + * * @return the vcenterUsername value. */ public String vcenterUsername() { @@ -67,7 +71,7 @@ public String vcenterUsername() { /** * Get the vcenterPassword property: vCenter admin password. - * + * * @return the vcenterPassword value. */ public String vcenterPassword() { @@ -76,7 +80,7 @@ public String vcenterPassword() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/CloudLinkInner.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/CloudLinkInner.java index 9375349cf0369..635487e9f0ed8 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/CloudLinkInner.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/CloudLinkInner.java @@ -6,34 +6,64 @@ import com.azure.core.annotation.Fluent; import com.azure.core.management.ProxyResource; +import com.azure.core.management.SystemData; +import com.azure.resourcemanager.avs.models.CloudLinkProvisioningState; import com.azure.resourcemanager.avs.models.CloudLinkStatus; import com.fasterxml.jackson.annotation.JsonProperty; -/** A cloud link resource. */ +/** + * A cloud link resource. + */ @Fluent public final class CloudLinkInner extends ProxyResource { /* - * The properties of a cloud link. + * The resource-specific properties for this resource. */ @JsonProperty(value = "properties") private CloudLinkProperties innerProperties; - /** Creates an instance of CloudLinkInner class. */ + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) + private SystemData systemData; + + /** + * Creates an instance of CloudLinkInner class. + */ public CloudLinkInner() { } /** - * Get the innerProperties property: The properties of a cloud link. - * + * Get the innerProperties property: The resource-specific properties for this resource. + * * @return the innerProperties value. */ private CloudLinkProperties innerProperties() { return this.innerProperties; } + /** + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + + /** + * Get the provisioningState property: The provisioning state of the resource. + * + * @return the provisioningState value. + */ + public CloudLinkProvisioningState provisioningState() { + return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); + } + /** * Get the status property: The state of the cloud link. - * + * * @return the status value. */ public CloudLinkStatus status() { @@ -42,7 +72,7 @@ public CloudLinkStatus status() { /** * Get the linkedCloud property: Identifier of the other private cloud participating in the link. - * + * * @return the linkedCloud value. */ public String linkedCloud() { @@ -51,7 +81,7 @@ public String linkedCloud() { /** * Set the linkedCloud property: Identifier of the other private cloud participating in the link. - * + * * @param linkedCloud the linkedCloud value to set. * @return the CloudLinkInner object itself. */ @@ -65,7 +95,7 @@ public CloudLinkInner withLinkedCloud(String linkedCloud) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/CloudLinkProperties.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/CloudLinkProperties.java index 7fe8859f78a73..60cf3affbe9b2 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/CloudLinkProperties.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/CloudLinkProperties.java @@ -5,12 +5,21 @@ package com.azure.resourcemanager.avs.fluent.models; import com.azure.core.annotation.Fluent; +import com.azure.resourcemanager.avs.models.CloudLinkProvisioningState; import com.azure.resourcemanager.avs.models.CloudLinkStatus; import com.fasterxml.jackson.annotation.JsonProperty; -/** The properties of a cloud link. */ +/** + * The properties of a cloud link. + */ @Fluent public final class CloudLinkProperties { + /* + * The provisioning state of the resource. + */ + @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private CloudLinkProvisioningState provisioningState; + /* * The state of the cloud link. */ @@ -23,13 +32,24 @@ public final class CloudLinkProperties { @JsonProperty(value = "linkedCloud") private String linkedCloud; - /** Creates an instance of CloudLinkProperties class. */ + /** + * Creates an instance of CloudLinkProperties class. + */ public CloudLinkProperties() { } + /** + * Get the provisioningState property: The provisioning state of the resource. + * + * @return the provisioningState value. + */ + public CloudLinkProvisioningState provisioningState() { + return this.provisioningState; + } + /** * Get the status property: The state of the cloud link. - * + * * @return the status value. */ public CloudLinkStatus status() { @@ -38,7 +58,7 @@ public CloudLinkStatus status() { /** * Get the linkedCloud property: Identifier of the other private cloud participating in the link. - * + * * @return the linkedCloud value. */ public String linkedCloud() { @@ -47,7 +67,7 @@ public String linkedCloud() { /** * Set the linkedCloud property: Identifier of the other private cloud participating in the link. - * + * * @param linkedCloud the linkedCloud value to set. * @return the CloudLinkProperties object itself. */ @@ -58,7 +78,7 @@ public CloudLinkProperties withLinkedCloud(String linkedCloud) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/ClusterInner.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/ClusterInner.java index f3a74f1742417..2ab8d9b942171 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/ClusterInner.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/ClusterInner.java @@ -6,34 +6,54 @@ import com.azure.core.annotation.Fluent; import com.azure.core.management.ProxyResource; +import com.azure.core.management.SystemData; import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.avs.models.ClusterProvisioningState; import com.azure.resourcemanager.avs.models.Sku; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** A cluster resource. */ +/** + * A cluster resource. + */ @Fluent public final class ClusterInner extends ProxyResource { /* - * The cluster SKU + * The resource-specific properties for this resource. + */ + @JsonProperty(value = "properties") + private ClusterProperties innerProperties; + + /* + * The SKU (Stock Keeping Unit) assigned to this resource. */ @JsonProperty(value = "sku", required = true) private Sku sku; /* - * The properties of a cluster resource + * Azure Resource Manager metadata containing createdBy and modifiedBy information. */ - @JsonProperty(value = "properties") - private ClusterProperties innerProperties; + @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) + private SystemData systemData; - /** Creates an instance of ClusterInner class. */ + /** + * Creates an instance of ClusterInner class. + */ public ClusterInner() { } /** - * Get the sku property: The cluster SKU. - * + * Get the innerProperties property: The resource-specific properties for this resource. + * + * @return the innerProperties value. + */ + private ClusterProperties innerProperties() { + return this.innerProperties; + } + + /** + * Get the sku property: The SKU (Stock Keeping Unit) assigned to this resource. + * * @return the sku value. */ public Sku sku() { @@ -41,8 +61,8 @@ public Sku sku() { } /** - * Set the sku property: The cluster SKU. - * + * Set the sku property: The SKU (Stock Keeping Unit) assigned to this resource. + * * @param sku the sku value to set. * @return the ClusterInner object itself. */ @@ -52,17 +72,17 @@ public ClusterInner withSku(Sku sku) { } /** - * Get the innerProperties property: The properties of a cluster resource. - * - * @return the innerProperties value. + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. */ - private ClusterProperties innerProperties() { - return this.innerProperties; + public SystemData systemData() { + return this.systemData; } /** * Get the clusterSize property: The cluster size. - * + * * @return the clusterSize value. */ public Integer clusterSize() { @@ -71,7 +91,7 @@ public Integer clusterSize() { /** * Set the clusterSize property: The cluster size. - * + * * @param clusterSize the clusterSize value to set. * @return the ClusterInner object itself. */ @@ -85,7 +105,7 @@ public ClusterInner withClusterSize(Integer clusterSize) { /** * Get the provisioningState property: The state of the cluster provisioning. - * + * * @return the provisioningState value. */ public ClusterProvisioningState provisioningState() { @@ -94,7 +114,7 @@ public ClusterProvisioningState provisioningState() { /** * Get the clusterId property: The identity. - * + * * @return the clusterId value. */ public Integer clusterId() { @@ -103,7 +123,7 @@ public Integer clusterId() { /** * Get the hosts property: The hosts. - * + * * @return the hosts value. */ public List hosts() { @@ -112,7 +132,7 @@ public List hosts() { /** * Set the hosts property: The hosts. - * + * * @param hosts the hosts value to set. * @return the ClusterInner object itself. */ @@ -124,22 +144,44 @@ public ClusterInner withHosts(List hosts) { return this; } + /** + * Get the vsanDatastoreName property: Name of the vsan datastore associated with the cluster. + * + * @return the vsanDatastoreName value. + */ + public String vsanDatastoreName() { + return this.innerProperties() == null ? null : this.innerProperties().vsanDatastoreName(); + } + + /** + * Set the vsanDatastoreName property: Name of the vsan datastore associated with the cluster. + * + * @param vsanDatastoreName the vsanDatastoreName value to set. + * @return the ClusterInner object itself. + */ + public ClusterInner withVsanDatastoreName(String vsanDatastoreName) { + if (this.innerProperties() == null) { + this.innerProperties = new ClusterProperties(); + } + this.innerProperties().withVsanDatastoreName(vsanDatastoreName); + return this; + } + /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { + if (innerProperties() != null) { + innerProperties().validate(); + } if (sku() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property sku in model ClusterInner")); + throw LOGGER.logExceptionAsError( + new IllegalArgumentException("Missing required property sku in model ClusterInner")); } else { sku().validate(); } - if (innerProperties() != null) { - innerProperties().validate(); - } } private static final ClientLogger LOGGER = new ClientLogger(ClusterInner.class); diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/ClusterProperties.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/ClusterProperties.java index 4d8593001660e..1a82052d73096 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/ClusterProperties.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/ClusterProperties.java @@ -5,37 +5,134 @@ package com.azure.resourcemanager.avs.fluent.models; import com.azure.core.annotation.Fluent; -import com.azure.resourcemanager.avs.models.CommonClusterProperties; +import com.azure.resourcemanager.avs.models.ClusterProvisioningState; +import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** The properties of a cluster. */ +/** + * The properties of a cluster. + */ @Fluent -public final class ClusterProperties extends CommonClusterProperties { - /** Creates an instance of ClusterProperties class. */ +public final class ClusterProperties { + /* + * The cluster size + */ + @JsonProperty(value = "clusterSize") + private Integer clusterSize; + + /* + * The state of the cluster provisioning + */ + @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private ClusterProvisioningState provisioningState; + + /* + * The identity + */ + @JsonProperty(value = "clusterId", access = JsonProperty.Access.WRITE_ONLY) + private Integer clusterId; + + /* + * The hosts + */ + @JsonProperty(value = "hosts") + private List hosts; + + /* + * Name of the vsan datastore associated with the cluster + */ + @JsonProperty(value = "vsanDatastoreName") + private String vsanDatastoreName; + + /** + * Creates an instance of ClusterProperties class. + */ public ClusterProperties() { } - /** {@inheritDoc} */ - @Override + /** + * Get the clusterSize property: The cluster size. + * + * @return the clusterSize value. + */ + public Integer clusterSize() { + return this.clusterSize; + } + + /** + * Set the clusterSize property: The cluster size. + * + * @param clusterSize the clusterSize value to set. + * @return the ClusterProperties object itself. + */ public ClusterProperties withClusterSize(Integer clusterSize) { - super.withClusterSize(clusterSize); + this.clusterSize = clusterSize; return this; } - /** {@inheritDoc} */ - @Override + /** + * Get the provisioningState property: The state of the cluster provisioning. + * + * @return the provisioningState value. + */ + public ClusterProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Get the clusterId property: The identity. + * + * @return the clusterId value. + */ + public Integer clusterId() { + return this.clusterId; + } + + /** + * Get the hosts property: The hosts. + * + * @return the hosts value. + */ + public List hosts() { + return this.hosts; + } + + /** + * Set the hosts property: The hosts. + * + * @param hosts the hosts value to set. + * @return the ClusterProperties object itself. + */ public ClusterProperties withHosts(List hosts) { - super.withHosts(hosts); + this.hosts = hosts; + return this; + } + + /** + * Get the vsanDatastoreName property: Name of the vsan datastore associated with the cluster. + * + * @return the vsanDatastoreName value. + */ + public String vsanDatastoreName() { + return this.vsanDatastoreName; + } + + /** + * Set the vsanDatastoreName property: Name of the vsan datastore associated with the cluster. + * + * @param vsanDatastoreName the vsanDatastoreName value to set. + * @return the ClusterProperties object itself. + */ + public ClusterProperties withVsanDatastoreName(String vsanDatastoreName) { + this.vsanDatastoreName = vsanDatastoreName; return this; } /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ - @Override public void validate() { - super.validate(); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/ClusterUpdateProperties.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/ClusterUpdateProperties.java index 122bc7b0f6833..c997d0744ee3a 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/ClusterUpdateProperties.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/ClusterUpdateProperties.java @@ -8,7 +8,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** The properties of a cluster that may be updated. */ +/** + * The properties of a cluster that may be updated. + */ @Fluent public final class ClusterUpdateProperties { /* @@ -23,13 +25,15 @@ public final class ClusterUpdateProperties { @JsonProperty(value = "hosts") private List hosts; - /** Creates an instance of ClusterUpdateProperties class. */ + /** + * Creates an instance of ClusterUpdateProperties class. + */ public ClusterUpdateProperties() { } /** * Get the clusterSize property: The cluster size. - * + * * @return the clusterSize value. */ public Integer clusterSize() { @@ -38,7 +42,7 @@ public Integer clusterSize() { /** * Set the clusterSize property: The cluster size. - * + * * @param clusterSize the clusterSize value to set. * @return the ClusterUpdateProperties object itself. */ @@ -49,7 +53,7 @@ public ClusterUpdateProperties withClusterSize(Integer clusterSize) { /** * Get the hosts property: The hosts. - * + * * @return the hosts value. */ public List hosts() { @@ -58,7 +62,7 @@ public List hosts() { /** * Set the hosts property: The hosts. - * + * * @param hosts the hosts value to set. * @return the ClusterUpdateProperties object itself. */ @@ -69,7 +73,7 @@ public ClusterUpdateProperties withHosts(List hosts) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/ClusterZoneListInner.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/ClusterZoneListInner.java index 3b054fcb974d1..4621f1bd82ef4 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/ClusterZoneListInner.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/ClusterZoneListInner.java @@ -9,7 +9,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** List of all zones and associated hosts for a cluster. */ +/** + * List of all zones and associated hosts for a cluster. + */ @Fluent public final class ClusterZoneListInner { /* @@ -18,13 +20,15 @@ public final class ClusterZoneListInner { @JsonProperty(value = "zones") private List zones; - /** Creates an instance of ClusterZoneListInner class. */ + /** + * Creates an instance of ClusterZoneListInner class. + */ public ClusterZoneListInner() { } /** * Get the zones property: Zone and associated hosts info. - * + * * @return the zones value. */ public List zones() { @@ -33,7 +37,7 @@ public List zones() { /** * Set the zones property: Zone and associated hosts info. - * + * * @param zones the zones value to set. * @return the ClusterZoneListInner object itself. */ @@ -44,7 +48,7 @@ public ClusterZoneListInner withZones(List zones) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/DatastoreInner.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/DatastoreInner.java index 2f28c024df6f1..3a51b03a3b730 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/DatastoreInner.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/DatastoreInner.java @@ -6,37 +6,58 @@ import com.azure.core.annotation.Fluent; import com.azure.core.management.ProxyResource; +import com.azure.core.management.SystemData; import com.azure.resourcemanager.avs.models.DatastoreProvisioningState; import com.azure.resourcemanager.avs.models.DatastoreStatus; import com.azure.resourcemanager.avs.models.DiskPoolVolume; +import com.azure.resourcemanager.avs.models.ElasticSanVolume; import com.azure.resourcemanager.avs.models.NetAppVolume; import com.fasterxml.jackson.annotation.JsonProperty; -/** A datastore resource. */ +/** + * A datastore resource. + */ @Fluent public final class DatastoreInner extends ProxyResource { /* - * The properties of a datastore resource + * The resource-specific properties for this resource. */ @JsonProperty(value = "properties") private DatastoreProperties innerProperties; - /** Creates an instance of DatastoreInner class. */ + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) + private SystemData systemData; + + /** + * Creates an instance of DatastoreInner class. + */ public DatastoreInner() { } /** - * Get the innerProperties property: The properties of a datastore resource. - * + * Get the innerProperties property: The resource-specific properties for this resource. + * * @return the innerProperties value. */ private DatastoreProperties innerProperties() { return this.innerProperties; } + /** + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + /** * Get the provisioningState property: The state of the datastore provisioning. - * + * * @return the provisioningState value. */ public DatastoreProvisioningState provisioningState() { @@ -45,7 +66,7 @@ public DatastoreProvisioningState provisioningState() { /** * Get the netAppVolume property: An Azure NetApp Files volume. - * + * * @return the netAppVolume value. */ public NetAppVolume netAppVolume() { @@ -54,7 +75,7 @@ public NetAppVolume netAppVolume() { /** * Set the netAppVolume property: An Azure NetApp Files volume. - * + * * @param netAppVolume the netAppVolume value to set. * @return the DatastoreInner object itself. */ @@ -68,7 +89,7 @@ public DatastoreInner withNetAppVolume(NetAppVolume netAppVolume) { /** * Get the diskPoolVolume property: An iSCSI volume. - * + * * @return the diskPoolVolume value. */ public DiskPoolVolume diskPoolVolume() { @@ -77,7 +98,7 @@ public DiskPoolVolume diskPoolVolume() { /** * Set the diskPoolVolume property: An iSCSI volume. - * + * * @param diskPoolVolume the diskPoolVolume value to set. * @return the DatastoreInner object itself. */ @@ -89,9 +110,32 @@ public DatastoreInner withDiskPoolVolume(DiskPoolVolume diskPoolVolume) { return this; } + /** + * Get the elasticSanVolume property: An Elastic SAN volume. + * + * @return the elasticSanVolume value. + */ + public ElasticSanVolume elasticSanVolume() { + return this.innerProperties() == null ? null : this.innerProperties().elasticSanVolume(); + } + + /** + * Set the elasticSanVolume property: An Elastic SAN volume. + * + * @param elasticSanVolume the elasticSanVolume value to set. + * @return the DatastoreInner object itself. + */ + public DatastoreInner withElasticSanVolume(ElasticSanVolume elasticSanVolume) { + if (this.innerProperties() == null) { + this.innerProperties = new DatastoreProperties(); + } + this.innerProperties().withElasticSanVolume(elasticSanVolume); + return this; + } + /** * Get the status property: The operational status of the datastore. - * + * * @return the status value. */ public DatastoreStatus status() { @@ -100,7 +144,7 @@ public DatastoreStatus status() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/DatastoreProperties.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/DatastoreProperties.java index 6971f37da436a..231bc0f403117 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/DatastoreProperties.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/DatastoreProperties.java @@ -8,10 +8,13 @@ import com.azure.resourcemanager.avs.models.DatastoreProvisioningState; import com.azure.resourcemanager.avs.models.DatastoreStatus; import com.azure.resourcemanager.avs.models.DiskPoolVolume; +import com.azure.resourcemanager.avs.models.ElasticSanVolume; import com.azure.resourcemanager.avs.models.NetAppVolume; import com.fasterxml.jackson.annotation.JsonProperty; -/** The properties of a datastore. */ +/** + * The properties of a datastore. + */ @Fluent public final class DatastoreProperties { /* @@ -32,19 +35,27 @@ public final class DatastoreProperties { @JsonProperty(value = "diskPoolVolume") private DiskPoolVolume diskPoolVolume; + /* + * An Elastic SAN volume + */ + @JsonProperty(value = "elasticSanVolume") + private ElasticSanVolume elasticSanVolume; + /* * The operational status of the datastore */ @JsonProperty(value = "status", access = JsonProperty.Access.WRITE_ONLY) private DatastoreStatus status; - /** Creates an instance of DatastoreProperties class. */ + /** + * Creates an instance of DatastoreProperties class. + */ public DatastoreProperties() { } /** * Get the provisioningState property: The state of the datastore provisioning. - * + * * @return the provisioningState value. */ public DatastoreProvisioningState provisioningState() { @@ -53,7 +64,7 @@ public DatastoreProvisioningState provisioningState() { /** * Get the netAppVolume property: An Azure NetApp Files volume. - * + * * @return the netAppVolume value. */ public NetAppVolume netAppVolume() { @@ -62,7 +73,7 @@ public NetAppVolume netAppVolume() { /** * Set the netAppVolume property: An Azure NetApp Files volume. - * + * * @param netAppVolume the netAppVolume value to set. * @return the DatastoreProperties object itself. */ @@ -73,7 +84,7 @@ public DatastoreProperties withNetAppVolume(NetAppVolume netAppVolume) { /** * Get the diskPoolVolume property: An iSCSI volume. - * + * * @return the diskPoolVolume value. */ public DiskPoolVolume diskPoolVolume() { @@ -82,7 +93,7 @@ public DiskPoolVolume diskPoolVolume() { /** * Set the diskPoolVolume property: An iSCSI volume. - * + * * @param diskPoolVolume the diskPoolVolume value to set. * @return the DatastoreProperties object itself. */ @@ -91,9 +102,29 @@ public DatastoreProperties withDiskPoolVolume(DiskPoolVolume diskPoolVolume) { return this; } + /** + * Get the elasticSanVolume property: An Elastic SAN volume. + * + * @return the elasticSanVolume value. + */ + public ElasticSanVolume elasticSanVolume() { + return this.elasticSanVolume; + } + + /** + * Set the elasticSanVolume property: An Elastic SAN volume. + * + * @param elasticSanVolume the elasticSanVolume value to set. + * @return the DatastoreProperties object itself. + */ + public DatastoreProperties withElasticSanVolume(ElasticSanVolume elasticSanVolume) { + this.elasticSanVolume = elasticSanVolume; + return this; + } + /** * Get the status property: The operational status of the datastore. - * + * * @return the status value. */ public DatastoreStatus status() { @@ -102,7 +133,7 @@ public DatastoreStatus status() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { @@ -112,5 +143,8 @@ public void validate() { if (diskPoolVolume() != null) { diskPoolVolume().validate(); } + if (elasticSanVolume() != null) { + elasticSanVolume().validate(); + } } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/ExpressRouteAuthorizationInner.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/ExpressRouteAuthorizationInner.java index 6cfe9af0432b1..facbdaa00736f 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/ExpressRouteAuthorizationInner.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/ExpressRouteAuthorizationInner.java @@ -4,36 +4,56 @@ package com.azure.resourcemanager.avs.fluent.models; -import com.azure.core.annotation.Immutable; +import com.azure.core.annotation.Fluent; import com.azure.core.management.ProxyResource; +import com.azure.core.management.SystemData; import com.azure.resourcemanager.avs.models.ExpressRouteAuthorizationProvisioningState; import com.fasterxml.jackson.annotation.JsonProperty; -/** ExpressRoute Circuit Authorization. */ -@Immutable +/** + * ExpressRoute Circuit Authorization. + */ +@Fluent public final class ExpressRouteAuthorizationInner extends ProxyResource { /* - * The properties of an ExpressRoute Circuit Authorization resource + * The resource-specific properties for this resource. */ - @JsonProperty(value = "properties", access = JsonProperty.Access.WRITE_ONLY) + @JsonProperty(value = "properties") private ExpressRouteAuthorizationProperties innerProperties; - /** Creates an instance of ExpressRouteAuthorizationInner class. */ + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) + private SystemData systemData; + + /** + * Creates an instance of ExpressRouteAuthorizationInner class. + */ public ExpressRouteAuthorizationInner() { } /** - * Get the innerProperties property: The properties of an ExpressRoute Circuit Authorization resource. - * + * Get the innerProperties property: The resource-specific properties for this resource. + * * @return the innerProperties value. */ private ExpressRouteAuthorizationProperties innerProperties() { return this.innerProperties; } + /** + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + /** * Get the provisioningState property: The state of the ExpressRoute Circuit Authorization provisioning. - * + * * @return the provisioningState value. */ public ExpressRouteAuthorizationProvisioningState provisioningState() { @@ -42,7 +62,7 @@ public ExpressRouteAuthorizationProvisioningState provisioningState() { /** * Get the expressRouteAuthorizationId property: The ID of the ExpressRoute Circuit Authorization. - * + * * @return the expressRouteAuthorizationId value. */ public String expressRouteAuthorizationId() { @@ -51,7 +71,7 @@ public String expressRouteAuthorizationId() { /** * Get the expressRouteAuthorizationKey property: The key of the ExpressRoute Circuit Authorization. - * + * * @return the expressRouteAuthorizationKey value. */ public String expressRouteAuthorizationKey() { @@ -60,7 +80,7 @@ public String expressRouteAuthorizationKey() { /** * Get the expressRouteId property: The ID of the ExpressRoute Circuit. - * + * * @return the expressRouteId value. */ public String expressRouteId() { @@ -69,7 +89,7 @@ public String expressRouteId() { /** * Set the expressRouteId property: The ID of the ExpressRoute Circuit. - * + * * @param expressRouteId the expressRouteId value to set. * @return the ExpressRouteAuthorizationInner object itself. */ @@ -83,7 +103,7 @@ public ExpressRouteAuthorizationInner withExpressRouteId(String expressRouteId) /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/ExpressRouteAuthorizationProperties.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/ExpressRouteAuthorizationProperties.java index 282f0e6c2e860..81f511fae2a24 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/ExpressRouteAuthorizationProperties.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/ExpressRouteAuthorizationProperties.java @@ -8,11 +8,13 @@ import com.azure.resourcemanager.avs.models.ExpressRouteAuthorizationProvisioningState; import com.fasterxml.jackson.annotation.JsonProperty; -/** The properties of an ExpressRoute Circuit Authorization resource. */ +/** + * The properties of an ExpressRoute Circuit Authorization resource. + */ @Fluent public final class ExpressRouteAuthorizationProperties { /* - * The state of the ExpressRoute Circuit Authorization provisioning + * The state of the ExpressRoute Circuit Authorization provisioning */ @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) private ExpressRouteAuthorizationProvisioningState provisioningState; @@ -35,13 +37,15 @@ public final class ExpressRouteAuthorizationProperties { @JsonProperty(value = "expressRouteId") private String expressRouteId; - /** Creates an instance of ExpressRouteAuthorizationProperties class. */ + /** + * Creates an instance of ExpressRouteAuthorizationProperties class. + */ public ExpressRouteAuthorizationProperties() { } /** * Get the provisioningState property: The state of the ExpressRoute Circuit Authorization provisioning. - * + * * @return the provisioningState value. */ public ExpressRouteAuthorizationProvisioningState provisioningState() { @@ -50,7 +54,7 @@ public ExpressRouteAuthorizationProvisioningState provisioningState() { /** * Get the expressRouteAuthorizationId property: The ID of the ExpressRoute Circuit Authorization. - * + * * @return the expressRouteAuthorizationId value. */ public String expressRouteAuthorizationId() { @@ -59,7 +63,7 @@ public String expressRouteAuthorizationId() { /** * Get the expressRouteAuthorizationKey property: The key of the ExpressRoute Circuit Authorization. - * + * * @return the expressRouteAuthorizationKey value. */ public String expressRouteAuthorizationKey() { @@ -68,7 +72,7 @@ public String expressRouteAuthorizationKey() { /** * Get the expressRouteId property: The ID of the ExpressRoute Circuit. - * + * * @return the expressRouteId value. */ public String expressRouteId() { @@ -77,7 +81,7 @@ public String expressRouteId() { /** * Set the expressRouteId property: The ID of the ExpressRoute Circuit. - * + * * @param expressRouteId the expressRouteId value to set. * @return the ExpressRouteAuthorizationProperties object itself. */ @@ -88,7 +92,7 @@ public ExpressRouteAuthorizationProperties withExpressRouteId(String expressRout /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/GlobalReachConnectionInner.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/GlobalReachConnectionInner.java index 649dfe6debbe3..9de8167d996b0 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/GlobalReachConnectionInner.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/GlobalReachConnectionInner.java @@ -6,35 +6,55 @@ import com.azure.core.annotation.Fluent; import com.azure.core.management.ProxyResource; +import com.azure.core.management.SystemData; import com.azure.resourcemanager.avs.models.GlobalReachConnectionProvisioningState; import com.azure.resourcemanager.avs.models.GlobalReachConnectionStatus; import com.fasterxml.jackson.annotation.JsonProperty; -/** A global reach connection resource. */ +/** + * A global reach connection resource. + */ @Fluent public final class GlobalReachConnectionInner extends ProxyResource { /* - * The properties of a global reach connection resource + * The resource-specific properties for this resource. */ @JsonProperty(value = "properties") private GlobalReachConnectionProperties innerProperties; - /** Creates an instance of GlobalReachConnectionInner class. */ + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) + private SystemData systemData; + + /** + * Creates an instance of GlobalReachConnectionInner class. + */ public GlobalReachConnectionInner() { } /** - * Get the innerProperties property: The properties of a global reach connection resource. - * + * Get the innerProperties property: The resource-specific properties for this resource. + * * @return the innerProperties value. */ private GlobalReachConnectionProperties innerProperties() { return this.innerProperties; } + /** + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + /** * Get the provisioningState property: The state of the ExpressRoute Circuit Authorization provisioning. - * + * * @return the provisioningState value. */ public GlobalReachConnectionProvisioningState provisioningState() { @@ -44,7 +64,7 @@ public GlobalReachConnectionProvisioningState provisioningState() { /** * Get the addressPrefix property: The network used for global reach carved out from the original network block * provided for the private cloud. - * + * * @return the addressPrefix value. */ public String addressPrefix() { @@ -54,7 +74,7 @@ public String addressPrefix() { /** * Get the authorizationKey property: Authorization key from the peer express route used for the global reach * connection. - * + * * @return the authorizationKey value. */ public String authorizationKey() { @@ -64,7 +84,7 @@ public String authorizationKey() { /** * Set the authorizationKey property: Authorization key from the peer express route used for the global reach * connection. - * + * * @param authorizationKey the authorizationKey value to set. * @return the GlobalReachConnectionInner object itself. */ @@ -78,7 +98,7 @@ public GlobalReachConnectionInner withAuthorizationKey(String authorizationKey) /** * Get the circuitConnectionStatus property: The connection status of the global reach connection. - * + * * @return the circuitConnectionStatus value. */ public GlobalReachConnectionStatus circuitConnectionStatus() { @@ -86,9 +106,10 @@ public GlobalReachConnectionStatus circuitConnectionStatus() { } /** - * Get the peerExpressRouteCircuit property: Identifier of the ExpressRoute Circuit to peer with in the global reach + * Get the peerExpressRouteCircuit property: Identifier of the ExpressRoute Circuit to peer with in the global + * reach * connection. - * + * * @return the peerExpressRouteCircuit value. */ public String peerExpressRouteCircuit() { @@ -96,9 +117,10 @@ public String peerExpressRouteCircuit() { } /** - * Set the peerExpressRouteCircuit property: Identifier of the ExpressRoute Circuit to peer with in the global reach + * Set the peerExpressRouteCircuit property: Identifier of the ExpressRoute Circuit to peer with in the global + * reach * connection. - * + * * @param peerExpressRouteCircuit the peerExpressRouteCircuit value to set. * @return the GlobalReachConnectionInner object itself. */ @@ -113,7 +135,7 @@ public GlobalReachConnectionInner withPeerExpressRouteCircuit(String peerExpress /** * Get the expressRouteId property: The ID of the Private Cloud's ExpressRoute Circuit that is participating in the * global reach connection. - * + * * @return the expressRouteId value. */ public String expressRouteId() { @@ -123,7 +145,7 @@ public String expressRouteId() { /** * Set the expressRouteId property: The ID of the Private Cloud's ExpressRoute Circuit that is participating in the * global reach connection. - * + * * @param expressRouteId the expressRouteId value to set. * @return the GlobalReachConnectionInner object itself. */ @@ -137,7 +159,7 @@ public GlobalReachConnectionInner withExpressRouteId(String expressRouteId) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/GlobalReachConnectionProperties.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/GlobalReachConnectionProperties.java index dc4b9d3e5761d..0074ff88be448 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/GlobalReachConnectionProperties.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/GlobalReachConnectionProperties.java @@ -9,23 +9,27 @@ import com.azure.resourcemanager.avs.models.GlobalReachConnectionStatus; import com.fasterxml.jackson.annotation.JsonProperty; -/** The properties of a global reach connection. */ +/** + * The properties of a global reach connection. + */ @Fluent public final class GlobalReachConnectionProperties { /* - * The state of the ExpressRoute Circuit Authorization provisioning + * The state of the ExpressRoute Circuit Authorization provisioning */ @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) private GlobalReachConnectionProvisioningState provisioningState; /* - * The network used for global reach carved out from the original network block provided for the private cloud + * The network used for global reach carved out from the original network block + * provided for the private cloud */ @JsonProperty(value = "addressPrefix", access = JsonProperty.Access.WRITE_ONLY) private String addressPrefix; /* - * Authorization key from the peer express route used for the global reach connection + * Authorization key from the peer express route used for the global reach + * connection */ @JsonProperty(value = "authorizationKey") private String authorizationKey; @@ -37,24 +41,28 @@ public final class GlobalReachConnectionProperties { private GlobalReachConnectionStatus circuitConnectionStatus; /* - * Identifier of the ExpressRoute Circuit to peer with in the global reach connection + * Identifier of the ExpressRoute Circuit to peer with in the global reach + * connection */ @JsonProperty(value = "peerExpressRouteCircuit") private String peerExpressRouteCircuit; /* - * The ID of the Private Cloud's ExpressRoute Circuit that is participating in the global reach connection + * The ID of the Private Cloud's ExpressRoute Circuit that is participating in the + * global reach connection */ @JsonProperty(value = "expressRouteId") private String expressRouteId; - /** Creates an instance of GlobalReachConnectionProperties class. */ + /** + * Creates an instance of GlobalReachConnectionProperties class. + */ public GlobalReachConnectionProperties() { } /** * Get the provisioningState property: The state of the ExpressRoute Circuit Authorization provisioning. - * + * * @return the provisioningState value. */ public GlobalReachConnectionProvisioningState provisioningState() { @@ -64,7 +72,7 @@ public GlobalReachConnectionProvisioningState provisioningState() { /** * Get the addressPrefix property: The network used for global reach carved out from the original network block * provided for the private cloud. - * + * * @return the addressPrefix value. */ public String addressPrefix() { @@ -74,7 +82,7 @@ public String addressPrefix() { /** * Get the authorizationKey property: Authorization key from the peer express route used for the global reach * connection. - * + * * @return the authorizationKey value. */ public String authorizationKey() { @@ -84,7 +92,7 @@ public String authorizationKey() { /** * Set the authorizationKey property: Authorization key from the peer express route used for the global reach * connection. - * + * * @param authorizationKey the authorizationKey value to set. * @return the GlobalReachConnectionProperties object itself. */ @@ -95,7 +103,7 @@ public GlobalReachConnectionProperties withAuthorizationKey(String authorization /** * Get the circuitConnectionStatus property: The connection status of the global reach connection. - * + * * @return the circuitConnectionStatus value. */ public GlobalReachConnectionStatus circuitConnectionStatus() { @@ -103,9 +111,10 @@ public GlobalReachConnectionStatus circuitConnectionStatus() { } /** - * Get the peerExpressRouteCircuit property: Identifier of the ExpressRoute Circuit to peer with in the global reach + * Get the peerExpressRouteCircuit property: Identifier of the ExpressRoute Circuit to peer with in the global + * reach * connection. - * + * * @return the peerExpressRouteCircuit value. */ public String peerExpressRouteCircuit() { @@ -113,9 +122,10 @@ public String peerExpressRouteCircuit() { } /** - * Set the peerExpressRouteCircuit property: Identifier of the ExpressRoute Circuit to peer with in the global reach + * Set the peerExpressRouteCircuit property: Identifier of the ExpressRoute Circuit to peer with in the global + * reach * connection. - * + * * @param peerExpressRouteCircuit the peerExpressRouteCircuit value to set. * @return the GlobalReachConnectionProperties object itself. */ @@ -127,7 +137,7 @@ public GlobalReachConnectionProperties withPeerExpressRouteCircuit(String peerEx /** * Get the expressRouteId property: The ID of the Private Cloud's ExpressRoute Circuit that is participating in the * global reach connection. - * + * * @return the expressRouteId value. */ public String expressRouteId() { @@ -137,7 +147,7 @@ public String expressRouteId() { /** * Set the expressRouteId property: The ID of the Private Cloud's ExpressRoute Circuit that is participating in the * global reach connection. - * + * * @param expressRouteId the expressRouteId value to set. * @return the GlobalReachConnectionProperties object itself. */ @@ -148,7 +158,7 @@ public GlobalReachConnectionProperties withExpressRouteId(String expressRouteId) /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/HcxEnterpriseSiteInner.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/HcxEnterpriseSiteInner.java index 6dfdcec76d4b7..4f20263018d13 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/HcxEnterpriseSiteInner.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/HcxEnterpriseSiteInner.java @@ -6,34 +6,64 @@ import com.azure.core.annotation.Immutable; import com.azure.core.management.ProxyResource; +import com.azure.core.management.SystemData; +import com.azure.resourcemanager.avs.models.HcxEnterpriseSiteProvisioningState; import com.azure.resourcemanager.avs.models.HcxEnterpriseSiteStatus; import com.fasterxml.jackson.annotation.JsonProperty; -/** An HCX Enterprise Site resource. */ +/** + * An HCX Enterprise Site resource. + */ @Immutable public final class HcxEnterpriseSiteInner extends ProxyResource { /* - * The properties of an HCX Enterprise Site resource + * The resource-specific properties for this resource. */ - @JsonProperty(value = "properties", access = JsonProperty.Access.WRITE_ONLY) + @JsonProperty(value = "properties") private HcxEnterpriseSiteProperties innerProperties; - /** Creates an instance of HcxEnterpriseSiteInner class. */ + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) + private SystemData systemData; + + /** + * Creates an instance of HcxEnterpriseSiteInner class. + */ public HcxEnterpriseSiteInner() { } /** - * Get the innerProperties property: The properties of an HCX Enterprise Site resource. - * + * Get the innerProperties property: The resource-specific properties for this resource. + * * @return the innerProperties value. */ private HcxEnterpriseSiteProperties innerProperties() { return this.innerProperties; } + /** + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + + /** + * Get the provisioningState property: The provisioning state of the resource. + * + * @return the provisioningState value. + */ + public HcxEnterpriseSiteProvisioningState provisioningState() { + return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); + } + /** * Get the activationKey property: The activation key. - * + * * @return the activationKey value. */ public String activationKey() { @@ -42,7 +72,7 @@ public String activationKey() { /** * Get the status property: The status of the HCX Enterprise Site. - * + * * @return the status value. */ public HcxEnterpriseSiteStatus status() { @@ -51,7 +81,7 @@ public HcxEnterpriseSiteStatus status() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/HcxEnterpriseSiteProperties.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/HcxEnterpriseSiteProperties.java index 76db6e83e6b31..ad574b47f5cd0 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/HcxEnterpriseSiteProperties.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/HcxEnterpriseSiteProperties.java @@ -5,12 +5,21 @@ package com.azure.resourcemanager.avs.fluent.models; import com.azure.core.annotation.Immutable; +import com.azure.resourcemanager.avs.models.HcxEnterpriseSiteProvisioningState; import com.azure.resourcemanager.avs.models.HcxEnterpriseSiteStatus; import com.fasterxml.jackson.annotation.JsonProperty; -/** The properties of an HCX Enterprise Site. */ +/** + * The properties of an HCX Enterprise Site. + */ @Immutable public final class HcxEnterpriseSiteProperties { + /* + * The provisioning state of the resource. + */ + @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private HcxEnterpriseSiteProvisioningState provisioningState; + /* * The activation key */ @@ -23,13 +32,24 @@ public final class HcxEnterpriseSiteProperties { @JsonProperty(value = "status", access = JsonProperty.Access.WRITE_ONLY) private HcxEnterpriseSiteStatus status; - /** Creates an instance of HcxEnterpriseSiteProperties class. */ + /** + * Creates an instance of HcxEnterpriseSiteProperties class. + */ public HcxEnterpriseSiteProperties() { } + /** + * Get the provisioningState property: The provisioning state of the resource. + * + * @return the provisioningState value. + */ + public HcxEnterpriseSiteProvisioningState provisioningState() { + return this.provisioningState; + } + /** * Get the activationKey property: The activation key. - * + * * @return the activationKey value. */ public String activationKey() { @@ -38,7 +58,7 @@ public String activationKey() { /** * Get the status property: The status of the HCX Enterprise Site. - * + * * @return the status value. */ public HcxEnterpriseSiteStatus status() { @@ -47,7 +67,7 @@ public HcxEnterpriseSiteStatus status() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/IscsiPathInner.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/IscsiPathInner.java new file mode 100644 index 0000000000000..2dbc32d91f650 --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/IscsiPathInner.java @@ -0,0 +1,96 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.avs.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.management.ProxyResource; +import com.azure.core.management.SystemData; +import com.azure.resourcemanager.avs.models.IscsiPathProvisioningState; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * An iSCSI path resource. + */ +@Fluent +public final class IscsiPathInner extends ProxyResource { + /* + * The resource-specific properties for this resource. + */ + @JsonProperty(value = "properties") + private IscsiPathProperties innerProperties; + + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) + private SystemData systemData; + + /** + * Creates an instance of IscsiPathInner class. + */ + public IscsiPathInner() { + } + + /** + * Get the innerProperties property: The resource-specific properties for this resource. + * + * @return the innerProperties value. + */ + private IscsiPathProperties innerProperties() { + return this.innerProperties; + } + + /** + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + + /** + * Get the provisioningState property: The state of the iSCSI path provisioning. + * + * @return the provisioningState value. + */ + public IscsiPathProvisioningState provisioningState() { + return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); + } + + /** + * Get the networkBlock property: CIDR Block for iSCSI path. + * + * @return the networkBlock value. + */ + public String networkBlock() { + return this.innerProperties() == null ? null : this.innerProperties().networkBlock(); + } + + /** + * Set the networkBlock property: CIDR Block for iSCSI path. + * + * @param networkBlock the networkBlock value to set. + * @return the IscsiPathInner object itself. + */ + public IscsiPathInner withNetworkBlock(String networkBlock) { + if (this.innerProperties() == null) { + this.innerProperties = new IscsiPathProperties(); + } + this.innerProperties().withNetworkBlock(networkBlock); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (innerProperties() != null) { + innerProperties().validate(); + } + } +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/IscsiPathProperties.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/IscsiPathProperties.java new file mode 100644 index 0000000000000..0ce044df94e21 --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/IscsiPathProperties.java @@ -0,0 +1,77 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.avs.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.avs.models.IscsiPathProvisioningState; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The properties of an iSCSI path resource. + */ +@Fluent +public final class IscsiPathProperties { + /* + * The state of the iSCSI path provisioning + */ + @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private IscsiPathProvisioningState provisioningState; + + /* + * CIDR Block for iSCSI path. + */ + @JsonProperty(value = "networkBlock", required = true) + private String networkBlock; + + /** + * Creates an instance of IscsiPathProperties class. + */ + public IscsiPathProperties() { + } + + /** + * Get the provisioningState property: The state of the iSCSI path provisioning. + * + * @return the provisioningState value. + */ + public IscsiPathProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Get the networkBlock property: CIDR Block for iSCSI path. + * + * @return the networkBlock value. + */ + public String networkBlock() { + return this.networkBlock; + } + + /** + * Set the networkBlock property: CIDR Block for iSCSI path. + * + * @param networkBlock the networkBlock value to set. + * @return the IscsiPathProperties object itself. + */ + public IscsiPathProperties withNetworkBlock(String networkBlock) { + this.networkBlock = networkBlock; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (networkBlock() == null) { + throw LOGGER.logExceptionAsError( + new IllegalArgumentException("Missing required property networkBlock in model IscsiPathProperties")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(IscsiPathProperties.class); +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/OperationInner.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/OperationInner.java index 464fbc7dc373e..1f7a53bbab226 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/OperationInner.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/OperationInner.java @@ -5,50 +5,61 @@ package com.azure.resourcemanager.avs.fluent.models; import com.azure.core.annotation.Fluent; +import com.azure.resourcemanager.avs.models.ActionType; import com.azure.resourcemanager.avs.models.OperationDisplay; -import com.azure.resourcemanager.avs.models.OperationProperties; +import com.azure.resourcemanager.avs.models.Origin; import com.fasterxml.jackson.annotation.JsonProperty; -/** A REST API operation. */ +/** + * REST API Operation + * + * Details of a REST API operation, returned from the Resource Provider Operations API. + */ @Fluent public final class OperationInner { /* - * Name of the operation being performed on this object + * The name of the operation, as per Resource-Based Access Control (RBAC). Examples: + * "Microsoft.Compute/virtualMachines/write", "Microsoft.Compute/virtualMachines/capture/action" */ @JsonProperty(value = "name", access = JsonProperty.Access.WRITE_ONLY) private String name; /* - * Contains the localized display information for this operation + * Whether the operation applies to data-plane. This is "true" for data-plane operations and "false" for + * ARM/control-plane operations. */ - @JsonProperty(value = "display", access = JsonProperty.Access.WRITE_ONLY) - private OperationDisplay display; + @JsonProperty(value = "isDataAction", access = JsonProperty.Access.WRITE_ONLY) + private Boolean isDataAction; /* - * Gets or sets a value indicating whether the operation is a data action or not + * Localized display information for this particular operation. */ - @JsonProperty(value = "isDataAction") - private Boolean isDataAction; + @JsonProperty(value = "display") + private OperationDisplay display; /* - * Origin of the operation + * The intended executor of the operation; as in Resource Based Access Control (RBAC) and audit logs UX. Default + * value is "user,system" */ - @JsonProperty(value = "origin") - private String origin; + @JsonProperty(value = "origin", access = JsonProperty.Access.WRITE_ONLY) + private Origin origin; /* - * Properties of the operation + * Enum. Indicates the action type. "Internal" refers to actions that are for internal only APIs. */ - @JsonProperty(value = "properties") - private OperationProperties properties; + @JsonProperty(value = "actionType", access = JsonProperty.Access.WRITE_ONLY) + private ActionType actionType; - /** Creates an instance of OperationInner class. */ + /** + * Creates an instance of OperationInner class. + */ public OperationInner() { } /** - * Get the name property: Name of the operation being performed on this object. - * + * Get the name property: The name of the operation, as per Resource-Based Access Control (RBAC). Examples: + * "Microsoft.Compute/virtualMachines/write", "Microsoft.Compute/virtualMachines/capture/action". + * * @return the name value. */ public String name() { @@ -56,17 +67,9 @@ public String name() { } /** - * Get the display property: Contains the localized display information for this operation. - * - * @return the display value. - */ - public OperationDisplay display() { - return this.display; - } - - /** - * Get the isDataAction property: Gets or sets a value indicating whether the operation is a data action or not. - * + * Get the isDataAction property: Whether the operation applies to data-plane. This is "true" for data-plane + * operations and "false" for ARM/control-plane operations. + * * @return the isDataAction value. */ public Boolean isDataAction() { @@ -74,67 +77,53 @@ public Boolean isDataAction() { } /** - * Set the isDataAction property: Gets or sets a value indicating whether the operation is a data action or not. - * - * @param isDataAction the isDataAction value to set. - * @return the OperationInner object itself. - */ - public OperationInner withIsDataAction(Boolean isDataAction) { - this.isDataAction = isDataAction; - return this; - } - - /** - * Get the origin property: Origin of the operation. - * - * @return the origin value. + * Get the display property: Localized display information for this particular operation. + * + * @return the display value. */ - public String origin() { - return this.origin; + public OperationDisplay display() { + return this.display; } /** - * Set the origin property: Origin of the operation. - * - * @param origin the origin value to set. + * Set the display property: Localized display information for this particular operation. + * + * @param display the display value to set. * @return the OperationInner object itself. */ - public OperationInner withOrigin(String origin) { - this.origin = origin; + public OperationInner withDisplay(OperationDisplay display) { + this.display = display; return this; } /** - * Get the properties property: Properties of the operation. - * - * @return the properties value. + * Get the origin property: The intended executor of the operation; as in Resource Based Access Control (RBAC) and + * audit logs UX. Default value is "user,system". + * + * @return the origin value. */ - public OperationProperties properties() { - return this.properties; + public Origin origin() { + return this.origin; } /** - * Set the properties property: Properties of the operation. - * - * @param properties the properties value to set. - * @return the OperationInner object itself. + * Get the actionType property: Enum. Indicates the action type. "Internal" refers to actions that are for internal + * only APIs. + * + * @return the actionType value. */ - public OperationInner withProperties(OperationProperties properties) { - this.properties = properties; - return this; + public ActionType actionType() { + return this.actionType; } /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { if (display() != null) { display().validate(); } - if (properties() != null) { - properties().validate(); - } } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/PlacementPolicyInner.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/PlacementPolicyInner.java index ce6268027f373..adb142b8940af 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/PlacementPolicyInner.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/PlacementPolicyInner.java @@ -6,25 +6,36 @@ import com.azure.core.annotation.Fluent; import com.azure.core.management.ProxyResource; +import com.azure.core.management.SystemData; import com.azure.resourcemanager.avs.models.PlacementPolicyProperties; import com.fasterxml.jackson.annotation.JsonProperty; -/** A vSphere Distributed Resource Scheduler (DRS) placement policy. */ +/** + * A vSphere Distributed Resource Scheduler (DRS) placement policy. + */ @Fluent public final class PlacementPolicyInner extends ProxyResource { /* - * placement policy properties + * The resource-specific properties for this resource. */ @JsonProperty(value = "properties") private PlacementPolicyProperties properties; - /** Creates an instance of PlacementPolicyInner class. */ + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) + private SystemData systemData; + + /** + * Creates an instance of PlacementPolicyInner class. + */ public PlacementPolicyInner() { } /** - * Get the properties property: placement policy properties. - * + * Get the properties property: The resource-specific properties for this resource. + * * @return the properties value. */ public PlacementPolicyProperties properties() { @@ -32,8 +43,8 @@ public PlacementPolicyProperties properties() { } /** - * Set the properties property: placement policy properties. - * + * Set the properties property: The resource-specific properties for this resource. + * * @param properties the properties value to set. * @return the PlacementPolicyInner object itself. */ @@ -42,9 +53,18 @@ public PlacementPolicyInner withProperties(PlacementPolicyProperties properties) 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; + } + /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/PlacementPolicyUpdateProperties.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/PlacementPolicyUpdateProperties.java index f1380c8a70d1f..eefa7e0f3f76e 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/PlacementPolicyUpdateProperties.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/PlacementPolicyUpdateProperties.java @@ -11,7 +11,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** The properties of a placement policy resource that may be updated. */ +/** + * The properties of a placement policy resource that may be updated. + */ @Fluent public final class PlacementPolicyUpdateProperties { /* @@ -44,13 +46,15 @@ public final class PlacementPolicyUpdateProperties { @JsonProperty(value = "azureHybridBenefitType") private AzureHybridBenefitType azureHybridBenefitType; - /** Creates an instance of PlacementPolicyUpdateProperties class. */ + /** + * Creates an instance of PlacementPolicyUpdateProperties class. + */ public PlacementPolicyUpdateProperties() { } /** * Get the state property: Whether the placement policy is enabled or disabled. - * + * * @return the state value. */ public PlacementPolicyState state() { @@ -59,7 +63,7 @@ public PlacementPolicyState state() { /** * Set the state property: Whether the placement policy is enabled or disabled. - * + * * @param state the state value to set. * @return the PlacementPolicyUpdateProperties object itself. */ @@ -70,7 +74,7 @@ public PlacementPolicyUpdateProperties withState(PlacementPolicyState state) { /** * Get the vmMembers property: Virtual machine members list. - * + * * @return the vmMembers value. */ public List vmMembers() { @@ -79,7 +83,7 @@ public List vmMembers() { /** * Set the vmMembers property: Virtual machine members list. - * + * * @param vmMembers the vmMembers value to set. * @return the PlacementPolicyUpdateProperties object itself. */ @@ -90,7 +94,7 @@ public PlacementPolicyUpdateProperties withVmMembers(List vmMembers) { /** * Get the hostMembers property: Host members list. - * + * * @return the hostMembers value. */ public List hostMembers() { @@ -99,7 +103,7 @@ public List hostMembers() { /** * Set the hostMembers property: Host members list. - * + * * @param hostMembers the hostMembers value to set. * @return the PlacementPolicyUpdateProperties object itself. */ @@ -110,7 +114,7 @@ public PlacementPolicyUpdateProperties withHostMembers(List hostMembers) /** * Get the affinityStrength property: vm-host placement policy affinity strength (should/must). - * + * * @return the affinityStrength value. */ public AffinityStrength affinityStrength() { @@ -119,7 +123,7 @@ public AffinityStrength affinityStrength() { /** * Set the affinityStrength property: vm-host placement policy affinity strength (should/must). - * + * * @param affinityStrength the affinityStrength value to set. * @return the PlacementPolicyUpdateProperties object itself. */ @@ -130,7 +134,7 @@ public PlacementPolicyUpdateProperties withAffinityStrength(AffinityStrength aff /** * Get the azureHybridBenefitType property: placement policy azure hybrid benefit opt-in type. - * + * * @return the azureHybridBenefitType value. */ public AzureHybridBenefitType azureHybridBenefitType() { @@ -139,7 +143,7 @@ public AzureHybridBenefitType azureHybridBenefitType() { /** * Set the azureHybridBenefitType property: placement policy azure hybrid benefit opt-in type. - * + * * @param azureHybridBenefitType the azureHybridBenefitType value to set. * @return the PlacementPolicyUpdateProperties object itself. */ @@ -150,7 +154,7 @@ public PlacementPolicyUpdateProperties withAzureHybridBenefitType(AzureHybridBen /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/PrivateCloudInner.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/PrivateCloudInner.java index 59d8a03d26aa4..58f78aab91532 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/PrivateCloudInner.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/PrivateCloudInner.java @@ -6,50 +6,99 @@ import com.azure.core.annotation.Fluent; import com.azure.core.management.Resource; +import com.azure.core.management.SystemData; import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.avs.models.AvailabilityProperties; import com.azure.resourcemanager.avs.models.Circuit; +import com.azure.resourcemanager.avs.models.DnsZoneType; import com.azure.resourcemanager.avs.models.Encryption; import com.azure.resourcemanager.avs.models.Endpoints; import com.azure.resourcemanager.avs.models.IdentitySource; import com.azure.resourcemanager.avs.models.InternetEnum; import com.azure.resourcemanager.avs.models.ManagementCluster; import com.azure.resourcemanager.avs.models.NsxPublicIpQuotaRaisedEnum; -import com.azure.resourcemanager.avs.models.PrivateCloudIdentity; import com.azure.resourcemanager.avs.models.PrivateCloudProvisioningState; import com.azure.resourcemanager.avs.models.Sku; +import com.azure.resourcemanager.avs.models.SystemAssignedServiceIdentity; +import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; import java.util.Map; -/** A private cloud resource. */ +/** + * A private cloud resource. + */ @Fluent public final class PrivateCloudInner extends Resource { /* - * The private cloud SKU + * The resource-specific properties for this resource. + */ + @JsonProperty(value = "properties") + private PrivateCloudProperties innerProperties; + + /* + * Resource tags. + */ + @JsonProperty(value = "tags") + @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) + private Map tags; + + /* + * The SKU (Stock Keeping Unit) assigned to this resource. */ @JsonProperty(value = "sku", required = true) private Sku sku; /* - * The properties of a private cloud resource + * The managed service identities assigned to this resource. */ - @JsonProperty(value = "properties") - private PrivateCloudProperties innerProperties; + @JsonProperty(value = "identity") + private SystemAssignedServiceIdentity identity; /* - * The identity of the private cloud, if configured. + * Azure Resource Manager metadata containing createdBy and modifiedBy information. */ - @JsonProperty(value = "identity") - private PrivateCloudIdentity identity; + @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) + private SystemData systemData; - /** Creates an instance of PrivateCloudInner class. */ + /** + * Creates an instance of PrivateCloudInner class. + */ public PrivateCloudInner() { } /** - * Get the sku property: The private cloud SKU. - * + * Get the innerProperties property: The resource-specific properties for this resource. + * + * @return the innerProperties value. + */ + private PrivateCloudProperties innerProperties() { + return this.innerProperties; + } + + /** + * Get the tags property: Resource tags. + * + * @return the tags value. + */ + public Map tags() { + return this.tags; + } + + /** + * Set the tags property: Resource tags. + * + * @param tags the tags value to set. + * @return the PrivateCloudInner object itself. + */ + public PrivateCloudInner withTags(Map tags) { + this.tags = tags; + return this; + } + + /** + * Get the sku property: The SKU (Stock Keeping Unit) assigned to this resource. + * * @return the sku value. */ public Sku sku() { @@ -57,8 +106,8 @@ public Sku sku() { } /** - * Set the sku property: The private cloud SKU. - * + * Set the sku property: The SKU (Stock Keeping Unit) assigned to this resource. + * * @param sku the sku value to set. * @return the PrivateCloudInner object itself. */ @@ -68,51 +117,192 @@ public PrivateCloudInner withSku(Sku sku) { } /** - * Get the innerProperties property: The properties of a private cloud resource. - * - * @return the innerProperties value. - */ - private PrivateCloudProperties innerProperties() { - return this.innerProperties; - } - - /** - * Get the identity property: The identity of the private cloud, if configured. - * + * Get the identity property: The managed service identities assigned to this resource. + * * @return the identity value. */ - public PrivateCloudIdentity identity() { + public SystemAssignedServiceIdentity identity() { return this.identity; } /** - * Set the identity property: The identity of the private cloud, if configured. - * + * Set the identity property: The managed service identities assigned to this resource. + * * @param identity the identity value to set. * @return the PrivateCloudInner object itself. */ - public PrivateCloudInner withIdentity(PrivateCloudIdentity identity) { + public PrivateCloudInner withIdentity(SystemAssignedServiceIdentity identity) { this.identity = identity; return this; } - /** {@inheritDoc} */ + /** + * 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 PrivateCloudInner withLocation(String location) { super.withLocation(location); return this; } - /** {@inheritDoc} */ - @Override - public PrivateCloudInner withTags(Map tags) { - super.withTags(tags); + /** + * Get the managementCluster property: The default cluster used for management. + * + * @return the managementCluster value. + */ + public ManagementCluster managementCluster() { + return this.innerProperties() == null ? null : this.innerProperties().managementCluster(); + } + + /** + * Set the managementCluster property: The default cluster used for management. + * + * @param managementCluster the managementCluster value to set. + * @return the PrivateCloudInner object itself. + */ + public PrivateCloudInner withManagementCluster(ManagementCluster managementCluster) { + if (this.innerProperties() == null) { + this.innerProperties = new PrivateCloudProperties(); + } + this.innerProperties().withManagementCluster(managementCluster); + return this; + } + + /** + * Get the internet property: Connectivity to internet is enabled or disabled. + * + * @return the internet value. + */ + public InternetEnum internet() { + return this.innerProperties() == null ? null : this.innerProperties().internet(); + } + + /** + * Set the internet property: Connectivity to internet is enabled or disabled. + * + * @param internet the internet value to set. + * @return the PrivateCloudInner object itself. + */ + public PrivateCloudInner withInternet(InternetEnum internet) { + if (this.innerProperties() == null) { + this.innerProperties = new PrivateCloudProperties(); + } + this.innerProperties().withInternet(internet); + return this; + } + + /** + * Get the identitySources property: vCenter Single Sign On Identity Sources. + * + * @return the identitySources value. + */ + public List identitySources() { + return this.innerProperties() == null ? null : this.innerProperties().identitySources(); + } + + /** + * Set the identitySources property: vCenter Single Sign On Identity Sources. + * + * @param identitySources the identitySources value to set. + * @return the PrivateCloudInner object itself. + */ + public PrivateCloudInner withIdentitySources(List identitySources) { + if (this.innerProperties() == null) { + this.innerProperties = new PrivateCloudProperties(); + } + this.innerProperties().withIdentitySources(identitySources); + return this; + } + + /** + * Get the availability property: Properties describing how the cloud is distributed across availability zones. + * + * @return the availability value. + */ + public AvailabilityProperties availability() { + return this.innerProperties() == null ? null : this.innerProperties().availability(); + } + + /** + * Set the availability property: Properties describing how the cloud is distributed across availability zones. + * + * @param availability the availability value to set. + * @return the PrivateCloudInner object itself. + */ + public PrivateCloudInner withAvailability(AvailabilityProperties availability) { + if (this.innerProperties() == null) { + this.innerProperties = new PrivateCloudProperties(); + } + this.innerProperties().withAvailability(availability); + return this; + } + + /** + * Get the encryption property: Customer managed key encryption, can be enabled or disabled. + * + * @return the encryption value. + */ + public Encryption encryption() { + return this.innerProperties() == null ? null : this.innerProperties().encryption(); + } + + /** + * Set the encryption property: Customer managed key encryption, can be enabled or disabled. + * + * @param encryption the encryption value to set. + * @return the PrivateCloudInner object itself. + */ + public PrivateCloudInner withEncryption(Encryption encryption) { + if (this.innerProperties() == null) { + this.innerProperties = new PrivateCloudProperties(); + } + this.innerProperties().withEncryption(encryption); + return this; + } + + /** + * Get the extendedNetworkBlocks property: Array of additional networks noncontiguous with networkBlock. Networks + * must be + * unique and non-overlapping across VNet in your subscription, on-premise, and + * this privateCloud networkBlock attribute. Make sure the CIDR format conforms to + * (A.B.C.D/X). + * + * @return the extendedNetworkBlocks value. + */ + public List extendedNetworkBlocks() { + return this.innerProperties() == null ? null : this.innerProperties().extendedNetworkBlocks(); + } + + /** + * Set the extendedNetworkBlocks property: Array of additional networks noncontiguous with networkBlock. Networks + * must be + * unique and non-overlapping across VNet in your subscription, on-premise, and + * this privateCloud networkBlock attribute. Make sure the CIDR format conforms to + * (A.B.C.D/X). + * + * @param extendedNetworkBlocks the extendedNetworkBlocks value to set. + * @return the PrivateCloudInner object itself. + */ + public PrivateCloudInner withExtendedNetworkBlocks(List extendedNetworkBlocks) { + if (this.innerProperties() == null) { + this.innerProperties = new PrivateCloudProperties(); + } + this.innerProperties().withExtendedNetworkBlocks(extendedNetworkBlocks); return this; } /** * Get the provisioningState property: The provisioning state. - * + * * @return the provisioningState value. */ public PrivateCloudProvisioningState provisioningState() { @@ -121,7 +311,7 @@ public PrivateCloudProvisioningState provisioningState() { /** * Get the circuit property: An ExpressRoute Circuit. - * + * * @return the circuit value. */ public Circuit circuit() { @@ -130,7 +320,7 @@ public Circuit circuit() { /** * Set the circuit property: An ExpressRoute Circuit. - * + * * @param circuit the circuit value to set. * @return the PrivateCloudInner object itself. */ @@ -144,7 +334,7 @@ public PrivateCloudInner withCircuit(Circuit circuit) { /** * Get the endpoints property: The endpoints. - * + * * @return the endpoints value. */ public Endpoints endpoints() { @@ -152,10 +342,10 @@ public Endpoints endpoints() { } /** - * Get the networkBlock property: The block of addresses should be unique across VNet in your subscription as well - * as on-premise. Make sure the CIDR format is conformed to (A.B.C.D/X) where A,B,C,D are between 0 and 255, and X - * is between 0 and 22. - * + * Get the networkBlock property: The block of addresses should be unique across VNet in your subscription as + * well as on-premise. Make sure the CIDR format is conformed to (A.B.C.D/X) where + * A,B,C,D are between 0 and 255, and X is between 0 and 22. + * * @return the networkBlock value. */ public String networkBlock() { @@ -163,10 +353,10 @@ public String networkBlock() { } /** - * Set the networkBlock property: The block of addresses should be unique across VNet in your subscription as well - * as on-premise. Make sure the CIDR format is conformed to (A.B.C.D/X) where A,B,C,D are between 0 and 255, and X - * is between 0 and 22. - * + * Set the networkBlock property: The block of addresses should be unique across VNet in your subscription as + * well as on-premise. Make sure the CIDR format is conformed to (A.B.C.D/X) where + * A,B,C,D are between 0 and 255, and X is between 0 and 22. + * * @param networkBlock the networkBlock value to set. * @return the PrivateCloudInner object itself. */ @@ -180,7 +370,7 @@ public PrivateCloudInner withNetworkBlock(String networkBlock) { /** * Get the managementNetwork property: Network used to access vCenter Server and NSX-T Manager. - * + * * @return the managementNetwork value. */ public String managementNetwork() { @@ -189,7 +379,7 @@ public String managementNetwork() { /** * Get the provisioningNetwork property: Used for virtual machine cold migration, cloning, and snapshot migration. - * + * * @return the provisioningNetwork value. */ public String provisioningNetwork() { @@ -198,7 +388,7 @@ public String provisioningNetwork() { /** * Get the vmotionNetwork property: Used for live migration of virtual machines. - * + * * @return the vmotionNetwork value. */ public String vmotionNetwork() { @@ -207,7 +397,7 @@ public String vmotionNetwork() { /** * Get the vcenterPassword property: Optionally, set the vCenter admin password when the private cloud is created. - * + * * @return the vcenterPassword value. */ public String vcenterPassword() { @@ -216,7 +406,7 @@ public String vcenterPassword() { /** * Set the vcenterPassword property: Optionally, set the vCenter admin password when the private cloud is created. - * + * * @param vcenterPassword the vcenterPassword value to set. * @return the PrivateCloudInner object itself. */ @@ -230,7 +420,7 @@ public PrivateCloudInner withVcenterPassword(String vcenterPassword) { /** * Get the nsxtPassword property: Optionally, set the NSX-T Manager password when the private cloud is created. - * + * * @return the nsxtPassword value. */ public String nsxtPassword() { @@ -239,7 +429,7 @@ public String nsxtPassword() { /** * Set the nsxtPassword property: Optionally, set the NSX-T Manager password when the private cloud is created. - * + * * @param nsxtPassword the nsxtPassword value to set. * @return the PrivateCloudInner object itself. */ @@ -253,7 +443,7 @@ public PrivateCloudInner withNsxtPassword(String nsxtPassword) { /** * Get the vcenterCertificateThumbprint property: Thumbprint of the vCenter Server SSL certificate. - * + * * @return the vcenterCertificateThumbprint value. */ public String vcenterCertificateThumbprint() { @@ -262,7 +452,7 @@ public String vcenterCertificateThumbprint() { /** * Get the nsxtCertificateThumbprint property: Thumbprint of the NSX-T Manager SSL certificate. - * + * * @return the nsxtCertificateThumbprint value. */ public String nsxtCertificateThumbprint() { @@ -271,7 +461,7 @@ public String nsxtCertificateThumbprint() { /** * Get the externalCloudLinks property: Array of cloud link IDs from other clouds that connect to this one. - * + * * @return the externalCloudLinks value. */ public List externalCloudLinks() { @@ -281,7 +471,7 @@ public List externalCloudLinks() { /** * Get the secondaryCircuit property: A secondary expressRoute circuit from a separate AZ. Only present in a * stretched private cloud. - * + * * @return the secondaryCircuit value. */ public Circuit secondaryCircuit() { @@ -291,7 +481,7 @@ public Circuit secondaryCircuit() { /** * Set the secondaryCircuit property: A secondary expressRoute circuit from a separate AZ. Only present in a * stretched private cloud. - * + * * @param secondaryCircuit the secondaryCircuit value to set. * @return the PrivateCloudInner object itself. */ @@ -304,9 +494,10 @@ public PrivateCloudInner withSecondaryCircuit(Circuit secondaryCircuit) { } /** - * Get the nsxPublicIpQuotaRaised property: Flag to indicate whether the private cloud has the quota for provisioned - * NSX Public IP count raised from 64 to 1024. - * + * Get the nsxPublicIpQuotaRaised property: Flag to indicate whether the private cloud has the quota for + * provisioned NSX + * Public IP count raised from 64 to 1024. + * * @return the nsxPublicIpQuotaRaised value. */ public NsxPublicIpQuotaRaisedEnum nsxPublicIpQuotaRaised() { @@ -314,163 +505,66 @@ public NsxPublicIpQuotaRaisedEnum nsxPublicIpQuotaRaised() { } /** - * Get the managementCluster property: The default cluster used for management. - * - * @return the managementCluster value. - */ - public ManagementCluster managementCluster() { - return this.innerProperties() == null ? null : this.innerProperties().managementCluster(); - } - - /** - * Set the managementCluster property: The default cluster used for management. - * - * @param managementCluster the managementCluster value to set. - * @return the PrivateCloudInner object itself. - */ - public PrivateCloudInner withManagementCluster(ManagementCluster managementCluster) { - if (this.innerProperties() == null) { - this.innerProperties = new PrivateCloudProperties(); - } - this.innerProperties().withManagementCluster(managementCluster); - return this; - } - - /** - * Get the internet property: Connectivity to internet is enabled or disabled. - * - * @return the internet value. - */ - public InternetEnum internet() { - return this.innerProperties() == null ? null : this.innerProperties().internet(); - } - - /** - * Set the internet property: Connectivity to internet is enabled or disabled. - * - * @param internet the internet value to set. - * @return the PrivateCloudInner object itself. - */ - public PrivateCloudInner withInternet(InternetEnum internet) { - if (this.innerProperties() == null) { - this.innerProperties = new PrivateCloudProperties(); - } - this.innerProperties().withInternet(internet); - return this; - } - - /** - * Get the identitySources property: vCenter Single Sign On Identity Sources. - * - * @return the identitySources value. + * Get the virtualNetworkId property: Azure resource ID of the virtual network. + * + * @return the virtualNetworkId value. */ - public List identitySources() { - return this.innerProperties() == null ? null : this.innerProperties().identitySources(); + public String virtualNetworkId() { + return this.innerProperties() == null ? null : this.innerProperties().virtualNetworkId(); } /** - * Set the identitySources property: vCenter Single Sign On Identity Sources. - * - * @param identitySources the identitySources value to set. + * Set the virtualNetworkId property: Azure resource ID of the virtual network. + * + * @param virtualNetworkId the virtualNetworkId value to set. * @return the PrivateCloudInner object itself. */ - public PrivateCloudInner withIdentitySources(List identitySources) { + public PrivateCloudInner withVirtualNetworkId(String virtualNetworkId) { if (this.innerProperties() == null) { this.innerProperties = new PrivateCloudProperties(); } - this.innerProperties().withIdentitySources(identitySources); + this.innerProperties().withVirtualNetworkId(virtualNetworkId); return this; } /** - * Get the availability property: Properties describing how the cloud is distributed across availability zones. - * - * @return the availability value. + * Get the dnsZoneType property: The type of DNS zone to use. + * + * @return the dnsZoneType value. */ - public AvailabilityProperties availability() { - return this.innerProperties() == null ? null : this.innerProperties().availability(); + public DnsZoneType dnsZoneType() { + return this.innerProperties() == null ? null : this.innerProperties().dnsZoneType(); } /** - * Set the availability property: Properties describing how the cloud is distributed across availability zones. - * - * @param availability the availability value to set. + * Set the dnsZoneType property: The type of DNS zone to use. + * + * @param dnsZoneType the dnsZoneType value to set. * @return the PrivateCloudInner object itself. */ - public PrivateCloudInner withAvailability(AvailabilityProperties availability) { + public PrivateCloudInner withDnsZoneType(DnsZoneType dnsZoneType) { if (this.innerProperties() == null) { this.innerProperties = new PrivateCloudProperties(); } - this.innerProperties().withAvailability(availability); - return this; - } - - /** - * Get the encryption property: Customer managed key encryption, can be enabled or disabled. - * - * @return the encryption value. - */ - public Encryption encryption() { - return this.innerProperties() == null ? null : this.innerProperties().encryption(); - } - - /** - * Set the encryption property: Customer managed key encryption, can be enabled or disabled. - * - * @param encryption the encryption value to set. - * @return the PrivateCloudInner object itself. - */ - public PrivateCloudInner withEncryption(Encryption encryption) { - if (this.innerProperties() == null) { - this.innerProperties = new PrivateCloudProperties(); - } - this.innerProperties().withEncryption(encryption); - return this; - } - - /** - * Get the extendedNetworkBlocks property: Array of additional networks noncontiguous with networkBlock. Networks - * must be unique and non-overlapping across VNet in your subscription, on-premise, and this privateCloud - * networkBlock attribute. Make sure the CIDR format conforms to (A.B.C.D/X). - * - * @return the extendedNetworkBlocks value. - */ - public List extendedNetworkBlocks() { - return this.innerProperties() == null ? null : this.innerProperties().extendedNetworkBlocks(); - } - - /** - * Set the extendedNetworkBlocks property: Array of additional networks noncontiguous with networkBlock. Networks - * must be unique and non-overlapping across VNet in your subscription, on-premise, and this privateCloud - * networkBlock attribute. Make sure the CIDR format conforms to (A.B.C.D/X). - * - * @param extendedNetworkBlocks the extendedNetworkBlocks value to set. - * @return the PrivateCloudInner object itself. - */ - public PrivateCloudInner withExtendedNetworkBlocks(List extendedNetworkBlocks) { - if (this.innerProperties() == null) { - this.innerProperties = new PrivateCloudProperties(); - } - this.innerProperties().withExtendedNetworkBlocks(extendedNetworkBlocks); + this.innerProperties().withDnsZoneType(dnsZoneType); return this; } /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { + if (innerProperties() != null) { + innerProperties().validate(); + } if (sku() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property sku in model PrivateCloudInner")); + throw LOGGER.logExceptionAsError( + new IllegalArgumentException("Missing required property sku in model PrivateCloudInner")); } else { sku().validate(); } - if (innerProperties() != null) { - innerProperties().validate(); - } if (identity() != null) { identity().validate(); } diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/PrivateCloudProperties.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/PrivateCloudProperties.java index 2382f43dd7b22..ed6729a1110f9 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/PrivateCloudProperties.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/PrivateCloudProperties.java @@ -8,6 +8,7 @@ import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.avs.models.AvailabilityProperties; import com.azure.resourcemanager.avs.models.Circuit; +import com.azure.resourcemanager.avs.models.DnsZoneType; import com.azure.resourcemanager.avs.models.Encryption; import com.azure.resourcemanager.avs.models.Endpoints; import com.azure.resourcemanager.avs.models.IdentitySource; @@ -18,9 +19,50 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** The properties of a private cloud resource. */ +/** + * The properties of a private cloud resource. + */ @Fluent -public final class PrivateCloudProperties extends PrivateCloudUpdateProperties { +public final class PrivateCloudProperties { + /* + * The default cluster used for management + */ + @JsonProperty(value = "managementCluster", required = true) + private ManagementCluster managementCluster; + + /* + * Connectivity to internet is enabled or disabled + */ + @JsonProperty(value = "internet") + private InternetEnum internet; + + /* + * vCenter Single Sign On Identity Sources + */ + @JsonProperty(value = "identitySources") + private List identitySources; + + /* + * Properties describing how the cloud is distributed across availability zones + */ + @JsonProperty(value = "availability") + private AvailabilityProperties availability; + + /* + * Customer managed key encryption, can be enabled or disabled + */ + @JsonProperty(value = "encryption") + private Encryption encryption; + + /* + * Array of additional networks noncontiguous with networkBlock. Networks must be + * unique and non-overlapping across VNet in your subscription, on-premise, and + * this privateCloud networkBlock attribute. Make sure the CIDR format conforms to + * (A.B.C.D/X). + */ + @JsonProperty(value = "extendedNetworkBlocks") + private List extendedNetworkBlocks; + /* * The provisioning state */ @@ -40,8 +82,9 @@ public final class PrivateCloudProperties extends PrivateCloudUpdateProperties { private Endpoints endpoints; /* - * The block of addresses should be unique across VNet in your subscription as well as on-premise. Make sure the - * CIDR format is conformed to (A.B.C.D/X) where A,B,C,D are between 0 and 255, and X is between 0 and 22 + * The block of addresses should be unique across VNet in your subscription as + * well as on-premise. Make sure the CIDR format is conformed to (A.B.C.D/X) where + * A,B,C,D are between 0 and 255, and X is between 0 and 22 */ @JsonProperty(value = "networkBlock", required = true) private String networkBlock; @@ -95,25 +138,168 @@ public final class PrivateCloudProperties extends PrivateCloudUpdateProperties { private List externalCloudLinks; /* - * A secondary expressRoute circuit from a separate AZ. Only present in a stretched private cloud + * A secondary expressRoute circuit from a separate AZ. Only present in a + * stretched private cloud */ @JsonProperty(value = "secondaryCircuit") private Circuit secondaryCircuit; /* - * Flag to indicate whether the private cloud has the quota for provisioned NSX Public IP count raised from 64 to - * 1024 + * Flag to indicate whether the private cloud has the quota for provisioned NSX + * Public IP count raised from 64 to 1024 */ @JsonProperty(value = "nsxPublicIpQuotaRaised", access = JsonProperty.Access.WRITE_ONLY) private NsxPublicIpQuotaRaisedEnum nsxPublicIpQuotaRaised; - /** Creates an instance of PrivateCloudProperties class. */ + /* + * Azure resource ID of the virtual network + */ + @JsonProperty(value = "virtualNetworkId") + private String virtualNetworkId; + + /* + * The type of DNS zone to use. + */ + @JsonProperty(value = "dnsZoneType") + private DnsZoneType dnsZoneType; + + /** + * Creates an instance of PrivateCloudProperties class. + */ public PrivateCloudProperties() { } + /** + * Get the managementCluster property: The default cluster used for management. + * + * @return the managementCluster value. + */ + public ManagementCluster managementCluster() { + return this.managementCluster; + } + + /** + * Set the managementCluster property: The default cluster used for management. + * + * @param managementCluster the managementCluster value to set. + * @return the PrivateCloudProperties object itself. + */ + public PrivateCloudProperties withManagementCluster(ManagementCluster managementCluster) { + this.managementCluster = managementCluster; + return this; + } + + /** + * Get the internet property: Connectivity to internet is enabled or disabled. + * + * @return the internet value. + */ + public InternetEnum internet() { + return this.internet; + } + + /** + * Set the internet property: Connectivity to internet is enabled or disabled. + * + * @param internet the internet value to set. + * @return the PrivateCloudProperties object itself. + */ + public PrivateCloudProperties withInternet(InternetEnum internet) { + this.internet = internet; + return this; + } + + /** + * Get the identitySources property: vCenter Single Sign On Identity Sources. + * + * @return the identitySources value. + */ + public List identitySources() { + return this.identitySources; + } + + /** + * Set the identitySources property: vCenter Single Sign On Identity Sources. + * + * @param identitySources the identitySources value to set. + * @return the PrivateCloudProperties object itself. + */ + public PrivateCloudProperties withIdentitySources(List identitySources) { + this.identitySources = identitySources; + return this; + } + + /** + * Get the availability property: Properties describing how the cloud is distributed across availability zones. + * + * @return the availability value. + */ + public AvailabilityProperties availability() { + return this.availability; + } + + /** + * Set the availability property: Properties describing how the cloud is distributed across availability zones. + * + * @param availability the availability value to set. + * @return the PrivateCloudProperties object itself. + */ + public PrivateCloudProperties withAvailability(AvailabilityProperties availability) { + this.availability = availability; + return this; + } + + /** + * Get the encryption property: Customer managed key encryption, can be enabled or disabled. + * + * @return the encryption value. + */ + public Encryption encryption() { + return this.encryption; + } + + /** + * Set the encryption property: Customer managed key encryption, can be enabled or disabled. + * + * @param encryption the encryption value to set. + * @return the PrivateCloudProperties object itself. + */ + public PrivateCloudProperties withEncryption(Encryption encryption) { + this.encryption = encryption; + return this; + } + + /** + * Get the extendedNetworkBlocks property: Array of additional networks noncontiguous with networkBlock. Networks + * must be + * unique and non-overlapping across VNet in your subscription, on-premise, and + * this privateCloud networkBlock attribute. Make sure the CIDR format conforms to + * (A.B.C.D/X). + * + * @return the extendedNetworkBlocks value. + */ + public List extendedNetworkBlocks() { + return this.extendedNetworkBlocks; + } + + /** + * Set the extendedNetworkBlocks property: Array of additional networks noncontiguous with networkBlock. Networks + * must be + * unique and non-overlapping across VNet in your subscription, on-premise, and + * this privateCloud networkBlock attribute. Make sure the CIDR format conforms to + * (A.B.C.D/X). + * + * @param extendedNetworkBlocks the extendedNetworkBlocks value to set. + * @return the PrivateCloudProperties object itself. + */ + public PrivateCloudProperties withExtendedNetworkBlocks(List extendedNetworkBlocks) { + this.extendedNetworkBlocks = extendedNetworkBlocks; + return this; + } + /** * Get the provisioningState property: The provisioning state. - * + * * @return the provisioningState value. */ public PrivateCloudProvisioningState provisioningState() { @@ -122,7 +308,7 @@ public PrivateCloudProvisioningState provisioningState() { /** * Get the circuit property: An ExpressRoute Circuit. - * + * * @return the circuit value. */ public Circuit circuit() { @@ -131,7 +317,7 @@ public Circuit circuit() { /** * Set the circuit property: An ExpressRoute Circuit. - * + * * @param circuit the circuit value to set. * @return the PrivateCloudProperties object itself. */ @@ -142,7 +328,7 @@ public PrivateCloudProperties withCircuit(Circuit circuit) { /** * Get the endpoints property: The endpoints. - * + * * @return the endpoints value. */ public Endpoints endpoints() { @@ -150,10 +336,10 @@ public Endpoints endpoints() { } /** - * Get the networkBlock property: The block of addresses should be unique across VNet in your subscription as well - * as on-premise. Make sure the CIDR format is conformed to (A.B.C.D/X) where A,B,C,D are between 0 and 255, and X - * is between 0 and 22. - * + * Get the networkBlock property: The block of addresses should be unique across VNet in your subscription as + * well as on-premise. Make sure the CIDR format is conformed to (A.B.C.D/X) where + * A,B,C,D are between 0 and 255, and X is between 0 and 22. + * * @return the networkBlock value. */ public String networkBlock() { @@ -161,10 +347,10 @@ public String networkBlock() { } /** - * Set the networkBlock property: The block of addresses should be unique across VNet in your subscription as well - * as on-premise. Make sure the CIDR format is conformed to (A.B.C.D/X) where A,B,C,D are between 0 and 255, and X - * is between 0 and 22. - * + * Set the networkBlock property: The block of addresses should be unique across VNet in your subscription as + * well as on-premise. Make sure the CIDR format is conformed to (A.B.C.D/X) where + * A,B,C,D are between 0 and 255, and X is between 0 and 22. + * * @param networkBlock the networkBlock value to set. * @return the PrivateCloudProperties object itself. */ @@ -175,7 +361,7 @@ public PrivateCloudProperties withNetworkBlock(String networkBlock) { /** * Get the managementNetwork property: Network used to access vCenter Server and NSX-T Manager. - * + * * @return the managementNetwork value. */ public String managementNetwork() { @@ -184,7 +370,7 @@ public String managementNetwork() { /** * Get the provisioningNetwork property: Used for virtual machine cold migration, cloning, and snapshot migration. - * + * * @return the provisioningNetwork value. */ public String provisioningNetwork() { @@ -193,7 +379,7 @@ public String provisioningNetwork() { /** * Get the vmotionNetwork property: Used for live migration of virtual machines. - * + * * @return the vmotionNetwork value. */ public String vmotionNetwork() { @@ -202,7 +388,7 @@ public String vmotionNetwork() { /** * Get the vcenterPassword property: Optionally, set the vCenter admin password when the private cloud is created. - * + * * @return the vcenterPassword value. */ public String vcenterPassword() { @@ -211,7 +397,7 @@ public String vcenterPassword() { /** * Set the vcenterPassword property: Optionally, set the vCenter admin password when the private cloud is created. - * + * * @param vcenterPassword the vcenterPassword value to set. * @return the PrivateCloudProperties object itself. */ @@ -222,7 +408,7 @@ public PrivateCloudProperties withVcenterPassword(String vcenterPassword) { /** * Get the nsxtPassword property: Optionally, set the NSX-T Manager password when the private cloud is created. - * + * * @return the nsxtPassword value. */ public String nsxtPassword() { @@ -231,7 +417,7 @@ public String nsxtPassword() { /** * Set the nsxtPassword property: Optionally, set the NSX-T Manager password when the private cloud is created. - * + * * @param nsxtPassword the nsxtPassword value to set. * @return the PrivateCloudProperties object itself. */ @@ -242,7 +428,7 @@ public PrivateCloudProperties withNsxtPassword(String nsxtPassword) { /** * Get the vcenterCertificateThumbprint property: Thumbprint of the vCenter Server SSL certificate. - * + * * @return the vcenterCertificateThumbprint value. */ public String vcenterCertificateThumbprint() { @@ -251,7 +437,7 @@ public String vcenterCertificateThumbprint() { /** * Get the nsxtCertificateThumbprint property: Thumbprint of the NSX-T Manager SSL certificate. - * + * * @return the nsxtCertificateThumbprint value. */ public String nsxtCertificateThumbprint() { @@ -260,7 +446,7 @@ public String nsxtCertificateThumbprint() { /** * Get the externalCloudLinks property: Array of cloud link IDs from other clouds that connect to this one. - * + * * @return the externalCloudLinks value. */ public List externalCloudLinks() { @@ -270,7 +456,7 @@ public List externalCloudLinks() { /** * Get the secondaryCircuit property: A secondary expressRoute circuit from a separate AZ. Only present in a * stretched private cloud. - * + * * @return the secondaryCircuit value. */ public Circuit secondaryCircuit() { @@ -280,7 +466,7 @@ public Circuit secondaryCircuit() { /** * Set the secondaryCircuit property: A secondary expressRoute circuit from a separate AZ. Only present in a * stretched private cloud. - * + * * @param secondaryCircuit the secondaryCircuit value to set. * @return the PrivateCloudProperties object itself. */ @@ -290,65 +476,77 @@ public PrivateCloudProperties withSecondaryCircuit(Circuit secondaryCircuit) { } /** - * Get the nsxPublicIpQuotaRaised property: Flag to indicate whether the private cloud has the quota for provisioned - * NSX Public IP count raised from 64 to 1024. - * + * Get the nsxPublicIpQuotaRaised property: Flag to indicate whether the private cloud has the quota for + * provisioned NSX + * Public IP count raised from 64 to 1024. + * * @return the nsxPublicIpQuotaRaised value. */ public NsxPublicIpQuotaRaisedEnum nsxPublicIpQuotaRaised() { return this.nsxPublicIpQuotaRaised; } - /** {@inheritDoc} */ - @Override - public PrivateCloudProperties withManagementCluster(ManagementCluster managementCluster) { - super.withManagementCluster(managementCluster); - return this; - } - - /** {@inheritDoc} */ - @Override - public PrivateCloudProperties withInternet(InternetEnum internet) { - super.withInternet(internet); - return this; - } - - /** {@inheritDoc} */ - @Override - public PrivateCloudProperties withIdentitySources(List identitySources) { - super.withIdentitySources(identitySources); - return this; + /** + * Get the virtualNetworkId property: Azure resource ID of the virtual network. + * + * @return the virtualNetworkId value. + */ + public String virtualNetworkId() { + return this.virtualNetworkId; } - /** {@inheritDoc} */ - @Override - public PrivateCloudProperties withAvailability(AvailabilityProperties availability) { - super.withAvailability(availability); + /** + * Set the virtualNetworkId property: Azure resource ID of the virtual network. + * + * @param virtualNetworkId the virtualNetworkId value to set. + * @return the PrivateCloudProperties object itself. + */ + public PrivateCloudProperties withVirtualNetworkId(String virtualNetworkId) { + this.virtualNetworkId = virtualNetworkId; return this; } - /** {@inheritDoc} */ - @Override - public PrivateCloudProperties withEncryption(Encryption encryption) { - super.withEncryption(encryption); - return this; + /** + * Get the dnsZoneType property: The type of DNS zone to use. + * + * @return the dnsZoneType value. + */ + public DnsZoneType dnsZoneType() { + return this.dnsZoneType; } - /** {@inheritDoc} */ - @Override - public PrivateCloudProperties withExtendedNetworkBlocks(List extendedNetworkBlocks) { - super.withExtendedNetworkBlocks(extendedNetworkBlocks); + /** + * Set the dnsZoneType property: The type of DNS zone to use. + * + * @param dnsZoneType the dnsZoneType value to set. + * @return the PrivateCloudProperties object itself. + */ + public PrivateCloudProperties withDnsZoneType(DnsZoneType dnsZoneType) { + this.dnsZoneType = dnsZoneType; return this; } /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ - @Override public void validate() { - super.validate(); + if (managementCluster() == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + "Missing required property managementCluster in model PrivateCloudProperties")); + } else { + managementCluster().validate(); + } + if (identitySources() != null) { + identitySources().forEach(e -> e.validate()); + } + if (availability() != null) { + availability().validate(); + } + if (encryption() != null) { + encryption().validate(); + } if (circuit() != null) { circuit().validate(); } @@ -356,10 +554,8 @@ public void validate() { endpoints().validate(); } if (networkBlock() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property networkBlock in model PrivateCloudProperties")); + throw LOGGER.logExceptionAsError( + new IllegalArgumentException("Missing required property networkBlock in model PrivateCloudProperties")); } if (secondaryCircuit() != null) { secondaryCircuit().validate(); diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/PrivateCloudUpdateProperties.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/PrivateCloudUpdateProperties.java index 6113ce2eca10c..bdf9b964ddfda 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/PrivateCloudUpdateProperties.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/PrivateCloudUpdateProperties.java @@ -6,6 +6,7 @@ import com.azure.core.annotation.Fluent; import com.azure.resourcemanager.avs.models.AvailabilityProperties; +import com.azure.resourcemanager.avs.models.DnsZoneType; import com.azure.resourcemanager.avs.models.Encryption; import com.azure.resourcemanager.avs.models.IdentitySource; import com.azure.resourcemanager.avs.models.InternetEnum; @@ -13,9 +14,11 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** The properties of a private cloud resource that may be updated. */ +/** + * The properties of a private cloud resource that may be updated. + */ @Fluent -public class PrivateCloudUpdateProperties { +public final class PrivateCloudUpdateProperties { /* * The default cluster used for management */ @@ -47,20 +50,29 @@ public class PrivateCloudUpdateProperties { private Encryption encryption; /* - * Array of additional networks noncontiguous with networkBlock. Networks must be unique and non-overlapping across - * VNet in your subscription, on-premise, and this privateCloud networkBlock attribute. Make sure the CIDR format - * conforms to (A.B.C.D/X). + * Array of additional networks noncontiguous with networkBlock. Networks must be + * unique and non-overlapping across VNet in your subscription, on-premise, and + * this privateCloud networkBlock attribute. Make sure the CIDR format conforms to + * (A.B.C.D/X). */ @JsonProperty(value = "extendedNetworkBlocks") private List extendedNetworkBlocks; - /** Creates an instance of PrivateCloudUpdateProperties class. */ + /* + * The type of DNS zone to use. + */ + @JsonProperty(value = "dnsZoneType") + private DnsZoneType dnsZoneType; + + /** + * Creates an instance of PrivateCloudUpdateProperties class. + */ public PrivateCloudUpdateProperties() { } /** * Get the managementCluster property: The default cluster used for management. - * + * * @return the managementCluster value. */ public ManagementCluster managementCluster() { @@ -69,7 +81,7 @@ public ManagementCluster managementCluster() { /** * Set the managementCluster property: The default cluster used for management. - * + * * @param managementCluster the managementCluster value to set. * @return the PrivateCloudUpdateProperties object itself. */ @@ -80,7 +92,7 @@ public PrivateCloudUpdateProperties withManagementCluster(ManagementCluster mana /** * Get the internet property: Connectivity to internet is enabled or disabled. - * + * * @return the internet value. */ public InternetEnum internet() { @@ -89,7 +101,7 @@ public InternetEnum internet() { /** * Set the internet property: Connectivity to internet is enabled or disabled. - * + * * @param internet the internet value to set. * @return the PrivateCloudUpdateProperties object itself. */ @@ -100,7 +112,7 @@ public PrivateCloudUpdateProperties withInternet(InternetEnum internet) { /** * Get the identitySources property: vCenter Single Sign On Identity Sources. - * + * * @return the identitySources value. */ public List identitySources() { @@ -109,7 +121,7 @@ public List identitySources() { /** * Set the identitySources property: vCenter Single Sign On Identity Sources. - * + * * @param identitySources the identitySources value to set. * @return the PrivateCloudUpdateProperties object itself. */ @@ -120,7 +132,7 @@ public PrivateCloudUpdateProperties withIdentitySources(List ide /** * Get the availability property: Properties describing how the cloud is distributed across availability zones. - * + * * @return the availability value. */ public AvailabilityProperties availability() { @@ -129,7 +141,7 @@ public AvailabilityProperties availability() { /** * Set the availability property: Properties describing how the cloud is distributed across availability zones. - * + * * @param availability the availability value to set. * @return the PrivateCloudUpdateProperties object itself. */ @@ -140,7 +152,7 @@ public PrivateCloudUpdateProperties withAvailability(AvailabilityProperties avai /** * Get the encryption property: Customer managed key encryption, can be enabled or disabled. - * + * * @return the encryption value. */ public Encryption encryption() { @@ -149,7 +161,7 @@ public Encryption encryption() { /** * Set the encryption property: Customer managed key encryption, can be enabled or disabled. - * + * * @param encryption the encryption value to set. * @return the PrivateCloudUpdateProperties object itself. */ @@ -160,9 +172,11 @@ public PrivateCloudUpdateProperties withEncryption(Encryption encryption) { /** * Get the extendedNetworkBlocks property: Array of additional networks noncontiguous with networkBlock. Networks - * must be unique and non-overlapping across VNet in your subscription, on-premise, and this privateCloud - * networkBlock attribute. Make sure the CIDR format conforms to (A.B.C.D/X). - * + * must be + * unique and non-overlapping across VNet in your subscription, on-premise, and + * this privateCloud networkBlock attribute. Make sure the CIDR format conforms to + * (A.B.C.D/X). + * * @return the extendedNetworkBlocks value. */ public List extendedNetworkBlocks() { @@ -171,9 +185,11 @@ public List extendedNetworkBlocks() { /** * Set the extendedNetworkBlocks property: Array of additional networks noncontiguous with networkBlock. Networks - * must be unique and non-overlapping across VNet in your subscription, on-premise, and this privateCloud - * networkBlock attribute. Make sure the CIDR format conforms to (A.B.C.D/X). - * + * must be + * unique and non-overlapping across VNet in your subscription, on-premise, and + * this privateCloud networkBlock attribute. Make sure the CIDR format conforms to + * (A.B.C.D/X). + * * @param extendedNetworkBlocks the extendedNetworkBlocks value to set. * @return the PrivateCloudUpdateProperties object itself. */ @@ -182,9 +198,29 @@ public PrivateCloudUpdateProperties withExtendedNetworkBlocks(List exten return this; } + /** + * Get the dnsZoneType property: The type of DNS zone to use. + * + * @return the dnsZoneType value. + */ + public DnsZoneType dnsZoneType() { + return this.dnsZoneType; + } + + /** + * Set the dnsZoneType property: The type of DNS zone to use. + * + * @param dnsZoneType the dnsZoneType value to set. + * @return the PrivateCloudUpdateProperties object itself. + */ + public PrivateCloudUpdateProperties withDnsZoneType(DnsZoneType dnsZoneType) { + this.dnsZoneType = dnsZoneType; + return this; + } + /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/QuotaInner.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/QuotaInner.java index 00f004118165b..82bb3f0d6b161 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/QuotaInner.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/QuotaInner.java @@ -10,7 +10,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.Map; -/** Subscription quotas. */ +/** + * Subscription quotas. + */ @Immutable public final class QuotaInner { /* @@ -26,13 +28,15 @@ public final class QuotaInner { @JsonProperty(value = "quotaEnabled", access = JsonProperty.Access.WRITE_ONLY) private QuotaEnabled quotaEnabled; - /** Creates an instance of QuotaInner class. */ + /** + * Creates an instance of QuotaInner class. + */ public QuotaInner() { } /** * Get the hostsRemaining property: Remaining hosts quota by sku type. - * + * * @return the hostsRemaining value. */ public Map hostsRemaining() { @@ -41,7 +45,7 @@ public Map hostsRemaining() { /** * Get the quotaEnabled property: Host quota is active for current subscription. - * + * * @return the quotaEnabled value. */ public QuotaEnabled quotaEnabled() { @@ -50,7 +54,7 @@ public QuotaEnabled quotaEnabled() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/ScriptCmdletInner.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/ScriptCmdletInner.java index 4c5a09b4b7ddf..8f651acbe40a8 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/ScriptCmdletInner.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/ScriptCmdletInner.java @@ -6,35 +6,66 @@ import com.azure.core.annotation.Immutable; import com.azure.core.management.ProxyResource; +import com.azure.core.management.SystemData; +import com.azure.resourcemanager.avs.models.ScriptCmdletAudience; +import com.azure.resourcemanager.avs.models.ScriptCmdletProvisioningState; import com.azure.resourcemanager.avs.models.ScriptParameter; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** A cmdlet available for script execution. */ +/** + * A cmdlet available for script execution. + */ @Immutable public final class ScriptCmdletInner extends ProxyResource { /* - * The properties of a script cmdlet resource + * The resource-specific properties for this resource. */ @JsonProperty(value = "properties") private ScriptCmdletProperties innerProperties; - /** Creates an instance of ScriptCmdletInner class. */ + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) + private SystemData systemData; + + /** + * Creates an instance of ScriptCmdletInner class. + */ public ScriptCmdletInner() { } /** - * Get the innerProperties property: The properties of a script cmdlet resource. - * + * Get the innerProperties property: The resource-specific properties for this resource. + * * @return the innerProperties value. */ private ScriptCmdletProperties innerProperties() { return this.innerProperties; } + /** + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + + /** + * Get the provisioningState property: The provisioning state of the resource. + * + * @return the provisioningState value. + */ + public ScriptCmdletProvisioningState provisioningState() { + return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); + } + /** * Get the description property: Description of the scripts functionality. - * + * * @return the description value. */ public String description() { @@ -43,16 +74,26 @@ public String description() { /** * Get the timeout property: Recommended time limit for execution. - * + * * @return the timeout value. */ public String timeout() { return this.innerProperties() == null ? null : this.innerProperties().timeout(); } + /** + * Get the audience property: Specifies whether a script cmdlet is intended to be invoked only through automation + * or visible to customers. + * + * @return the audience value. + */ + public ScriptCmdletAudience audience() { + return this.innerProperties() == null ? null : this.innerProperties().audience(); + } + /** * Get the parameters property: Parameters the script will accept. - * + * * @return the parameters value. */ public List parameters() { @@ -61,7 +102,7 @@ public List parameters() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/ScriptCmdletProperties.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/ScriptCmdletProperties.java index 2afbbba9fc907..6dd3cb4301733 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/ScriptCmdletProperties.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/ScriptCmdletProperties.java @@ -5,13 +5,23 @@ package com.azure.resourcemanager.avs.fluent.models; import com.azure.core.annotation.Immutable; +import com.azure.resourcemanager.avs.models.ScriptCmdletAudience; +import com.azure.resourcemanager.avs.models.ScriptCmdletProvisioningState; import com.azure.resourcemanager.avs.models.ScriptParameter; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** Properties of a pre-canned script. */ +/** + * Properties of a pre-canned script. + */ @Immutable public final class ScriptCmdletProperties { + /* + * The provisioning state of the resource. + */ + @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private ScriptCmdletProvisioningState provisioningState; + /* * Description of the scripts functionality */ @@ -24,19 +34,36 @@ public final class ScriptCmdletProperties { @JsonProperty(value = "timeout", access = JsonProperty.Access.WRITE_ONLY) private String timeout; + /* + * Specifies whether a script cmdlet is intended to be invoked only through automation or visible to customers + */ + @JsonProperty(value = "audience", access = JsonProperty.Access.WRITE_ONLY) + private ScriptCmdletAudience audience; + /* * Parameters the script will accept */ @JsonProperty(value = "parameters", access = JsonProperty.Access.WRITE_ONLY) private List parameters; - /** Creates an instance of ScriptCmdletProperties class. */ + /** + * Creates an instance of ScriptCmdletProperties class. + */ public ScriptCmdletProperties() { } + /** + * Get the provisioningState property: The provisioning state of the resource. + * + * @return the provisioningState value. + */ + public ScriptCmdletProvisioningState provisioningState() { + return this.provisioningState; + } + /** * Get the description property: Description of the scripts functionality. - * + * * @return the description value. */ public String description() { @@ -45,16 +72,26 @@ public String description() { /** * Get the timeout property: Recommended time limit for execution. - * + * * @return the timeout value. */ public String timeout() { return this.timeout; } + /** + * Get the audience property: Specifies whether a script cmdlet is intended to be invoked only through automation + * or visible to customers. + * + * @return the audience value. + */ + public ScriptCmdletAudience audience() { + return this.audience; + } + /** * Get the parameters property: Parameters the script will accept. - * + * * @return the parameters value. */ public List parameters() { @@ -63,7 +100,7 @@ public List parameters() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/ScriptExecutionInner.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/ScriptExecutionInner.java index 763ed5ac9c455..e8a9aab210ee1 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/ScriptExecutionInner.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/ScriptExecutionInner.java @@ -6,6 +6,7 @@ import com.azure.core.annotation.Fluent; import com.azure.core.management.ProxyResource; +import com.azure.core.management.SystemData; import com.azure.resourcemanager.avs.models.ScriptExecutionParameter; import com.azure.resourcemanager.avs.models.ScriptExecutionProvisioningState; import com.fasterxml.jackson.annotation.JsonProperty; @@ -13,31 +14,50 @@ import java.util.List; import java.util.Map; -/** An instance of a script executed by a user - custom or AVS. */ +/** + * An instance of a script executed by a user - custom or AVS. + */ @Fluent public final class ScriptExecutionInner extends ProxyResource { /* - * The properties of a script execution resource + * The resource-specific properties for this resource. */ @JsonProperty(value = "properties") private ScriptExecutionProperties innerProperties; - /** Creates an instance of ScriptExecutionInner class. */ + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) + private SystemData systemData; + + /** + * Creates an instance of ScriptExecutionInner class. + */ public ScriptExecutionInner() { } /** - * Get the innerProperties property: The properties of a script execution resource. - * + * Get the innerProperties property: The resource-specific properties for this resource. + * * @return the innerProperties value. */ private ScriptExecutionProperties innerProperties() { return this.innerProperties; } + /** + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + /** * Get the scriptCmdletId property: A reference to the script cmdlet resource if user is running a AVS script. - * + * * @return the scriptCmdletId value. */ public String scriptCmdletId() { @@ -46,7 +66,7 @@ public String scriptCmdletId() { /** * Set the scriptCmdletId property: A reference to the script cmdlet resource if user is running a AVS script. - * + * * @param scriptCmdletId the scriptCmdletId value to set. * @return the ScriptExecutionInner object itself. */ @@ -60,7 +80,7 @@ public ScriptExecutionInner withScriptCmdletId(String scriptCmdletId) { /** * Get the parameters property: Parameters the script will accept. - * + * * @return the parameters value. */ public List parameters() { @@ -69,7 +89,7 @@ public List parameters() { /** * Set the parameters property: Parameters the script will accept. - * + * * @param parameters the parameters value to set. * @return the ScriptExecutionInner object itself. */ @@ -84,7 +104,7 @@ public ScriptExecutionInner withParameters(List parame /** * Get the hiddenParameters property: Parameters that will be hidden/not visible to ARM, such as passwords and * credentials. - * + * * @return the hiddenParameters value. */ public List hiddenParameters() { @@ -94,7 +114,7 @@ public List hiddenParameters() { /** * Set the hiddenParameters property: Parameters that will be hidden/not visible to ARM, such as passwords and * credentials. - * + * * @param hiddenParameters the hiddenParameters value to set. * @return the ScriptExecutionInner object itself. */ @@ -107,9 +127,9 @@ public ScriptExecutionInner withHiddenParameters(List } /** - * Get the failureReason property: Error message if the script was able to run, but if the script itself had errors - * or powershell threw an exception. - * + * Get the failureReason property: Error message if the script was able to run, but if the script itself had + * errors or powershell threw an exception. + * * @return the failureReason value. */ public String failureReason() { @@ -117,9 +137,9 @@ public String failureReason() { } /** - * Set the failureReason property: Error message if the script was able to run, but if the script itself had errors - * or powershell threw an exception. - * + * Set the failureReason property: Error message if the script was able to run, but if the script itself had + * errors or powershell threw an exception. + * * @param failureReason the failureReason value to set. * @return the ScriptExecutionInner object itself. */ @@ -133,7 +153,7 @@ public ScriptExecutionInner withFailureReason(String failureReason) { /** * Get the timeout property: Time limit for execution. - * + * * @return the timeout value. */ public String timeout() { @@ -142,7 +162,7 @@ public String timeout() { /** * Set the timeout property: Time limit for execution. - * + * * @param timeout the timeout value to set. * @return the ScriptExecutionInner object itself. */ @@ -156,7 +176,7 @@ public ScriptExecutionInner withTimeout(String timeout) { /** * Get the retention property: Time to live for the resource. If not provided, will be available for 60 days. - * + * * @return the retention value. */ public String retention() { @@ -165,7 +185,7 @@ public String retention() { /** * Set the retention property: Time to live for the resource. If not provided, will be available for 60 days. - * + * * @param retention the retention value to set. * @return the ScriptExecutionInner object itself. */ @@ -179,7 +199,7 @@ public ScriptExecutionInner withRetention(String retention) { /** * Get the submittedAt property: Time the script execution was submitted. - * + * * @return the submittedAt value. */ public OffsetDateTime submittedAt() { @@ -188,7 +208,7 @@ public OffsetDateTime submittedAt() { /** * Get the startedAt property: Time the script execution was started. - * + * * @return the startedAt value. */ public OffsetDateTime startedAt() { @@ -197,7 +217,7 @@ public OffsetDateTime startedAt() { /** * Get the finishedAt property: Time the script execution was finished. - * + * * @return the finishedAt value. */ public OffsetDateTime finishedAt() { @@ -206,7 +226,7 @@ public OffsetDateTime finishedAt() { /** * Get the provisioningState property: The state of the script execution resource. - * + * * @return the provisioningState value. */ public ScriptExecutionProvisioningState provisioningState() { @@ -215,7 +235,7 @@ public ScriptExecutionProvisioningState provisioningState() { /** * Get the output property: Standard output stream from the powershell execution. - * + * * @return the output value. */ public List output() { @@ -224,7 +244,7 @@ public List output() { /** * Set the output property: Standard output stream from the powershell execution. - * + * * @param output the output value to set. * @return the ScriptExecutionInner object itself. */ @@ -238,7 +258,7 @@ public ScriptExecutionInner withOutput(List output) { /** * Get the namedOutputs property: User-defined dictionary. - * + * * @return the namedOutputs value. */ public Map namedOutputs() { @@ -247,7 +267,7 @@ public Map namedOutputs() { /** * Set the namedOutputs property: User-defined dictionary. - * + * * @param namedOutputs the namedOutputs value to set. * @return the ScriptExecutionInner object itself. */ @@ -261,7 +281,7 @@ public ScriptExecutionInner withNamedOutputs(Map namedOutputs) { /** * Get the information property: Standard information out stream from the powershell execution. - * + * * @return the information value. */ public List information() { @@ -270,7 +290,7 @@ public List information() { /** * Get the warnings property: Standard warning out stream from the powershell execution. - * + * * @return the warnings value. */ public List warnings() { @@ -279,7 +299,7 @@ public List warnings() { /** * Get the errors property: Standard error output stream from the powershell execution. - * + * * @return the errors value. */ public List errors() { @@ -288,7 +308,7 @@ public List errors() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/ScriptExecutionProperties.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/ScriptExecutionProperties.java index 4242773e828eb..31d65096c7c71 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/ScriptExecutionProperties.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/ScriptExecutionProperties.java @@ -14,7 +14,9 @@ import java.util.List; import java.util.Map; -/** Properties of a user-invoked script. */ +/** + * Properties of a user-invoked script. + */ @Fluent public final class ScriptExecutionProperties { /* @@ -30,14 +32,15 @@ public final class ScriptExecutionProperties { private List parameters; /* - * Parameters that will be hidden/not visible to ARM, such as passwords and credentials + * Parameters that will be hidden/not visible to ARM, such as passwords and + * credentials */ @JsonProperty(value = "hiddenParameters") private List hiddenParameters; /* - * Error message if the script was able to run, but if the script itself had errors or powershell threw an - * exception + * Error message if the script was able to run, but if the script itself had + * errors or powershell threw an exception */ @JsonProperty(value = "failureReason") private String failureReason; @@ -109,13 +112,15 @@ public final class ScriptExecutionProperties { @JsonProperty(value = "errors", access = JsonProperty.Access.WRITE_ONLY) private List errors; - /** Creates an instance of ScriptExecutionProperties class. */ + /** + * Creates an instance of ScriptExecutionProperties class. + */ public ScriptExecutionProperties() { } /** * Get the scriptCmdletId property: A reference to the script cmdlet resource if user is running a AVS script. - * + * * @return the scriptCmdletId value. */ public String scriptCmdletId() { @@ -124,7 +129,7 @@ public String scriptCmdletId() { /** * Set the scriptCmdletId property: A reference to the script cmdlet resource if user is running a AVS script. - * + * * @param scriptCmdletId the scriptCmdletId value to set. * @return the ScriptExecutionProperties object itself. */ @@ -135,7 +140,7 @@ public ScriptExecutionProperties withScriptCmdletId(String scriptCmdletId) { /** * Get the parameters property: Parameters the script will accept. - * + * * @return the parameters value. */ public List parameters() { @@ -144,7 +149,7 @@ public List parameters() { /** * Set the parameters property: Parameters the script will accept. - * + * * @param parameters the parameters value to set. * @return the ScriptExecutionProperties object itself. */ @@ -156,7 +161,7 @@ public ScriptExecutionProperties withParameters(List p /** * Get the hiddenParameters property: Parameters that will be hidden/not visible to ARM, such as passwords and * credentials. - * + * * @return the hiddenParameters value. */ public List hiddenParameters() { @@ -166,7 +171,7 @@ public List hiddenParameters() { /** * Set the hiddenParameters property: Parameters that will be hidden/not visible to ARM, such as passwords and * credentials. - * + * * @param hiddenParameters the hiddenParameters value to set. * @return the ScriptExecutionProperties object itself. */ @@ -176,9 +181,9 @@ public ScriptExecutionProperties withHiddenParameters(List output() { @@ -284,7 +289,7 @@ public List output() { /** * Set the output property: Standard output stream from the powershell execution. - * + * * @param output the output value to set. * @return the ScriptExecutionProperties object itself. */ @@ -295,7 +300,7 @@ public ScriptExecutionProperties withOutput(List output) { /** * Get the namedOutputs property: User-defined dictionary. - * + * * @return the namedOutputs value. */ public Map namedOutputs() { @@ -304,7 +309,7 @@ public Map namedOutputs() { /** * Set the namedOutputs property: User-defined dictionary. - * + * * @param namedOutputs the namedOutputs value to set. * @return the ScriptExecutionProperties object itself. */ @@ -315,7 +320,7 @@ public ScriptExecutionProperties withNamedOutputs(Map namedOutpu /** * Get the information property: Standard information out stream from the powershell execution. - * + * * @return the information value. */ public List information() { @@ -324,7 +329,7 @@ public List information() { /** * Get the warnings property: Standard warning out stream from the powershell execution. - * + * * @return the warnings value. */ public List warnings() { @@ -333,7 +338,7 @@ public List warnings() { /** * Get the errors property: Standard error output stream from the powershell execution. - * + * * @return the errors value. */ public List errors() { @@ -342,7 +347,7 @@ public List errors() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { @@ -353,10 +358,8 @@ public void validate() { hiddenParameters().forEach(e -> e.validate()); } if (timeout() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property timeout in model ScriptExecutionProperties")); + throw LOGGER.logExceptionAsError( + new IllegalArgumentException("Missing required property timeout in model ScriptExecutionProperties")); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/ScriptPackageInner.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/ScriptPackageInner.java index f6a2efc4fb89e..2e5c792c2dad3 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/ScriptPackageInner.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/ScriptPackageInner.java @@ -6,33 +6,63 @@ import com.azure.core.annotation.Immutable; import com.azure.core.management.ProxyResource; +import com.azure.core.management.SystemData; +import com.azure.resourcemanager.avs.models.ScriptPackageProvisioningState; import com.fasterxml.jackson.annotation.JsonProperty; -/** Script Package resources available for execution. */ +/** + * Script Package resources available for execution. + */ @Immutable public final class ScriptPackageInner extends ProxyResource { /* - * ScriptPackage resource properties + * The resource-specific properties for this resource. */ @JsonProperty(value = "properties") private ScriptPackageProperties innerProperties; - /** Creates an instance of ScriptPackageInner class. */ + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) + private SystemData systemData; + + /** + * Creates an instance of ScriptPackageInner class. + */ public ScriptPackageInner() { } /** - * Get the innerProperties property: ScriptPackage resource properties. - * + * Get the innerProperties property: The resource-specific properties for this resource. + * * @return the innerProperties value. */ private ScriptPackageProperties innerProperties() { return this.innerProperties; } + /** + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + + /** + * Get the provisioningState property: The provisioning state of the resource. + * + * @return the provisioningState value. + */ + public ScriptPackageProvisioningState provisioningState() { + return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); + } + /** * Get the description property: User friendly description of the package. - * + * * @return the description value. */ public String description() { @@ -41,7 +71,7 @@ public String description() { /** * Get the version property: Module version. - * + * * @return the version value. */ public String version() { @@ -50,7 +80,7 @@ public String version() { /** * Get the company property: Company that created and supports the package. - * + * * @return the company value. */ public String company() { @@ -59,7 +89,7 @@ public String company() { /** * Get the uri property: Link to support by the package vendor. - * + * * @return the uri value. */ public String uri() { @@ -68,7 +98,7 @@ public String uri() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/ScriptPackageProperties.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/ScriptPackageProperties.java index 57f3734d7cb3d..cf19d31e72681 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/ScriptPackageProperties.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/ScriptPackageProperties.java @@ -5,11 +5,20 @@ package com.azure.resourcemanager.avs.fluent.models; import com.azure.core.annotation.Immutable; +import com.azure.resourcemanager.avs.models.ScriptPackageProvisioningState; import com.fasterxml.jackson.annotation.JsonProperty; -/** Properties of a Script Package subresource. */ +/** + * Properties of a Script Package subresource. + */ @Immutable public final class ScriptPackageProperties { + /* + * The provisioning state of the resource. + */ + @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private ScriptPackageProvisioningState provisioningState; + /* * User friendly description of the package */ @@ -34,13 +43,24 @@ public final class ScriptPackageProperties { @JsonProperty(value = "uri", access = JsonProperty.Access.WRITE_ONLY) private String uri; - /** Creates an instance of ScriptPackageProperties class. */ + /** + * Creates an instance of ScriptPackageProperties class. + */ public ScriptPackageProperties() { } + /** + * Get the provisioningState property: The provisioning state of the resource. + * + * @return the provisioningState value. + */ + public ScriptPackageProvisioningState provisioningState() { + return this.provisioningState; + } + /** * Get the description property: User friendly description of the package. - * + * * @return the description value. */ public String description() { @@ -49,7 +69,7 @@ public String description() { /** * Get the version property: Module version. - * + * * @return the version value. */ public String version() { @@ -58,7 +78,7 @@ public String version() { /** * Get the company property: Company that created and supports the package. - * + * * @return the company value. */ public String company() { @@ -67,7 +87,7 @@ public String company() { /** * Get the uri property: Link to support by the package vendor. - * + * * @return the uri value. */ public String uri() { @@ -76,7 +96,7 @@ public String uri() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/TrialInner.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/TrialInner.java index 15806ec46fd81..56264739577f3 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/TrialInner.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/TrialInner.java @@ -8,7 +8,9 @@ import com.azure.resourcemanager.avs.models.TrialStatus; import com.fasterxml.jackson.annotation.JsonProperty; -/** Subscription trial availability. */ +/** + * Subscription trial availability. + */ @Immutable public final class TrialInner { /* @@ -23,13 +25,15 @@ public final class TrialInner { @JsonProperty(value = "availableHosts", access = JsonProperty.Access.WRITE_ONLY) private Integer availableHosts; - /** Creates an instance of TrialInner class. */ + /** + * Creates an instance of TrialInner class. + */ public TrialInner() { } /** * Get the status property: Trial status. - * + * * @return the status value. */ public TrialStatus status() { @@ -38,7 +42,7 @@ public TrialStatus status() { /** * Get the availableHosts property: Number of trial hosts available. - * + * * @return the availableHosts value. */ public Integer availableHosts() { @@ -47,7 +51,7 @@ public Integer availableHosts() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/VirtualMachineInner.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/VirtualMachineInner.java index 9225ad47331e7..1a01462043f32 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/VirtualMachineInner.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/VirtualMachineInner.java @@ -6,34 +6,64 @@ import com.azure.core.annotation.Immutable; import com.azure.core.management.ProxyResource; +import com.azure.core.management.SystemData; +import com.azure.resourcemanager.avs.models.VirtualMachineProvisioningState; import com.azure.resourcemanager.avs.models.VirtualMachineRestrictMovementState; import com.fasterxml.jackson.annotation.JsonProperty; -/** Virtual Machine. */ +/** + * Virtual Machine. + */ @Immutable public final class VirtualMachineInner extends ProxyResource { /* - * Virtual machine properties. + * The resource-specific properties for this resource. */ @JsonProperty(value = "properties") private VirtualMachineProperties innerProperties; - /** Creates an instance of VirtualMachineInner class. */ + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) + private SystemData systemData; + + /** + * Creates an instance of VirtualMachineInner class. + */ public VirtualMachineInner() { } /** - * Get the innerProperties property: Virtual machine properties. - * + * Get the innerProperties property: The resource-specific properties for this resource. + * * @return the innerProperties value. */ private VirtualMachineProperties innerProperties() { return this.innerProperties; } + /** + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + + /** + * Get the provisioningState property: The provisioning state of the resource. + * + * @return the provisioningState value. + */ + public VirtualMachineProvisioningState provisioningState() { + return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); + } + /** * Get the displayName property: Display name of the VM. - * + * * @return the displayName value. */ public String displayName() { @@ -42,7 +72,7 @@ public String displayName() { /** * Get the moRefId property: Virtual machine managed object reference id. - * + * * @return the moRefId value. */ public String moRefId() { @@ -51,7 +81,7 @@ public String moRefId() { /** * Get the folderPath property: Path to virtual machine's folder starting from datacenter virtual machine folder. - * + * * @return the folderPath value. */ public String folderPath() { @@ -60,7 +90,7 @@ public String folderPath() { /** * Get the restrictMovement property: Whether VM DRS-driven movement is restricted (enabled) or not (disabled). - * + * * @return the restrictMovement value. */ public VirtualMachineRestrictMovementState restrictMovement() { @@ -69,7 +99,7 @@ public VirtualMachineRestrictMovementState restrictMovement() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/VirtualMachineProperties.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/VirtualMachineProperties.java index d0d91ff27ff32..6fef7ced6e150 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/VirtualMachineProperties.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/VirtualMachineProperties.java @@ -5,12 +5,21 @@ package com.azure.resourcemanager.avs.fluent.models; import com.azure.core.annotation.Immutable; +import com.azure.resourcemanager.avs.models.VirtualMachineProvisioningState; import com.azure.resourcemanager.avs.models.VirtualMachineRestrictMovementState; import com.fasterxml.jackson.annotation.JsonProperty; -/** Virtual Machine Properties. */ +/** + * Virtual Machine Properties. + */ @Immutable public final class VirtualMachineProperties { + /* + * The provisioning state of the resource. + */ + @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private VirtualMachineProvisioningState provisioningState; + /* * Display name of the VM. */ @@ -35,13 +44,24 @@ public final class VirtualMachineProperties { @JsonProperty(value = "restrictMovement", access = JsonProperty.Access.WRITE_ONLY) private VirtualMachineRestrictMovementState restrictMovement; - /** Creates an instance of VirtualMachineProperties class. */ + /** + * Creates an instance of VirtualMachineProperties class. + */ public VirtualMachineProperties() { } + /** + * Get the provisioningState property: The provisioning state of the resource. + * + * @return the provisioningState value. + */ + public VirtualMachineProvisioningState provisioningState() { + return this.provisioningState; + } + /** * Get the displayName property: Display name of the VM. - * + * * @return the displayName value. */ public String displayName() { @@ -50,7 +70,7 @@ public String displayName() { /** * Get the moRefId property: Virtual machine managed object reference id. - * + * * @return the moRefId value. */ public String moRefId() { @@ -59,7 +79,7 @@ public String moRefId() { /** * Get the folderPath property: Path to virtual machine's folder starting from datacenter virtual machine folder. - * + * * @return the folderPath value. */ public String folderPath() { @@ -68,7 +88,7 @@ public String folderPath() { /** * Get the restrictMovement property: Whether VM DRS-driven movement is restricted (enabled) or not (disabled). - * + * * @return the restrictMovement value. */ public VirtualMachineRestrictMovementState restrictMovement() { @@ -77,7 +97,7 @@ public VirtualMachineRestrictMovementState restrictMovement() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkDhcpInner.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkDhcpInner.java index a21ac6609a151..351dd0d7c0cbe 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkDhcpInner.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkDhcpInner.java @@ -6,25 +6,36 @@ import com.azure.core.annotation.Fluent; import com.azure.core.management.ProxyResource; +import com.azure.core.management.SystemData; import com.azure.resourcemanager.avs.models.WorkloadNetworkDhcpEntity; import com.fasterxml.jackson.annotation.JsonProperty; -/** NSX DHCP. */ +/** + * NSX DHCP. + */ @Fluent public final class WorkloadNetworkDhcpInner extends ProxyResource { /* - * DHCP properties. + * The resource-specific properties for this resource. */ @JsonProperty(value = "properties") private WorkloadNetworkDhcpEntity properties; - /** Creates an instance of WorkloadNetworkDhcpInner class. */ + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) + private SystemData systemData; + + /** + * Creates an instance of WorkloadNetworkDhcpInner class. + */ public WorkloadNetworkDhcpInner() { } /** - * Get the properties property: DHCP properties. - * + * Get the properties property: The resource-specific properties for this resource. + * * @return the properties value. */ public WorkloadNetworkDhcpEntity properties() { @@ -32,8 +43,8 @@ public WorkloadNetworkDhcpEntity properties() { } /** - * Set the properties property: DHCP properties. - * + * Set the properties property: The resource-specific properties for this resource. + * * @param properties the properties value to set. * @return the WorkloadNetworkDhcpInner object itself. */ @@ -42,9 +53,18 @@ public WorkloadNetworkDhcpInner withProperties(WorkloadNetworkDhcpEntity propert 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; + } + /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkDnsServiceInner.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkDnsServiceInner.java index bc59a6f148cfb..0901e768cec85 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkDnsServiceInner.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkDnsServiceInner.java @@ -6,37 +6,57 @@ import com.azure.core.annotation.Fluent; import com.azure.core.management.ProxyResource; +import com.azure.core.management.SystemData; import com.azure.resourcemanager.avs.models.DnsServiceLogLevelEnum; import com.azure.resourcemanager.avs.models.DnsServiceStatusEnum; import com.azure.resourcemanager.avs.models.WorkloadNetworkDnsServiceProvisioningState; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** NSX DNS Service. */ +/** + * NSX DNS Service. + */ @Fluent public final class WorkloadNetworkDnsServiceInner extends ProxyResource { /* - * DNS Service properties + * The resource-specific properties for this resource. */ @JsonProperty(value = "properties") private WorkloadNetworkDnsServiceProperties innerProperties; - /** Creates an instance of WorkloadNetworkDnsServiceInner class. */ + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) + private SystemData systemData; + + /** + * Creates an instance of WorkloadNetworkDnsServiceInner class. + */ public WorkloadNetworkDnsServiceInner() { } /** - * Get the innerProperties property: DNS Service properties. - * + * Get the innerProperties property: The resource-specific properties for this resource. + * * @return the innerProperties value. */ private WorkloadNetworkDnsServiceProperties innerProperties() { return this.innerProperties; } + /** + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + /** * Get the displayName property: Display name of the DNS Service. - * + * * @return the displayName value. */ public String displayName() { @@ -45,7 +65,7 @@ public String displayName() { /** * Set the displayName property: Display name of the DNS Service. - * + * * @param displayName the displayName value to set. * @return the WorkloadNetworkDnsServiceInner object itself. */ @@ -59,7 +79,7 @@ public WorkloadNetworkDnsServiceInner withDisplayName(String displayName) { /** * Get the dnsServiceIp property: DNS service IP of the DNS Service. - * + * * @return the dnsServiceIp value. */ public String dnsServiceIp() { @@ -68,7 +88,7 @@ public String dnsServiceIp() { /** * Set the dnsServiceIp property: DNS service IP of the DNS Service. - * + * * @param dnsServiceIp the dnsServiceIp value to set. * @return the WorkloadNetworkDnsServiceInner object itself. */ @@ -82,7 +102,7 @@ public WorkloadNetworkDnsServiceInner withDnsServiceIp(String dnsServiceIp) { /** * Get the defaultDnsZone property: Default DNS zone of the DNS Service. - * + * * @return the defaultDnsZone value. */ public String defaultDnsZone() { @@ -91,7 +111,7 @@ public String defaultDnsZone() { /** * Set the defaultDnsZone property: Default DNS zone of the DNS Service. - * + * * @param defaultDnsZone the defaultDnsZone value to set. * @return the WorkloadNetworkDnsServiceInner object itself. */ @@ -105,7 +125,7 @@ public WorkloadNetworkDnsServiceInner withDefaultDnsZone(String defaultDnsZone) /** * Get the fqdnZones property: FQDN zones of the DNS Service. - * + * * @return the fqdnZones value. */ public List fqdnZones() { @@ -114,7 +134,7 @@ public List fqdnZones() { /** * Set the fqdnZones property: FQDN zones of the DNS Service. - * + * * @param fqdnZones the fqdnZones value to set. * @return the WorkloadNetworkDnsServiceInner object itself. */ @@ -128,7 +148,7 @@ public WorkloadNetworkDnsServiceInner withFqdnZones(List fqdnZones) { /** * Get the logLevel property: DNS Service log level. - * + * * @return the logLevel value. */ public DnsServiceLogLevelEnum logLevel() { @@ -137,7 +157,7 @@ public DnsServiceLogLevelEnum logLevel() { /** * Set the logLevel property: DNS Service log level. - * + * * @param logLevel the logLevel value to set. * @return the WorkloadNetworkDnsServiceInner object itself. */ @@ -151,7 +171,7 @@ public WorkloadNetworkDnsServiceInner withLogLevel(DnsServiceLogLevelEnum logLev /** * Get the status property: DNS Service status. - * + * * @return the status value. */ public DnsServiceStatusEnum status() { @@ -160,7 +180,7 @@ public DnsServiceStatusEnum status() { /** * Get the provisioningState property: The provisioning state. - * + * * @return the provisioningState value. */ public WorkloadNetworkDnsServiceProvisioningState provisioningState() { @@ -169,7 +189,7 @@ public WorkloadNetworkDnsServiceProvisioningState provisioningState() { /** * Get the revision property: NSX revision number. - * + * * @return the revision value. */ public Long revision() { @@ -178,7 +198,7 @@ public Long revision() { /** * Set the revision property: NSX revision number. - * + * * @param revision the revision value to set. * @return the WorkloadNetworkDnsServiceInner object itself. */ @@ -192,7 +212,7 @@ public WorkloadNetworkDnsServiceInner withRevision(Long revision) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkDnsServiceProperties.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkDnsServiceProperties.java index 6561cce4f2736..30fe481d3079e 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkDnsServiceProperties.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkDnsServiceProperties.java @@ -11,7 +11,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** NSX DNS Service Properties. */ +/** + * NSX DNS Service Properties. + */ @Fluent public final class WorkloadNetworkDnsServiceProperties { /* @@ -62,13 +64,15 @@ public final class WorkloadNetworkDnsServiceProperties { @JsonProperty(value = "revision") private Long revision; - /** Creates an instance of WorkloadNetworkDnsServiceProperties class. */ + /** + * Creates an instance of WorkloadNetworkDnsServiceProperties class. + */ public WorkloadNetworkDnsServiceProperties() { } /** * Get the displayName property: Display name of the DNS Service. - * + * * @return the displayName value. */ public String displayName() { @@ -77,7 +81,7 @@ public String displayName() { /** * Set the displayName property: Display name of the DNS Service. - * + * * @param displayName the displayName value to set. * @return the WorkloadNetworkDnsServiceProperties object itself. */ @@ -88,7 +92,7 @@ public WorkloadNetworkDnsServiceProperties withDisplayName(String displayName) { /** * Get the dnsServiceIp property: DNS service IP of the DNS Service. - * + * * @return the dnsServiceIp value. */ public String dnsServiceIp() { @@ -97,7 +101,7 @@ public String dnsServiceIp() { /** * Set the dnsServiceIp property: DNS service IP of the DNS Service. - * + * * @param dnsServiceIp the dnsServiceIp value to set. * @return the WorkloadNetworkDnsServiceProperties object itself. */ @@ -108,7 +112,7 @@ public WorkloadNetworkDnsServiceProperties withDnsServiceIp(String dnsServiceIp) /** * Get the defaultDnsZone property: Default DNS zone of the DNS Service. - * + * * @return the defaultDnsZone value. */ public String defaultDnsZone() { @@ -117,7 +121,7 @@ public String defaultDnsZone() { /** * Set the defaultDnsZone property: Default DNS zone of the DNS Service. - * + * * @param defaultDnsZone the defaultDnsZone value to set. * @return the WorkloadNetworkDnsServiceProperties object itself. */ @@ -128,7 +132,7 @@ public WorkloadNetworkDnsServiceProperties withDefaultDnsZone(String defaultDnsZ /** * Get the fqdnZones property: FQDN zones of the DNS Service. - * + * * @return the fqdnZones value. */ public List fqdnZones() { @@ -137,7 +141,7 @@ public List fqdnZones() { /** * Set the fqdnZones property: FQDN zones of the DNS Service. - * + * * @param fqdnZones the fqdnZones value to set. * @return the WorkloadNetworkDnsServiceProperties object itself. */ @@ -148,7 +152,7 @@ public WorkloadNetworkDnsServiceProperties withFqdnZones(List fqdnZones) /** * Get the logLevel property: DNS Service log level. - * + * * @return the logLevel value. */ public DnsServiceLogLevelEnum logLevel() { @@ -157,7 +161,7 @@ public DnsServiceLogLevelEnum logLevel() { /** * Set the logLevel property: DNS Service log level. - * + * * @param logLevel the logLevel value to set. * @return the WorkloadNetworkDnsServiceProperties object itself. */ @@ -168,7 +172,7 @@ public WorkloadNetworkDnsServiceProperties withLogLevel(DnsServiceLogLevelEnum l /** * Get the status property: DNS Service status. - * + * * @return the status value. */ public DnsServiceStatusEnum status() { @@ -177,7 +181,7 @@ public DnsServiceStatusEnum status() { /** * Get the provisioningState property: The provisioning state. - * + * * @return the provisioningState value. */ public WorkloadNetworkDnsServiceProvisioningState provisioningState() { @@ -186,7 +190,7 @@ public WorkloadNetworkDnsServiceProvisioningState provisioningState() { /** * Get the revision property: NSX revision number. - * + * * @return the revision value. */ public Long revision() { @@ -195,7 +199,7 @@ public Long revision() { /** * Set the revision property: NSX revision number. - * + * * @param revision the revision value to set. * @return the WorkloadNetworkDnsServiceProperties object itself. */ @@ -206,7 +210,7 @@ public WorkloadNetworkDnsServiceProperties withRevision(Long revision) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkDnsZoneInner.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkDnsZoneInner.java index ae318d1635901..fc5f071cc91e8 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkDnsZoneInner.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkDnsZoneInner.java @@ -6,35 +6,55 @@ import com.azure.core.annotation.Fluent; import com.azure.core.management.ProxyResource; +import com.azure.core.management.SystemData; import com.azure.resourcemanager.avs.models.WorkloadNetworkDnsZoneProvisioningState; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** NSX DNS Zone. */ +/** + * NSX DNS Zone. + */ @Fluent public final class WorkloadNetworkDnsZoneInner extends ProxyResource { /* - * DNS Zone properties + * The resource-specific properties for this resource. */ @JsonProperty(value = "properties") private WorkloadNetworkDnsZoneProperties innerProperties; - /** Creates an instance of WorkloadNetworkDnsZoneInner class. */ + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) + private SystemData systemData; + + /** + * Creates an instance of WorkloadNetworkDnsZoneInner class. + */ public WorkloadNetworkDnsZoneInner() { } /** - * Get the innerProperties property: DNS Zone properties. - * + * Get the innerProperties property: The resource-specific properties for this resource. + * * @return the innerProperties value. */ private WorkloadNetworkDnsZoneProperties innerProperties() { return this.innerProperties; } + /** + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + /** * Get the displayName property: Display name of the DNS Zone. - * + * * @return the displayName value. */ public String displayName() { @@ -43,7 +63,7 @@ public String displayName() { /** * Set the displayName property: Display name of the DNS Zone. - * + * * @param displayName the displayName value to set. * @return the WorkloadNetworkDnsZoneInner object itself. */ @@ -57,7 +77,7 @@ public WorkloadNetworkDnsZoneInner withDisplayName(String displayName) { /** * Get the domain property: Domain names of the DNS Zone. - * + * * @return the domain value. */ public List domain() { @@ -66,7 +86,7 @@ public List domain() { /** * Set the domain property: Domain names of the DNS Zone. - * + * * @param domain the domain value to set. * @return the WorkloadNetworkDnsZoneInner object itself. */ @@ -80,7 +100,7 @@ public WorkloadNetworkDnsZoneInner withDomain(List domain) { /** * Get the dnsServerIps property: DNS Server IP array of the DNS Zone. - * + * * @return the dnsServerIps value. */ public List dnsServerIps() { @@ -89,7 +109,7 @@ public List dnsServerIps() { /** * Set the dnsServerIps property: DNS Server IP array of the DNS Zone. - * + * * @param dnsServerIps the dnsServerIps value to set. * @return the WorkloadNetworkDnsZoneInner object itself. */ @@ -103,7 +123,7 @@ public WorkloadNetworkDnsZoneInner withDnsServerIps(List dnsServerIps) { /** * Get the sourceIp property: Source IP of the DNS Zone. - * + * * @return the sourceIp value. */ public String sourceIp() { @@ -112,7 +132,7 @@ public String sourceIp() { /** * Set the sourceIp property: Source IP of the DNS Zone. - * + * * @param sourceIp the sourceIp value to set. * @return the WorkloadNetworkDnsZoneInner object itself. */ @@ -126,20 +146,20 @@ public WorkloadNetworkDnsZoneInner withSourceIp(String sourceIp) { /** * Get the dnsServices property: Number of DNS Services using the DNS zone. - * + * * @return the dnsServices value. */ - public Long dnsServices() { + public Integer dnsServices() { return this.innerProperties() == null ? null : this.innerProperties().dnsServices(); } /** * Set the dnsServices property: Number of DNS Services using the DNS zone. - * + * * @param dnsServices the dnsServices value to set. * @return the WorkloadNetworkDnsZoneInner object itself. */ - public WorkloadNetworkDnsZoneInner withDnsServices(Long dnsServices) { + public WorkloadNetworkDnsZoneInner withDnsServices(Integer dnsServices) { if (this.innerProperties() == null) { this.innerProperties = new WorkloadNetworkDnsZoneProperties(); } @@ -149,7 +169,7 @@ public WorkloadNetworkDnsZoneInner withDnsServices(Long dnsServices) { /** * Get the provisioningState property: The provisioning state. - * + * * @return the provisioningState value. */ public WorkloadNetworkDnsZoneProvisioningState provisioningState() { @@ -158,7 +178,7 @@ public WorkloadNetworkDnsZoneProvisioningState provisioningState() { /** * Get the revision property: NSX revision number. - * + * * @return the revision value. */ public Long revision() { @@ -167,7 +187,7 @@ public Long revision() { /** * Set the revision property: NSX revision number. - * + * * @param revision the revision value to set. * @return the WorkloadNetworkDnsZoneInner object itself. */ @@ -181,7 +201,7 @@ public WorkloadNetworkDnsZoneInner withRevision(Long revision) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkDnsZoneProperties.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkDnsZoneProperties.java index 4fe34edcf6698..cfe050c9144a3 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkDnsZoneProperties.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkDnsZoneProperties.java @@ -9,7 +9,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** NSX DNS Zone Properties. */ +/** + * NSX DNS Zone Properties. + */ @Fluent public final class WorkloadNetworkDnsZoneProperties { /* @@ -40,7 +42,7 @@ public final class WorkloadNetworkDnsZoneProperties { * Number of DNS Services using the DNS zone. */ @JsonProperty(value = "dnsServices") - private Long dnsServices; + private Integer dnsServices; /* * The provisioning state @@ -54,13 +56,15 @@ public final class WorkloadNetworkDnsZoneProperties { @JsonProperty(value = "revision") private Long revision; - /** Creates an instance of WorkloadNetworkDnsZoneProperties class. */ + /** + * Creates an instance of WorkloadNetworkDnsZoneProperties class. + */ public WorkloadNetworkDnsZoneProperties() { } /** * Get the displayName property: Display name of the DNS Zone. - * + * * @return the displayName value. */ public String displayName() { @@ -69,7 +73,7 @@ public String displayName() { /** * Set the displayName property: Display name of the DNS Zone. - * + * * @param displayName the displayName value to set. * @return the WorkloadNetworkDnsZoneProperties object itself. */ @@ -80,7 +84,7 @@ public WorkloadNetworkDnsZoneProperties withDisplayName(String displayName) { /** * Get the domain property: Domain names of the DNS Zone. - * + * * @return the domain value. */ public List domain() { @@ -89,7 +93,7 @@ public List domain() { /** * Set the domain property: Domain names of the DNS Zone. - * + * * @param domain the domain value to set. * @return the WorkloadNetworkDnsZoneProperties object itself. */ @@ -100,7 +104,7 @@ public WorkloadNetworkDnsZoneProperties withDomain(List domain) { /** * Get the dnsServerIps property: DNS Server IP array of the DNS Zone. - * + * * @return the dnsServerIps value. */ public List dnsServerIps() { @@ -109,7 +113,7 @@ public List dnsServerIps() { /** * Set the dnsServerIps property: DNS Server IP array of the DNS Zone. - * + * * @param dnsServerIps the dnsServerIps value to set. * @return the WorkloadNetworkDnsZoneProperties object itself. */ @@ -120,7 +124,7 @@ public WorkloadNetworkDnsZoneProperties withDnsServerIps(List dnsServerI /** * Get the sourceIp property: Source IP of the DNS Zone. - * + * * @return the sourceIp value. */ public String sourceIp() { @@ -129,7 +133,7 @@ public String sourceIp() { /** * Set the sourceIp property: Source IP of the DNS Zone. - * + * * @param sourceIp the sourceIp value to set. * @return the WorkloadNetworkDnsZoneProperties object itself. */ @@ -140,27 +144,27 @@ public WorkloadNetworkDnsZoneProperties withSourceIp(String sourceIp) { /** * Get the dnsServices property: Number of DNS Services using the DNS zone. - * + * * @return the dnsServices value. */ - public Long dnsServices() { + public Integer dnsServices() { return this.dnsServices; } /** * Set the dnsServices property: Number of DNS Services using the DNS zone. - * + * * @param dnsServices the dnsServices value to set. * @return the WorkloadNetworkDnsZoneProperties object itself. */ - public WorkloadNetworkDnsZoneProperties withDnsServices(Long dnsServices) { + public WorkloadNetworkDnsZoneProperties withDnsServices(Integer dnsServices) { this.dnsServices = dnsServices; return this; } /** * Get the provisioningState property: The provisioning state. - * + * * @return the provisioningState value. */ public WorkloadNetworkDnsZoneProvisioningState provisioningState() { @@ -169,7 +173,7 @@ public WorkloadNetworkDnsZoneProvisioningState provisioningState() { /** * Get the revision property: NSX revision number. - * + * * @return the revision value. */ public Long revision() { @@ -178,7 +182,7 @@ public Long revision() { /** * Set the revision property: NSX revision number. - * + * * @param revision the revision value to set. * @return the WorkloadNetworkDnsZoneProperties object itself. */ @@ -189,7 +193,7 @@ public WorkloadNetworkDnsZoneProperties withRevision(Long revision) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkGatewayInner.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkGatewayInner.java index 8058d5d6ae455..98bc0d4d0f6f7 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkGatewayInner.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkGatewayInner.java @@ -6,33 +6,63 @@ import com.azure.core.annotation.Fluent; import com.azure.core.management.ProxyResource; +import com.azure.core.management.SystemData; +import com.azure.resourcemanager.avs.models.WorkloadNetworkProvisioningState; import com.fasterxml.jackson.annotation.JsonProperty; -/** NSX Gateway. */ +/** + * NSX Gateway. + */ @Fluent public final class WorkloadNetworkGatewayInner extends ProxyResource { /* - * Gateway properties. + * The resource-specific properties for this resource. */ @JsonProperty(value = "properties") private WorkloadNetworkGatewayProperties innerProperties; - /** Creates an instance of WorkloadNetworkGatewayInner class. */ + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) + private SystemData systemData; + + /** + * Creates an instance of WorkloadNetworkGatewayInner class. + */ public WorkloadNetworkGatewayInner() { } /** - * Get the innerProperties property: Gateway properties. - * + * Get the innerProperties property: The resource-specific properties for this resource. + * * @return the innerProperties value. */ private WorkloadNetworkGatewayProperties innerProperties() { return this.innerProperties; } + /** + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + + /** + * Get the provisioningState property: The provisioning state of the resource. + * + * @return the provisioningState value. + */ + public WorkloadNetworkProvisioningState provisioningState() { + return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); + } + /** * Get the displayName property: Display name of the DHCP entity. - * + * * @return the displayName value. */ public String displayName() { @@ -41,7 +71,7 @@ public String displayName() { /** * Set the displayName property: Display name of the DHCP entity. - * + * * @param displayName the displayName value to set. * @return the WorkloadNetworkGatewayInner object itself. */ @@ -55,7 +85,7 @@ public WorkloadNetworkGatewayInner withDisplayName(String displayName) { /** * Get the path property: NSX Gateway Path. - * + * * @return the path value. */ public String path() { @@ -64,7 +94,7 @@ public String path() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkGatewayProperties.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkGatewayProperties.java index de6654a61cbfa..5a3b3d589ab03 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkGatewayProperties.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkGatewayProperties.java @@ -5,11 +5,20 @@ package com.azure.resourcemanager.avs.fluent.models; import com.azure.core.annotation.Fluent; +import com.azure.resourcemanager.avs.models.WorkloadNetworkProvisioningState; import com.fasterxml.jackson.annotation.JsonProperty; -/** Properties of a NSX Gateway. */ +/** + * Properties of a NSX Gateway. + */ @Fluent public final class WorkloadNetworkGatewayProperties { + /* + * The provisioning state of the resource. + */ + @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private WorkloadNetworkProvisioningState provisioningState; + /* * Display name of the DHCP entity. */ @@ -22,13 +31,24 @@ public final class WorkloadNetworkGatewayProperties { @JsonProperty(value = "path", access = JsonProperty.Access.WRITE_ONLY) private String path; - /** Creates an instance of WorkloadNetworkGatewayProperties class. */ + /** + * Creates an instance of WorkloadNetworkGatewayProperties class. + */ public WorkloadNetworkGatewayProperties() { } + /** + * Get the provisioningState property: The provisioning state of the resource. + * + * @return the provisioningState value. + */ + public WorkloadNetworkProvisioningState provisioningState() { + return this.provisioningState; + } + /** * Get the displayName property: Display name of the DHCP entity. - * + * * @return the displayName value. */ public String displayName() { @@ -37,7 +57,7 @@ public String displayName() { /** * Set the displayName property: Display name of the DHCP entity. - * + * * @param displayName the displayName value to set. * @return the WorkloadNetworkGatewayProperties object itself. */ @@ -48,7 +68,7 @@ public WorkloadNetworkGatewayProperties withDisplayName(String displayName) { /** * Get the path property: NSX Gateway Path. - * + * * @return the path value. */ public String path() { @@ -57,7 +77,7 @@ public String path() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkInner.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkInner.java index 124c2f72d258c..a86b491d384d1 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkInner.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkInner.java @@ -6,19 +6,68 @@ import com.azure.core.annotation.Immutable; import com.azure.core.management.ProxyResource; +import com.azure.core.management.SystemData; +import com.azure.resourcemanager.avs.models.WorkloadNetworkProvisioningState; +import com.fasterxml.jackson.annotation.JsonProperty; -/** Workload Network. */ +/** + * Workload Network. + */ @Immutable public final class WorkloadNetworkInner extends ProxyResource { - /** Creates an instance of WorkloadNetworkInner class. */ + /* + * The resource-specific properties for this resource. + */ + @JsonProperty(value = "properties") + private WorkloadNetworkProperties innerProperties; + + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) + private SystemData systemData; + + /** + * Creates an instance of WorkloadNetworkInner class. + */ public WorkloadNetworkInner() { } + /** + * Get the innerProperties property: The resource-specific properties for this resource. + * + * @return the innerProperties value. + */ + private WorkloadNetworkProperties innerProperties() { + return this.innerProperties; + } + + /** + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + + /** + * Get the provisioningState property: The provisioning state of the resource. + * + * @return the provisioningState value. + */ + public WorkloadNetworkProvisioningState provisioningState() { + return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); + } + /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { + if (innerProperties() != null) { + innerProperties().validate(); + } } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkPortMirroringInner.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkPortMirroringInner.java index 6d2b0944985b0..784ea103f1582 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkPortMirroringInner.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkPortMirroringInner.java @@ -6,36 +6,56 @@ import com.azure.core.annotation.Fluent; import com.azure.core.management.ProxyResource; +import com.azure.core.management.SystemData; import com.azure.resourcemanager.avs.models.PortMirroringDirectionEnum; import com.azure.resourcemanager.avs.models.PortMirroringStatusEnum; import com.azure.resourcemanager.avs.models.WorkloadNetworkPortMirroringProvisioningState; import com.fasterxml.jackson.annotation.JsonProperty; -/** NSX Port Mirroring. */ +/** + * NSX Port Mirroring. + */ @Fluent public final class WorkloadNetworkPortMirroringInner extends ProxyResource { /* - * Port Mirroring Properties. + * The resource-specific properties for this resource. */ @JsonProperty(value = "properties") private WorkloadNetworkPortMirroringProperties innerProperties; - /** Creates an instance of WorkloadNetworkPortMirroringInner class. */ + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) + private SystemData systemData; + + /** + * Creates an instance of WorkloadNetworkPortMirroringInner class. + */ public WorkloadNetworkPortMirroringInner() { } /** - * Get the innerProperties property: Port Mirroring Properties. - * + * Get the innerProperties property: The resource-specific properties for this resource. + * * @return the innerProperties value. */ private WorkloadNetworkPortMirroringProperties innerProperties() { return this.innerProperties; } + /** + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + /** * Get the displayName property: Display name of the port mirroring profile. - * + * * @return the displayName value. */ public String displayName() { @@ -44,7 +64,7 @@ public String displayName() { /** * Set the displayName property: Display name of the port mirroring profile. - * + * * @param displayName the displayName value to set. * @return the WorkloadNetworkPortMirroringInner object itself. */ @@ -58,7 +78,7 @@ public WorkloadNetworkPortMirroringInner withDisplayName(String displayName) { /** * Get the direction property: Direction of port mirroring profile. - * + * * @return the direction value. */ public PortMirroringDirectionEnum direction() { @@ -67,7 +87,7 @@ public PortMirroringDirectionEnum direction() { /** * Set the direction property: Direction of port mirroring profile. - * + * * @param direction the direction value to set. * @return the WorkloadNetworkPortMirroringInner object itself. */ @@ -81,7 +101,7 @@ public WorkloadNetworkPortMirroringInner withDirection(PortMirroringDirectionEnu /** * Get the source property: Source VM Group. - * + * * @return the source value. */ public String source() { @@ -90,7 +110,7 @@ public String source() { /** * Set the source property: Source VM Group. - * + * * @param source the source value to set. * @return the WorkloadNetworkPortMirroringInner object itself. */ @@ -104,7 +124,7 @@ public WorkloadNetworkPortMirroringInner withSource(String source) { /** * Get the destination property: Destination VM Group. - * + * * @return the destination value. */ public String destination() { @@ -113,7 +133,7 @@ public String destination() { /** * Set the destination property: Destination VM Group. - * + * * @param destination the destination value to set. * @return the WorkloadNetworkPortMirroringInner object itself. */ @@ -127,7 +147,7 @@ public WorkloadNetworkPortMirroringInner withDestination(String destination) { /** * Get the status property: Port Mirroring Status. - * + * * @return the status value. */ public PortMirroringStatusEnum status() { @@ -136,7 +156,7 @@ public PortMirroringStatusEnum status() { /** * Get the provisioningState property: The provisioning state. - * + * * @return the provisioningState value. */ public WorkloadNetworkPortMirroringProvisioningState provisioningState() { @@ -145,7 +165,7 @@ public WorkloadNetworkPortMirroringProvisioningState provisioningState() { /** * Get the revision property: NSX revision number. - * + * * @return the revision value. */ public Long revision() { @@ -154,7 +174,7 @@ public Long revision() { /** * Set the revision property: NSX revision number. - * + * * @param revision the revision value to set. * @return the WorkloadNetworkPortMirroringInner object itself. */ @@ -168,7 +188,7 @@ public WorkloadNetworkPortMirroringInner withRevision(Long revision) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkPortMirroringProperties.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkPortMirroringProperties.java index 1c200f9e0c752..a55ef00f2a5ad 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkPortMirroringProperties.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkPortMirroringProperties.java @@ -10,7 +10,9 @@ import com.azure.resourcemanager.avs.models.WorkloadNetworkPortMirroringProvisioningState; import com.fasterxml.jackson.annotation.JsonProperty; -/** NSX Port Mirroring Properties. */ +/** + * NSX Port Mirroring Properties. + */ @Fluent public final class WorkloadNetworkPortMirroringProperties { /* @@ -55,13 +57,15 @@ public final class WorkloadNetworkPortMirroringProperties { @JsonProperty(value = "revision") private Long revision; - /** Creates an instance of WorkloadNetworkPortMirroringProperties class. */ + /** + * Creates an instance of WorkloadNetworkPortMirroringProperties class. + */ public WorkloadNetworkPortMirroringProperties() { } /** * Get the displayName property: Display name of the port mirroring profile. - * + * * @return the displayName value. */ public String displayName() { @@ -70,7 +74,7 @@ public String displayName() { /** * Set the displayName property: Display name of the port mirroring profile. - * + * * @param displayName the displayName value to set. * @return the WorkloadNetworkPortMirroringProperties object itself. */ @@ -81,7 +85,7 @@ public WorkloadNetworkPortMirroringProperties withDisplayName(String displayName /** * Get the direction property: Direction of port mirroring profile. - * + * * @return the direction value. */ public PortMirroringDirectionEnum direction() { @@ -90,7 +94,7 @@ public PortMirroringDirectionEnum direction() { /** * Set the direction property: Direction of port mirroring profile. - * + * * @param direction the direction value to set. * @return the WorkloadNetworkPortMirroringProperties object itself. */ @@ -101,7 +105,7 @@ public WorkloadNetworkPortMirroringProperties withDirection(PortMirroringDirecti /** * Get the source property: Source VM Group. - * + * * @return the source value. */ public String source() { @@ -110,7 +114,7 @@ public String source() { /** * Set the source property: Source VM Group. - * + * * @param source the source value to set. * @return the WorkloadNetworkPortMirroringProperties object itself. */ @@ -121,7 +125,7 @@ public WorkloadNetworkPortMirroringProperties withSource(String source) { /** * Get the destination property: Destination VM Group. - * + * * @return the destination value. */ public String destination() { @@ -130,7 +134,7 @@ public String destination() { /** * Set the destination property: Destination VM Group. - * + * * @param destination the destination value to set. * @return the WorkloadNetworkPortMirroringProperties object itself. */ @@ -141,7 +145,7 @@ public WorkloadNetworkPortMirroringProperties withDestination(String destination /** * Get the status property: Port Mirroring Status. - * + * * @return the status value. */ public PortMirroringStatusEnum status() { @@ -150,7 +154,7 @@ public PortMirroringStatusEnum status() { /** * Get the provisioningState property: The provisioning state. - * + * * @return the provisioningState value. */ public WorkloadNetworkPortMirroringProvisioningState provisioningState() { @@ -159,7 +163,7 @@ public WorkloadNetworkPortMirroringProvisioningState provisioningState() { /** * Get the revision property: NSX revision number. - * + * * @return the revision value. */ public Long revision() { @@ -168,7 +172,7 @@ public Long revision() { /** * Set the revision property: NSX revision number. - * + * * @param revision the revision value to set. * @return the WorkloadNetworkPortMirroringProperties object itself. */ @@ -179,7 +183,7 @@ public WorkloadNetworkPortMirroringProperties withRevision(Long revision) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkProperties.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkProperties.java new file mode 100644 index 0000000000000..1f9e20e991f7d --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkProperties.java @@ -0,0 +1,44 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.avs.fluent.models; + +import com.azure.core.annotation.Immutable; +import com.azure.resourcemanager.avs.models.WorkloadNetworkProvisioningState; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The properties of a workload network. + */ +@Immutable +public final class WorkloadNetworkProperties { + /* + * The provisioning state of the resource. + */ + @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private WorkloadNetworkProvisioningState provisioningState; + + /** + * Creates an instance of WorkloadNetworkProperties class. + */ + public WorkloadNetworkProperties() { + } + + /** + * Get the provisioningState property: The provisioning state of the resource. + * + * @return the provisioningState value. + */ + public WorkloadNetworkProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkPublicIpInner.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkPublicIpInner.java index 63ae633dbfed4..d06efd343e274 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkPublicIpInner.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkPublicIpInner.java @@ -6,34 +6,54 @@ import com.azure.core.annotation.Fluent; import com.azure.core.management.ProxyResource; +import com.azure.core.management.SystemData; import com.azure.resourcemanager.avs.models.WorkloadNetworkPublicIpProvisioningState; import com.fasterxml.jackson.annotation.JsonProperty; -/** NSX Public IP Block. */ +/** + * NSX Public IP Block. + */ @Fluent public final class WorkloadNetworkPublicIpInner extends ProxyResource { /* - * Public IP Block properties + * The resource-specific properties for this resource. */ @JsonProperty(value = "properties") private WorkloadNetworkPublicIpProperties innerProperties; - /** Creates an instance of WorkloadNetworkPublicIpInner class. */ + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) + private SystemData systemData; + + /** + * Creates an instance of WorkloadNetworkPublicIpInner class. + */ public WorkloadNetworkPublicIpInner() { } /** - * Get the innerProperties property: Public IP Block properties. - * + * Get the innerProperties property: The resource-specific properties for this resource. + * * @return the innerProperties value. */ private WorkloadNetworkPublicIpProperties innerProperties() { return this.innerProperties; } + /** + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + /** * Get the displayName property: Display name of the Public IP Block. - * + * * @return the displayName value. */ public String displayName() { @@ -42,7 +62,7 @@ public String displayName() { /** * Set the displayName property: Display name of the Public IP Block. - * + * * @param displayName the displayName value to set. * @return the WorkloadNetworkPublicIpInner object itself. */ @@ -56,7 +76,7 @@ public WorkloadNetworkPublicIpInner withDisplayName(String displayName) { /** * Get the numberOfPublicIPs property: Number of Public IPs requested. - * + * * @return the numberOfPublicIPs value. */ public Long numberOfPublicIPs() { @@ -65,7 +85,7 @@ public Long numberOfPublicIPs() { /** * Set the numberOfPublicIPs property: Number of Public IPs requested. - * + * * @param numberOfPublicIPs the numberOfPublicIPs value to set. * @return the WorkloadNetworkPublicIpInner object itself. */ @@ -79,7 +99,7 @@ public WorkloadNetworkPublicIpInner withNumberOfPublicIPs(Long numberOfPublicIPs /** * Get the publicIpBlock property: CIDR Block of the Public IP Block. - * + * * @return the publicIpBlock value. */ public String publicIpBlock() { @@ -88,7 +108,7 @@ public String publicIpBlock() { /** * Get the provisioningState property: The provisioning state. - * + * * @return the provisioningState value. */ public WorkloadNetworkPublicIpProvisioningState provisioningState() { @@ -97,7 +117,7 @@ public WorkloadNetworkPublicIpProvisioningState provisioningState() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkPublicIpProperties.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkPublicIpProperties.java index eb0048ccb84d1..35576859f41b6 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkPublicIpProperties.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkPublicIpProperties.java @@ -8,7 +8,9 @@ import com.azure.resourcemanager.avs.models.WorkloadNetworkPublicIpProvisioningState; import com.fasterxml.jackson.annotation.JsonProperty; -/** NSX Public IP Block Properties. */ +/** + * NSX Public IP Block Properties. + */ @Fluent public final class WorkloadNetworkPublicIpProperties { /* @@ -35,13 +37,15 @@ public final class WorkloadNetworkPublicIpProperties { @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) private WorkloadNetworkPublicIpProvisioningState provisioningState; - /** Creates an instance of WorkloadNetworkPublicIpProperties class. */ + /** + * Creates an instance of WorkloadNetworkPublicIpProperties class. + */ public WorkloadNetworkPublicIpProperties() { } /** * Get the displayName property: Display name of the Public IP Block. - * + * * @return the displayName value. */ public String displayName() { @@ -50,7 +54,7 @@ public String displayName() { /** * Set the displayName property: Display name of the Public IP Block. - * + * * @param displayName the displayName value to set. * @return the WorkloadNetworkPublicIpProperties object itself. */ @@ -61,7 +65,7 @@ public WorkloadNetworkPublicIpProperties withDisplayName(String displayName) { /** * Get the numberOfPublicIPs property: Number of Public IPs requested. - * + * * @return the numberOfPublicIPs value. */ public Long numberOfPublicIPs() { @@ -70,7 +74,7 @@ public Long numberOfPublicIPs() { /** * Set the numberOfPublicIPs property: Number of Public IPs requested. - * + * * @param numberOfPublicIPs the numberOfPublicIPs value to set. * @return the WorkloadNetworkPublicIpProperties object itself. */ @@ -81,7 +85,7 @@ public WorkloadNetworkPublicIpProperties withNumberOfPublicIPs(Long numberOfPubl /** * Get the publicIpBlock property: CIDR Block of the Public IP Block. - * + * * @return the publicIpBlock value. */ public String publicIpBlock() { @@ -90,7 +94,7 @@ public String publicIpBlock() { /** * Get the provisioningState property: The provisioning state. - * + * * @return the provisioningState value. */ public WorkloadNetworkPublicIpProvisioningState provisioningState() { @@ -99,7 +103,7 @@ public WorkloadNetworkPublicIpProvisioningState provisioningState() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkSegmentInner.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkSegmentInner.java index e21afbe563835..476812e53bdd8 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkSegmentInner.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkSegmentInner.java @@ -6,6 +6,7 @@ import com.azure.core.annotation.Fluent; import com.azure.core.management.ProxyResource; +import com.azure.core.management.SystemData; import com.azure.resourcemanager.avs.models.SegmentStatusEnum; import com.azure.resourcemanager.avs.models.WorkloadNetworkSegmentPortVif; import com.azure.resourcemanager.avs.models.WorkloadNetworkSegmentProvisioningState; @@ -13,31 +14,50 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** NSX Segment. */ +/** + * NSX Segment. + */ @Fluent public final class WorkloadNetworkSegmentInner extends ProxyResource { /* - * The properties of a Workload Segment proxy resource. + * The resource-specific properties for this resource. */ @JsonProperty(value = "properties") private WorkloadNetworkSegmentProperties innerProperties; - /** Creates an instance of WorkloadNetworkSegmentInner class. */ + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) + private SystemData systemData; + + /** + * Creates an instance of WorkloadNetworkSegmentInner class. + */ public WorkloadNetworkSegmentInner() { } /** - * Get the innerProperties property: The properties of a Workload Segment proxy resource. - * + * Get the innerProperties property: The resource-specific properties for this resource. + * * @return the innerProperties value. */ private WorkloadNetworkSegmentProperties innerProperties() { return this.innerProperties; } + /** + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + /** * Get the displayName property: Display name of the segment. - * + * * @return the displayName value. */ public String displayName() { @@ -46,7 +66,7 @@ public String displayName() { /** * Set the displayName property: Display name of the segment. - * + * * @param displayName the displayName value to set. * @return the WorkloadNetworkSegmentInner object itself. */ @@ -60,7 +80,7 @@ public WorkloadNetworkSegmentInner withDisplayName(String displayName) { /** * Get the connectedGateway property: Gateway which to connect segment to. - * + * * @return the connectedGateway value. */ public String connectedGateway() { @@ -69,7 +89,7 @@ public String connectedGateway() { /** * Set the connectedGateway property: Gateway which to connect segment to. - * + * * @param connectedGateway the connectedGateway value to set. * @return the WorkloadNetworkSegmentInner object itself. */ @@ -83,7 +103,7 @@ public WorkloadNetworkSegmentInner withConnectedGateway(String connectedGateway) /** * Get the subnet property: Subnet which to connect segment to. - * + * * @return the subnet value. */ public WorkloadNetworkSegmentSubnet subnet() { @@ -92,7 +112,7 @@ public WorkloadNetworkSegmentSubnet subnet() { /** * Set the subnet property: Subnet which to connect segment to. - * + * * @param subnet the subnet value to set. * @return the WorkloadNetworkSegmentInner object itself. */ @@ -106,7 +126,7 @@ public WorkloadNetworkSegmentInner withSubnet(WorkloadNetworkSegmentSubnet subne /** * Get the portVif property: Port Vif which segment is associated with. - * + * * @return the portVif value. */ public List portVif() { @@ -115,7 +135,7 @@ public List portVif() { /** * Get the status property: Segment status. - * + * * @return the status value. */ public SegmentStatusEnum status() { @@ -124,7 +144,7 @@ public SegmentStatusEnum status() { /** * Get the provisioningState property: The provisioning state. - * + * * @return the provisioningState value. */ public WorkloadNetworkSegmentProvisioningState provisioningState() { @@ -133,7 +153,7 @@ public WorkloadNetworkSegmentProvisioningState provisioningState() { /** * Get the revision property: NSX revision number. - * + * * @return the revision value. */ public Long revision() { @@ -142,7 +162,7 @@ public Long revision() { /** * Set the revision property: NSX revision number. - * + * * @param revision the revision value to set. * @return the WorkloadNetworkSegmentInner object itself. */ @@ -156,7 +176,7 @@ public WorkloadNetworkSegmentInner withRevision(Long revision) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkSegmentProperties.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkSegmentProperties.java index 56f1eff1540da..7eba916a747d7 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkSegmentProperties.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkSegmentProperties.java @@ -12,7 +12,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** NSX Segment Properties. */ +/** + * NSX Segment Properties. + */ @Fluent public final class WorkloadNetworkSegmentProperties { /* @@ -57,13 +59,15 @@ public final class WorkloadNetworkSegmentProperties { @JsonProperty(value = "revision") private Long revision; - /** Creates an instance of WorkloadNetworkSegmentProperties class. */ + /** + * Creates an instance of WorkloadNetworkSegmentProperties class. + */ public WorkloadNetworkSegmentProperties() { } /** * Get the displayName property: Display name of the segment. - * + * * @return the displayName value. */ public String displayName() { @@ -72,7 +76,7 @@ public String displayName() { /** * Set the displayName property: Display name of the segment. - * + * * @param displayName the displayName value to set. * @return the WorkloadNetworkSegmentProperties object itself. */ @@ -83,7 +87,7 @@ public WorkloadNetworkSegmentProperties withDisplayName(String displayName) { /** * Get the connectedGateway property: Gateway which to connect segment to. - * + * * @return the connectedGateway value. */ public String connectedGateway() { @@ -92,7 +96,7 @@ public String connectedGateway() { /** * Set the connectedGateway property: Gateway which to connect segment to. - * + * * @param connectedGateway the connectedGateway value to set. * @return the WorkloadNetworkSegmentProperties object itself. */ @@ -103,7 +107,7 @@ public WorkloadNetworkSegmentProperties withConnectedGateway(String connectedGat /** * Get the subnet property: Subnet which to connect segment to. - * + * * @return the subnet value. */ public WorkloadNetworkSegmentSubnet subnet() { @@ -112,7 +116,7 @@ public WorkloadNetworkSegmentSubnet subnet() { /** * Set the subnet property: Subnet which to connect segment to. - * + * * @param subnet the subnet value to set. * @return the WorkloadNetworkSegmentProperties object itself. */ @@ -123,7 +127,7 @@ public WorkloadNetworkSegmentProperties withSubnet(WorkloadNetworkSegmentSubnet /** * Get the portVif property: Port Vif which segment is associated with. - * + * * @return the portVif value. */ public List portVif() { @@ -132,7 +136,7 @@ public List portVif() { /** * Get the status property: Segment status. - * + * * @return the status value. */ public SegmentStatusEnum status() { @@ -141,7 +145,7 @@ public SegmentStatusEnum status() { /** * Get the provisioningState property: The provisioning state. - * + * * @return the provisioningState value. */ public WorkloadNetworkSegmentProvisioningState provisioningState() { @@ -150,7 +154,7 @@ public WorkloadNetworkSegmentProvisioningState provisioningState() { /** * Get the revision property: NSX revision number. - * + * * @return the revision value. */ public Long revision() { @@ -159,7 +163,7 @@ public Long revision() { /** * Set the revision property: NSX revision number. - * + * * @param revision the revision value to set. * @return the WorkloadNetworkSegmentProperties object itself. */ @@ -170,7 +174,7 @@ public WorkloadNetworkSegmentProperties withRevision(Long revision) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkVMGroupInner.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkVMGroupInner.java index 80738f36409aa..f35c5b21ac7ed 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkVMGroupInner.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkVMGroupInner.java @@ -6,36 +6,56 @@ import com.azure.core.annotation.Fluent; import com.azure.core.management.ProxyResource; +import com.azure.core.management.SystemData; import com.azure.resourcemanager.avs.models.VMGroupStatusEnum; import com.azure.resourcemanager.avs.models.WorkloadNetworkVMGroupProvisioningState; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** NSX VM Group. */ +/** + * NSX VM Group. + */ @Fluent public final class WorkloadNetworkVMGroupInner extends ProxyResource { /* - * VM Group properties. + * The resource-specific properties for this resource. */ @JsonProperty(value = "properties") private WorkloadNetworkVMGroupProperties innerProperties; - /** Creates an instance of WorkloadNetworkVMGroupInner class. */ + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) + private SystemData systemData; + + /** + * Creates an instance of WorkloadNetworkVMGroupInner class. + */ public WorkloadNetworkVMGroupInner() { } /** - * Get the innerProperties property: VM Group properties. - * + * Get the innerProperties property: The resource-specific properties for this resource. + * * @return the innerProperties value. */ private WorkloadNetworkVMGroupProperties innerProperties() { return this.innerProperties; } + /** + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + /** * Get the displayName property: Display name of the VM group. - * + * * @return the displayName value. */ public String displayName() { @@ -44,7 +64,7 @@ public String displayName() { /** * Set the displayName property: Display name of the VM group. - * + * * @param displayName the displayName value to set. * @return the WorkloadNetworkVMGroupInner object itself. */ @@ -58,7 +78,7 @@ public WorkloadNetworkVMGroupInner withDisplayName(String displayName) { /** * Get the members property: Virtual machine members of this group. - * + * * @return the members value. */ public List members() { @@ -67,7 +87,7 @@ public List members() { /** * Set the members property: Virtual machine members of this group. - * + * * @param members the members value to set. * @return the WorkloadNetworkVMGroupInner object itself. */ @@ -81,7 +101,7 @@ public WorkloadNetworkVMGroupInner withMembers(List members) { /** * Get the status property: VM Group status. - * + * * @return the status value. */ public VMGroupStatusEnum status() { @@ -90,7 +110,7 @@ public VMGroupStatusEnum status() { /** * Get the provisioningState property: The provisioning state. - * + * * @return the provisioningState value. */ public WorkloadNetworkVMGroupProvisioningState provisioningState() { @@ -99,7 +119,7 @@ public WorkloadNetworkVMGroupProvisioningState provisioningState() { /** * Get the revision property: NSX revision number. - * + * * @return the revision value. */ public Long revision() { @@ -108,7 +128,7 @@ public Long revision() { /** * Set the revision property: NSX revision number. - * + * * @param revision the revision value to set. * @return the WorkloadNetworkVMGroupInner object itself. */ @@ -122,7 +142,7 @@ public WorkloadNetworkVMGroupInner withRevision(Long revision) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkVMGroupProperties.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkVMGroupProperties.java index 9fa3a5c50ceb3..b25982c4160bb 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkVMGroupProperties.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkVMGroupProperties.java @@ -10,7 +10,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** NSX VM Group Properties. */ +/** + * NSX VM Group Properties. + */ @Fluent public final class WorkloadNetworkVMGroupProperties { /* @@ -43,13 +45,15 @@ public final class WorkloadNetworkVMGroupProperties { @JsonProperty(value = "revision") private Long revision; - /** Creates an instance of WorkloadNetworkVMGroupProperties class. */ + /** + * Creates an instance of WorkloadNetworkVMGroupProperties class. + */ public WorkloadNetworkVMGroupProperties() { } /** * Get the displayName property: Display name of the VM group. - * + * * @return the displayName value. */ public String displayName() { @@ -58,7 +62,7 @@ public String displayName() { /** * Set the displayName property: Display name of the VM group. - * + * * @param displayName the displayName value to set. * @return the WorkloadNetworkVMGroupProperties object itself. */ @@ -69,7 +73,7 @@ public WorkloadNetworkVMGroupProperties withDisplayName(String displayName) { /** * Get the members property: Virtual machine members of this group. - * + * * @return the members value. */ public List members() { @@ -78,7 +82,7 @@ public List members() { /** * Set the members property: Virtual machine members of this group. - * + * * @param members the members value to set. * @return the WorkloadNetworkVMGroupProperties object itself. */ @@ -89,7 +93,7 @@ public WorkloadNetworkVMGroupProperties withMembers(List members) { /** * Get the status property: VM Group status. - * + * * @return the status value. */ public VMGroupStatusEnum status() { @@ -98,7 +102,7 @@ public VMGroupStatusEnum status() { /** * Get the provisioningState property: The provisioning state. - * + * * @return the provisioningState value. */ public WorkloadNetworkVMGroupProvisioningState provisioningState() { @@ -107,7 +111,7 @@ public WorkloadNetworkVMGroupProvisioningState provisioningState() { /** * Get the revision property: NSX revision number. - * + * * @return the revision value. */ public Long revision() { @@ -116,7 +120,7 @@ public Long revision() { /** * Set the revision property: NSX revision number. - * + * * @param revision the revision value to set. * @return the WorkloadNetworkVMGroupProperties object itself. */ @@ -127,7 +131,7 @@ public WorkloadNetworkVMGroupProperties withRevision(Long revision) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkVirtualMachineInner.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkVirtualMachineInner.java index 64345cd8fe866..40329b7d5c7a7 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkVirtualMachineInner.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkVirtualMachineInner.java @@ -6,34 +6,64 @@ import com.azure.core.annotation.Fluent; import com.azure.core.management.ProxyResource; +import com.azure.core.management.SystemData; import com.azure.resourcemanager.avs.models.VMTypeEnum; +import com.azure.resourcemanager.avs.models.WorkloadNetworkProvisioningState; import com.fasterxml.jackson.annotation.JsonProperty; -/** NSX Virtual Machine. */ +/** + * NSX Virtual Machine. + */ @Fluent public final class WorkloadNetworkVirtualMachineInner extends ProxyResource { /* - * Virtual machine properties. + * The resource-specific properties for this resource. */ @JsonProperty(value = "properties") private WorkloadNetworkVirtualMachineProperties innerProperties; - /** Creates an instance of WorkloadNetworkVirtualMachineInner class. */ + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) + private SystemData systemData; + + /** + * Creates an instance of WorkloadNetworkVirtualMachineInner class. + */ public WorkloadNetworkVirtualMachineInner() { } /** - * Get the innerProperties property: Virtual machine properties. - * + * Get the innerProperties property: The resource-specific properties for this resource. + * * @return the innerProperties value. */ private WorkloadNetworkVirtualMachineProperties innerProperties() { return this.innerProperties; } + /** + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + + /** + * Get the provisioningState property: The provisioning state of the resource. + * + * @return the provisioningState value. + */ + public WorkloadNetworkProvisioningState provisioningState() { + return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); + } + /** * Get the displayName property: Display name of the VM. - * + * * @return the displayName value. */ public String displayName() { @@ -42,7 +72,7 @@ public String displayName() { /** * Set the displayName property: Display name of the VM. - * + * * @param displayName the displayName value to set. * @return the WorkloadNetworkVirtualMachineInner object itself. */ @@ -56,7 +86,7 @@ public WorkloadNetworkVirtualMachineInner withDisplayName(String displayName) { /** * Get the vmType property: Virtual machine type. - * + * * @return the vmType value. */ public VMTypeEnum vmType() { @@ -65,7 +95,7 @@ public VMTypeEnum vmType() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkVirtualMachineProperties.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkVirtualMachineProperties.java index b465ca3e4116e..6bfe0f6d4a87e 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkVirtualMachineProperties.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/WorkloadNetworkVirtualMachineProperties.java @@ -6,11 +6,20 @@ import com.azure.core.annotation.Fluent; import com.azure.resourcemanager.avs.models.VMTypeEnum; +import com.azure.resourcemanager.avs.models.WorkloadNetworkProvisioningState; import com.fasterxml.jackson.annotation.JsonProperty; -/** NSX Virtual Machine Properties. */ +/** + * NSX Virtual Machine Properties. + */ @Fluent public final class WorkloadNetworkVirtualMachineProperties { + /* + * The provisioning state of the resource. + */ + @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private WorkloadNetworkProvisioningState provisioningState; + /* * Display name of the VM. */ @@ -23,13 +32,24 @@ public final class WorkloadNetworkVirtualMachineProperties { @JsonProperty(value = "vmType", access = JsonProperty.Access.WRITE_ONLY) private VMTypeEnum vmType; - /** Creates an instance of WorkloadNetworkVirtualMachineProperties class. */ + /** + * Creates an instance of WorkloadNetworkVirtualMachineProperties class. + */ public WorkloadNetworkVirtualMachineProperties() { } + /** + * Get the provisioningState property: The provisioning state of the resource. + * + * @return the provisioningState value. + */ + public WorkloadNetworkProvisioningState provisioningState() { + return this.provisioningState; + } + /** * Get the displayName property: Display name of the VM. - * + * * @return the displayName value. */ public String displayName() { @@ -38,7 +58,7 @@ public String displayName() { /** * Set the displayName property: Display name of the VM. - * + * * @param displayName the displayName value to set. * @return the WorkloadNetworkVirtualMachineProperties object itself. */ @@ -49,7 +69,7 @@ public WorkloadNetworkVirtualMachineProperties withDisplayName(String displayNam /** * Get the vmType property: Virtual machine type. - * + * * @return the vmType value. */ public VMTypeEnum vmType() { @@ -58,7 +78,7 @@ public VMTypeEnum vmType() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/package-info.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/package-info.java index 21b999ee064bf..e4db28356c768 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/package-info.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/package-info.java @@ -2,5 +2,8 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -/** Package containing the inner data models for AvsClient. Azure VMware Solution API. */ +/** + * Package containing the inner data models for AvsClient. + * Azure VMware Solution API. + */ package com.azure.resourcemanager.avs.fluent.models; diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/package-info.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/package-info.java index 7be76d283ea08..8b4c79e239263 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/package-info.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/package-info.java @@ -2,5 +2,8 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -/** Package containing the service clients for AvsClient. Azure VMware Solution API. */ +/** + * Package containing the service clients for AvsClient. + * Azure VMware Solution API. + */ package com.azure.resourcemanager.avs.fluent; diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/AddonImpl.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/AddonImpl.java index c5a445f43318d..f30d35e0f9237 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/AddonImpl.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/AddonImpl.java @@ -4,6 +4,7 @@ package com.azure.resourcemanager.avs.implementation; +import com.azure.core.management.SystemData; import com.azure.core.util.Context; import com.azure.resourcemanager.avs.fluent.models.AddonInner; import com.azure.resourcemanager.avs.models.Addon; @@ -30,6 +31,10 @@ public AddonProperties properties() { return this.innerModel().properties(); } + public SystemData systemData() { + return this.innerModel().systemData(); + } + public String resourceGroupName() { return resourceGroupName; } @@ -55,20 +60,14 @@ public AddonImpl withExistingPrivateCloud(String resourceGroupName, String priva } public Addon create() { - this.innerObject = - serviceManager - .serviceClient() - .getAddons() - .createOrUpdate(resourceGroupName, privateCloudName, addonName, this.innerModel(), Context.NONE); + this.innerObject = serviceManager.serviceClient().getAddons().createOrUpdate(resourceGroupName, + privateCloudName, addonName, this.innerModel(), Context.NONE); return this; } public Addon create(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getAddons() - .createOrUpdate(resourceGroupName, privateCloudName, addonName, this.innerModel(), context); + this.innerObject = serviceManager.serviceClient().getAddons().createOrUpdate(resourceGroupName, + privateCloudName, addonName, this.innerModel(), context); return this; } @@ -83,48 +82,34 @@ public AddonImpl update() { } public Addon apply() { - this.innerObject = - serviceManager - .serviceClient() - .getAddons() - .createOrUpdate(resourceGroupName, privateCloudName, addonName, this.innerModel(), Context.NONE); + this.innerObject = serviceManager.serviceClient().getAddons().createOrUpdate(resourceGroupName, + privateCloudName, addonName, this.innerModel(), Context.NONE); return this; } public Addon apply(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getAddons() - .createOrUpdate(resourceGroupName, privateCloudName, addonName, this.innerModel(), context); + this.innerObject = serviceManager.serviceClient().getAddons().createOrUpdate(resourceGroupName, + privateCloudName, addonName, this.innerModel(), context); return this; } AddonImpl(AddonInner innerObject, com.azure.resourcemanager.avs.AvsManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; - this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups"); - this.privateCloudName = Utils.getValueFromIdByName(innerObject.id(), "privateClouds"); - this.addonName = Utils.getValueFromIdByName(innerObject.id(), "addons"); + this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); + this.privateCloudName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "privateClouds"); + this.addonName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "addons"); } public Addon refresh() { - this.innerObject = - serviceManager - .serviceClient() - .getAddons() - .getWithResponse(resourceGroupName, privateCloudName, addonName, Context.NONE) - .getValue(); + this.innerObject = serviceManager.serviceClient().getAddons() + .getWithResponse(resourceGroupName, privateCloudName, addonName, Context.NONE).getValue(); return this; } public Addon refresh(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getAddons() - .getWithResponse(resourceGroupName, privateCloudName, addonName, context) - .getValue(); + this.innerObject = serviceManager.serviceClient().getAddons() + .getWithResponse(resourceGroupName, privateCloudName, addonName, context).getValue(); return this; } diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/AddonsClientImpl.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/AddonsClientImpl.java index 1babf1026e7f8..0036557f91683 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/AddonsClientImpl.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/AddonsClientImpl.java @@ -33,22 +33,28 @@ import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.avs.fluent.AddonsClient; import com.azure.resourcemanager.avs.fluent.models.AddonInner; -import com.azure.resourcemanager.avs.models.AddonList; +import com.azure.resourcemanager.avs.models.AddonListResult; 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 AddonsClient. */ +/** + * An instance of this class provides access to all the operations defined in AddonsClient. + */ public final class AddonsClientImpl implements AddonsClient { - /** The proxy service used to perform REST calls. */ + /** + * The proxy service used to perform REST calls. + */ private final AddonsService service; - /** The service client containing this operation class. */ + /** + * The service client containing this operation class. + */ private final AvsClientImpl client; /** * Initializes an instance of AddonsClientImpl. - * + * * @param client the instance of the service client containing this operation class. */ AddonsClientImpl(AvsClientImpl client) { @@ -63,100 +69,74 @@ public final class AddonsClientImpl implements AddonsClient { @Host("{$host}") @ServiceInterface(name = "AvsClientAddons") public interface AddonsService { - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/addons") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/addons") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono> list(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("privateCloudName") String privateCloudName, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, + @PathParam("privateCloudName") String privateCloudName, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/addons/{addonName}") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/addons/{addonName}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono> get(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("privateCloudName") String privateCloudName, - @PathParam("addonName") String addonName, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + @PathParam("privateCloudName") String privateCloudName, @PathParam("addonName") String addonName, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/addons/{addonName}") - @ExpectedResponses({200, 201}) + @Headers({ "Content-Type: application/json" }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/addons/{addonName}") + @ExpectedResponses({ 200, 201 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createOrUpdate( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono>> createOrUpdate(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("privateCloudName") String privateCloudName, - @PathParam("addonName") String addonName, - @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") AddonInner addon, - @HeaderParam("Accept") String accept, - Context context); + @PathParam("privateCloudName") String privateCloudName, @PathParam("addonName") String addonName, + @BodyParam("application/json") AddonInner addon, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Delete( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/addons/{addonName}") - @ExpectedResponses({200, 202, 204}) + @Headers({ "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/addons/{addonName}") + @ExpectedResponses({ 200, 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono>> delete(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("privateCloudName") String privateCloudName, - @PathParam("addonName") String addonName, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + @PathParam("privateCloudName") String privateCloudName, @PathParam("addonName") String addonName, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + Mono> listNext(@PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); } /** - * List addons in a private cloud. - * + * List Addon resources by PrivateCloud. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. * @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 paged list of addons along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return the response of a Addon list operation along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync(String resourceGroupName, String privateCloudName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -168,54 +148,35 @@ private Mono> listSinglePageAsync(String resourceGroup } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .list( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - privateCloudName, - this.client.getApiVersion(), - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, 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 addons in a private cloud. - * + * List Addon resources by PrivateCloud. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. * @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 a paged list of addons along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return the response of a Addon list operation along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync( - String resourceGroupName, String privateCloudName, Context context) { + private Mono> listSinglePageAsync(String resourceGroupName, String privateCloudName, + Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -228,69 +189,54 @@ private Mono> listSinglePageAsync( final String accept = "application/json"; context = this.client.mergeContext(context); return service - .list( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - privateCloudName, - this.client.getApiVersion(), - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + .list(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, privateCloudName, accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** - * List addons in a private cloud. - * + * List Addon resources by PrivateCloud. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. * @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 paged list of addons as paginated response with {@link PagedFlux}. + * @return the response of a Addon list operation as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(String resourceGroupName, String privateCloudName) { - return new PagedFlux<>( - () -> listSinglePageAsync(resourceGroupName, privateCloudName), + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, privateCloudName), nextLink -> listNextSinglePageAsync(nextLink)); } /** - * List addons in a private cloud. - * + * List Addon resources by PrivateCloud. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. * @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 a paged list of addons as paginated response with {@link PagedFlux}. + * @return the response of a Addon list operation as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(String resourceGroupName, String privateCloudName, Context context) { - return new PagedFlux<>( - () -> listSinglePageAsync(resourceGroupName, privateCloudName, context), + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, privateCloudName, context), nextLink -> listNextSinglePageAsync(nextLink, context)); } /** - * List addons in a private cloud. - * + * List Addon resources by PrivateCloud. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. * @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 paged list of addons as paginated response with {@link PagedIterable}. + * @return the response of a Addon list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(String resourceGroupName, String privateCloudName) { @@ -298,15 +244,15 @@ public PagedIterable list(String resourceGroupName, String privateCl } /** - * List addons in a private cloud. - * + * List Addon resources by PrivateCloud. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. * @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 a paged list of addons as paginated response with {@link PagedIterable}. + * @return the response of a Addon list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(String resourceGroupName, String privateCloudName, Context context) { @@ -314,30 +260,26 @@ public PagedIterable list(String resourceGroupName, String privateCl } /** - * Get an addon by name in a private cloud. - * + * Get a Addon. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param addonName Name of the addon for the private cloud. + * @param addonName Name of the addon. * @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 an addon by name in a private cloud along with {@link Response} on successful completion of {@link Mono}. + * @return a Addon along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String privateCloudName, String addonName) { + private Mono> getWithResponseAsync(String resourceGroupName, String privateCloudName, + String addonName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -352,47 +294,33 @@ private Mono> getWithResponseAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .get( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - privateCloudName, - addonName, - this.client.getApiVersion(), - accept, - context)) + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, addonName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Get an addon by name in a private cloud. - * + * Get a Addon. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param addonName Name of the addon for the private cloud. + * @param addonName Name of the addon. * @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 an addon by name in a private cloud along with {@link Response} on successful completion of {@link Mono}. + * @return a Addon along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String privateCloudName, String addonName, Context context) { + private Mono> getWithResponseAsync(String resourceGroupName, String privateCloudName, + String addonName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -407,28 +335,20 @@ private Mono> getWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .get( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - privateCloudName, - addonName, - this.client.getApiVersion(), - accept, - context); + return service.get(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, privateCloudName, addonName, accept, context); } /** - * Get an addon by name in a private cloud. - * + * Get a Addon. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param addonName Name of the addon for the private cloud. + * @param addonName Name of the addon. * @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 an addon by name in a private cloud on successful completion of {@link Mono}. + * @return a Addon on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono getAsync(String resourceGroupName, String privateCloudName, String addonName) { @@ -437,33 +357,33 @@ private Mono getAsync(String resourceGroupName, String privateCloudN } /** - * Get an addon by name in a private cloud. - * + * Get a Addon. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param addonName Name of the addon for the private cloud. + * @param addonName Name of the addon. * @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 an addon by name in a private cloud along with {@link Response}. + * @return a Addon along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, String privateCloudName, String addonName, Context context) { + public Response getWithResponse(String resourceGroupName, String privateCloudName, String addonName, + Context context) { return getWithResponseAsync(resourceGroupName, privateCloudName, addonName, context).block(); } /** - * Get an addon by name in a private cloud. - * + * Get a Addon. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param addonName Name of the addon for the private cloud. + * @param addonName Name of the addon. * @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 an addon by name in a private cloud. + * @return a Addon. */ @ServiceMethod(returns = ReturnType.SINGLE) public AddonInner get(String resourceGroupName, String privateCloudName, String addonName) { @@ -471,31 +391,27 @@ public AddonInner get(String resourceGroupName, String privateCloudName, String } /** - * Create or update a addon in a private cloud. - * + * Create a Addon. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName The name of the private cloud. - * @param addonName Name of the addon for the private cloud. - * @param addon A addon in the private cloud. + * @param privateCloudName Name of the private cloud. + * @param addonName Name of the addon. + * @param addon Resource create parameters. * @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 an addon resource along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync( - String resourceGroupName, String privateCloudName, String addonName, AddonInner addon) { + private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String privateCloudName, String addonName, AddonInner addon) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -515,29 +431,19 @@ private Mono>> createOrUpdateWithResponseAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .createOrUpdate( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - privateCloudName, - addonName, - this.client.getApiVersion(), - addon, - accept, - context)) + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, addonName, addon, accept, + context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Create or update a addon in a private cloud. - * + * Create a Addon. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName The name of the private cloud. - * @param addonName Name of the addon for the private cloud. - * @param addon A addon in the private cloud. + * @param privateCloudName Name of the private cloud. + * @param addonName Name of the addon. + * @param addon Resource create parameters. * @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. @@ -545,19 +451,15 @@ private Mono>> createOrUpdateWithResponseAsync( * @return an addon resource along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync( - String resourceGroupName, String privateCloudName, String addonName, AddonInner addon, Context context) { + private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String privateCloudName, String addonName, AddonInner addon, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -577,49 +479,38 @@ private Mono>> createOrUpdateWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .createOrUpdate( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - privateCloudName, - addonName, - this.client.getApiVersion(), - addon, - accept, - context); + return service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, addonName, addon, accept, context); } /** - * Create or update a addon in a private cloud. - * + * Create a Addon. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName The name of the private cloud. - * @param addonName Name of the addon for the private cloud. - * @param addon A addon in the private cloud. + * @param privateCloudName Name of the private cloud. + * @param addonName Name of the addon. + * @param addon Resource create parameters. * @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 an addon resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, AddonInner> beginCreateOrUpdateAsync( - String resourceGroupName, String privateCloudName, String addonName, AddonInner addon) { - Mono>> mono = - createOrUpdateWithResponseAsync(resourceGroupName, privateCloudName, addonName, addon); - return this - .client - .getLroResult( - mono, this.client.getHttpPipeline(), AddonInner.class, AddonInner.class, this.client.getContext()); + private PollerFlux, AddonInner> beginCreateOrUpdateAsync(String resourceGroupName, + String privateCloudName, String addonName, AddonInner addon) { + Mono>> mono + = createOrUpdateWithResponseAsync(resourceGroupName, privateCloudName, addonName, addon); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), AddonInner.class, + AddonInner.class, this.client.getContext()); } /** - * Create or update a addon in a private cloud. - * + * Create a Addon. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName The name of the private cloud. - * @param addonName Name of the addon for the private cloud. - * @param addon A addon in the private cloud. + * @param privateCloudName Name of the private cloud. + * @param addonName Name of the addon. + * @param addon Resource create parameters. * @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. @@ -627,42 +518,40 @@ private PollerFlux, AddonInner> beginCreateOrUpdateAsync( * @return the {@link PollerFlux} for polling of an addon resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, AddonInner> beginCreateOrUpdateAsync( - String resourceGroupName, String privateCloudName, String addonName, AddonInner addon, Context context) { + private PollerFlux, AddonInner> beginCreateOrUpdateAsync(String resourceGroupName, + String privateCloudName, String addonName, AddonInner addon, Context context) { context = this.client.mergeContext(context); - Mono>> mono = - createOrUpdateWithResponseAsync(resourceGroupName, privateCloudName, addonName, addon, context); - return this - .client - .getLroResult( - mono, this.client.getHttpPipeline(), AddonInner.class, AddonInner.class, context); + Mono>> mono + = createOrUpdateWithResponseAsync(resourceGroupName, privateCloudName, addonName, addon, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), AddonInner.class, + AddonInner.class, context); } /** - * Create or update a addon in a private cloud. - * + * Create a Addon. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName The name of the private cloud. - * @param addonName Name of the addon for the private cloud. - * @param addon A addon in the private cloud. + * @param privateCloudName Name of the private cloud. + * @param addonName Name of the addon. + * @param addon Resource create parameters. * @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 an addon resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, AddonInner> beginCreateOrUpdate( - String resourceGroupName, String privateCloudName, String addonName, AddonInner addon) { + public SyncPoller, AddonInner> beginCreateOrUpdate(String resourceGroupName, + String privateCloudName, String addonName, AddonInner addon) { return this.beginCreateOrUpdateAsync(resourceGroupName, privateCloudName, addonName, addon).getSyncPoller(); } /** - * Create or update a addon in a private cloud. - * + * Create a Addon. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName The name of the private cloud. - * @param addonName Name of the addon for the private cloud. - * @param addon A addon in the private cloud. + * @param privateCloudName Name of the private cloud. + * @param addonName Name of the addon. + * @param addon Resource create parameters. * @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. @@ -670,40 +559,38 @@ public SyncPoller, AddonInner> beginCreateOrUpdate( * @return the {@link SyncPoller} for polling of an addon resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, AddonInner> beginCreateOrUpdate( - String resourceGroupName, String privateCloudName, String addonName, AddonInner addon, Context context) { - return this - .beginCreateOrUpdateAsync(resourceGroupName, privateCloudName, addonName, addon, context) + public SyncPoller, AddonInner> beginCreateOrUpdate(String resourceGroupName, + String privateCloudName, String addonName, AddonInner addon, Context context) { + return this.beginCreateOrUpdateAsync(resourceGroupName, privateCloudName, addonName, addon, context) .getSyncPoller(); } /** - * Create or update a addon in a private cloud. - * + * Create a Addon. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName The name of the private cloud. - * @param addonName Name of the addon for the private cloud. - * @param addon A addon in the private cloud. + * @param privateCloudName Name of the private cloud. + * @param addonName Name of the addon. + * @param addon Resource create parameters. * @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 an addon resource on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync( - String resourceGroupName, String privateCloudName, String addonName, AddonInner addon) { - return beginCreateOrUpdateAsync(resourceGroupName, privateCloudName, addonName, addon) - .last() + private Mono createOrUpdateAsync(String resourceGroupName, String privateCloudName, String addonName, + AddonInner addon) { + return beginCreateOrUpdateAsync(resourceGroupName, privateCloudName, addonName, addon).last() .flatMap(this.client::getLroFinalResultOrError); } /** - * Create or update a addon in a private cloud. - * + * Create a Addon. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName The name of the private cloud. - * @param addonName Name of the addon for the private cloud. - * @param addon A addon in the private cloud. + * @param privateCloudName Name of the private cloud. + * @param addonName Name of the addon. + * @param addon Resource create parameters. * @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. @@ -711,38 +598,37 @@ private Mono createOrUpdateAsync( * @return an addon resource on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync( - String resourceGroupName, String privateCloudName, String addonName, AddonInner addon, Context context) { - return beginCreateOrUpdateAsync(resourceGroupName, privateCloudName, addonName, addon, context) - .last() + private Mono createOrUpdateAsync(String resourceGroupName, String privateCloudName, String addonName, + AddonInner addon, Context context) { + return beginCreateOrUpdateAsync(resourceGroupName, privateCloudName, addonName, addon, context).last() .flatMap(this.client::getLroFinalResultOrError); } /** - * Create or update a addon in a private cloud. - * + * Create a Addon. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName The name of the private cloud. - * @param addonName Name of the addon for the private cloud. - * @param addon A addon in the private cloud. + * @param privateCloudName Name of the private cloud. + * @param addonName Name of the addon. + * @param addon Resource create parameters. * @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 an addon resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - public AddonInner createOrUpdate( - String resourceGroupName, String privateCloudName, String addonName, AddonInner addon) { + public AddonInner createOrUpdate(String resourceGroupName, String privateCloudName, String addonName, + AddonInner addon) { return createOrUpdateAsync(resourceGroupName, privateCloudName, addonName, addon).block(); } /** - * Create or update a addon in a private cloud. - * + * Create a Addon. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName The name of the private cloud. - * @param addonName Name of the addon for the private cloud. - * @param addon A addon in the private cloud. + * @param privateCloudName Name of the private cloud. + * @param addonName Name of the addon. + * @param addon Resource create parameters. * @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. @@ -750,36 +636,32 @@ public AddonInner createOrUpdate( * @return an addon resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - public AddonInner createOrUpdate( - String resourceGroupName, String privateCloudName, String addonName, AddonInner addon, Context context) { + public AddonInner createOrUpdate(String resourceGroupName, String privateCloudName, String addonName, + AddonInner addon, Context context) { return createOrUpdateAsync(resourceGroupName, privateCloudName, addonName, addon, context).block(); } /** - * Delete a addon in a private cloud. - * + * Delete a Addon. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param addonName Name of the addon for the private cloud. + * @param addonName Name of the addon. * @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 privateCloudName, String addonName) { + private Mono>> deleteWithResponseAsync(String resourceGroupName, String privateCloudName, + String addonName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -794,27 +676,17 @@ private Mono>> deleteWithResponseAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .delete( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - privateCloudName, - addonName, - this.client.getApiVersion(), - accept, - context)) + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, addonName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Delete a addon in a private cloud. - * + * Delete a Addon. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param addonName Name of the addon for the private cloud. + * @param addonName Name of the addon. * @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. @@ -822,19 +694,15 @@ private Mono>> deleteWithResponseAsync( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync( - String resourceGroupName, String privateCloudName, String addonName, Context context) { + private Mono>> deleteWithResponseAsync(String resourceGroupName, String privateCloudName, + String addonName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -849,45 +717,35 @@ private Mono>> deleteWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .delete( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - privateCloudName, - addonName, - this.client.getApiVersion(), - accept, - context); + return service.delete(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, privateCloudName, addonName, accept, context); } /** - * Delete a addon in a private cloud. - * + * Delete a Addon. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param addonName Name of the addon for the private cloud. + * @param addonName Name of the addon. * @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 long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync( - String resourceGroupName, String privateCloudName, String addonName) { + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String privateCloudName, + String addonName) { Mono>> mono = deleteWithResponseAsync(resourceGroupName, privateCloudName, addonName); - return this - .client - .getLroResult( - mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); } /** - * Delete a addon in a private cloud. - * + * Delete a Addon. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param addonName Name of the addon for the private cloud. + * @param addonName Name of the addon. * @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. @@ -895,39 +753,38 @@ private PollerFlux, Void> beginDeleteAsync( * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync( - String resourceGroupName, String privateCloudName, String addonName, Context context) { + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String privateCloudName, + String addonName, Context context) { context = this.client.mergeContext(context); - Mono>> mono = - deleteWithResponseAsync(resourceGroupName, privateCloudName, addonName, context); - return this - .client - .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); + Mono>> mono + = deleteWithResponseAsync(resourceGroupName, privateCloudName, addonName, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + context); } /** - * Delete a addon in a private cloud. - * + * Delete a Addon. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param addonName Name of the addon for the private cloud. + * @param addonName Name of the addon. * @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 long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete( - String resourceGroupName, String privateCloudName, String addonName) { + public SyncPoller, Void> beginDelete(String resourceGroupName, String privateCloudName, + String addonName) { return this.beginDeleteAsync(resourceGroupName, privateCloudName, addonName).getSyncPoller(); } /** - * Delete a addon in a private cloud. - * + * Delete a Addon. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param addonName Name of the addon for the private cloud. + * @param addonName Name of the addon. * @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. @@ -935,17 +792,17 @@ public SyncPoller, Void> beginDelete( * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete( - String resourceGroupName, String privateCloudName, String addonName, Context context) { + public SyncPoller, Void> beginDelete(String resourceGroupName, String privateCloudName, + String addonName, Context context) { return this.beginDeleteAsync(resourceGroupName, privateCloudName, addonName, context).getSyncPoller(); } /** - * Delete a addon in a private cloud. - * + * Delete a Addon. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param addonName Name of the addon for the private cloud. + * @param addonName Name of the addon. * @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. @@ -953,17 +810,16 @@ public SyncPoller, Void> beginDelete( */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono deleteAsync(String resourceGroupName, String privateCloudName, String addonName) { - return beginDeleteAsync(resourceGroupName, privateCloudName, addonName) - .last() + return beginDeleteAsync(resourceGroupName, privateCloudName, addonName).last() .flatMap(this.client::getLroFinalResultOrError); } /** - * Delete a addon in a private cloud. - * + * Delete a Addon. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param addonName Name of the addon for the private cloud. + * @param addonName Name of the addon. * @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. @@ -971,19 +827,18 @@ private Mono deleteAsync(String resourceGroupName, String privateCloudName * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync( - String resourceGroupName, String privateCloudName, String addonName, Context context) { - return beginDeleteAsync(resourceGroupName, privateCloudName, addonName, context) - .last() + private Mono deleteAsync(String resourceGroupName, String privateCloudName, String addonName, + Context context) { + return beginDeleteAsync(resourceGroupName, privateCloudName, addonName, context).last() .flatMap(this.client::getLroFinalResultOrError); } /** - * Delete a addon in a private cloud. - * + * Delete a Addon. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param addonName Name of the addon for the private cloud. + * @param addonName Name of the addon. * @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. @@ -994,11 +849,11 @@ public void delete(String resourceGroupName, String privateCloudName, String add } /** - * Delete a addon in a private cloud. - * + * Delete a Addon. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param addonName Name of the addon for the private cloud. + * @param addonName Name of the addon. * @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. @@ -1011,13 +866,15 @@ public void delete(String resourceGroupName, String privateCloudName, String add /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * 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 a paged list of addons along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return the response of a Addon list operation along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink) { @@ -1025,36 +882,28 @@ private Mono> listNextSinglePageAsync(String nextLink) 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.")); + 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.listNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + return FluxUtil.withContext(context -> service.listNext(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 URL to get the next list of items - *

The nextLink parameter. + * + * 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 a paged list of addons along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return the response of a Addon list operation along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink, Context context) { @@ -1062,23 +911,13 @@ private Mono> listNextSinglePageAsync(String nextLink, 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.")); + 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 - .listNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.listNext(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/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/AddonsImpl.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/AddonsImpl.java index e1067d0eac3a4..cb695b25b9245 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/AddonsImpl.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/AddonsImpl.java @@ -28,23 +28,20 @@ public AddonsImpl(AddonsClient innerClient, com.azure.resourcemanager.avs.AvsMan public PagedIterable list(String resourceGroupName, String privateCloudName) { PagedIterable inner = this.serviceClient().list(resourceGroupName, privateCloudName); - return Utils.mapPage(inner, inner1 -> new AddonImpl(inner1, this.manager())); + return ResourceManagerUtils.mapPage(inner, inner1 -> new AddonImpl(inner1, this.manager())); } public PagedIterable list(String resourceGroupName, String privateCloudName, Context context) { PagedIterable inner = this.serviceClient().list(resourceGroupName, privateCloudName, context); - return Utils.mapPage(inner, inner1 -> new AddonImpl(inner1, this.manager())); + return ResourceManagerUtils.mapPage(inner, inner1 -> new AddonImpl(inner1, this.manager())); } - public Response getWithResponse( - String resourceGroupName, String privateCloudName, String addonName, Context context) { - Response inner = - this.serviceClient().getWithResponse(resourceGroupName, privateCloudName, addonName, context); + public Response getWithResponse(String resourceGroupName, String privateCloudName, String addonName, + Context context) { + Response inner + = this.serviceClient().getWithResponse(resourceGroupName, privateCloudName, addonName, context); if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), new AddonImpl(inner.getValue(), this.manager())); } else { return null; @@ -69,105 +66,77 @@ public void delete(String resourceGroupName, String privateCloudName, String add } public Addon getById(String id) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + String resourceGroupName = ResourceManagerUtils.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))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } - String privateCloudName = Utils.getValueFromIdByName(id, "privateClouds"); + String privateCloudName = ResourceManagerUtils.getValueFromIdByName(id, "privateClouds"); if (privateCloudName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'privateClouds'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'privateClouds'.", id))); } - String addonName = Utils.getValueFromIdByName(id, "addons"); + String addonName = ResourceManagerUtils.getValueFromIdByName(id, "addons"); if (addonName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'addons'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'addons'.", id))); } return this.getWithResponse(resourceGroupName, privateCloudName, addonName, Context.NONE).getValue(); } public Response getByIdWithResponse(String id, Context context) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + String resourceGroupName = ResourceManagerUtils.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))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } - String privateCloudName = Utils.getValueFromIdByName(id, "privateClouds"); + String privateCloudName = ResourceManagerUtils.getValueFromIdByName(id, "privateClouds"); if (privateCloudName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'privateClouds'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'privateClouds'.", id))); } - String addonName = Utils.getValueFromIdByName(id, "addons"); + String addonName = ResourceManagerUtils.getValueFromIdByName(id, "addons"); if (addonName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'addons'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'addons'.", id))); } return this.getWithResponse(resourceGroupName, privateCloudName, addonName, context); } public void deleteById(String id) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + String resourceGroupName = ResourceManagerUtils.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))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } - String privateCloudName = Utils.getValueFromIdByName(id, "privateClouds"); + String privateCloudName = ResourceManagerUtils.getValueFromIdByName(id, "privateClouds"); if (privateCloudName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'privateClouds'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'privateClouds'.", id))); } - String addonName = Utils.getValueFromIdByName(id, "addons"); + String addonName = ResourceManagerUtils.getValueFromIdByName(id, "addons"); if (addonName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'addons'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'addons'.", id))); } this.delete(resourceGroupName, privateCloudName, addonName, Context.NONE); } public void deleteByIdWithResponse(String id, Context context) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + String resourceGroupName = ResourceManagerUtils.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))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } - String privateCloudName = Utils.getValueFromIdByName(id, "privateClouds"); + String privateCloudName = ResourceManagerUtils.getValueFromIdByName(id, "privateClouds"); if (privateCloudName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'privateClouds'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'privateClouds'.", id))); } - String addonName = Utils.getValueFromIdByName(id, "addons"); + String addonName = ResourceManagerUtils.getValueFromIdByName(id, "addons"); if (addonName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'addons'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'addons'.", id))); } this.delete(resourceGroupName, privateCloudName, addonName, context); } diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/AuthorizationsClientImpl.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/AuthorizationsClientImpl.java index 7827f5595f89f..1006cce9fced6 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/AuthorizationsClientImpl.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/AuthorizationsClientImpl.java @@ -33,27 +33,33 @@ import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.avs.fluent.AuthorizationsClient; import com.azure.resourcemanager.avs.fluent.models.ExpressRouteAuthorizationInner; -import com.azure.resourcemanager.avs.models.ExpressRouteAuthorizationList; +import com.azure.resourcemanager.avs.models.ExpressRouteAuthorizationListResult; 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 AuthorizationsClient. */ +/** + * An instance of this class provides access to all the operations defined in AuthorizationsClient. + */ public final class AuthorizationsClientImpl implements AuthorizationsClient { - /** The proxy service used to perform REST calls. */ + /** + * The proxy service used to perform REST calls. + */ private final AuthorizationsService service; - /** The service client containing this operation class. */ + /** + * The service client containing this operation class. + */ private final AvsClientImpl client; /** * Initializes an instance of AuthorizationsClientImpl. - * + * * @param client the instance of the service client containing this operation class. */ AuthorizationsClientImpl(AvsClientImpl client) { - this.service = - RestProxy.create(AuthorizationsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.service + = RestProxy.create(AuthorizationsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } @@ -64,102 +70,80 @@ public final class AuthorizationsClientImpl implements AuthorizationsClient { @Host("{$host}") @ServiceInterface(name = "AvsClientAuthorizati") public interface AuthorizationsService { - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/authorizations") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/authorizations") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono> list(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("privateCloudName") String privateCloudName, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, + @PathParam("privateCloudName") String privateCloudName, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/authorizations/{authorizationName}") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/authorizations/{authorizationName}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono> get(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("privateCloudName") String privateCloudName, - @PathParam("authorizationName") String authorizationName, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, + @PathParam("authorizationName") String authorizationName, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/authorizations/{authorizationName}") - @ExpectedResponses({200, 201}) + @Headers({ "Content-Type: application/json" }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/authorizations/{authorizationName}") + @ExpectedResponses({ 200, 201 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createOrUpdate( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono>> createOrUpdate(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("privateCloudName") String privateCloudName, @PathParam("authorizationName") String authorizationName, - @QueryParam("api-version") String apiVersion, @BodyParam("application/json") ExpressRouteAuthorizationInner authorization, - @HeaderParam("Accept") String accept, - Context context); + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Delete( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/authorizations/{authorizationName}") - @ExpectedResponses({200, 202, 204}) + @Headers({ "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/authorizations/{authorizationName}") + @ExpectedResponses({ 200, 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono>> delete(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("privateCloudName") String privateCloudName, - @PathParam("authorizationName") String authorizationName, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, + @PathParam("authorizationName") String authorizationName, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + Mono> listNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); } /** - * List ExpressRoute Circuit Authorizations in a private cloud. - * + * List ExpressRouteAuthorization resources by PrivateCloud. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. * @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 paged list of ExpressRoute Circuit Authorizations along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * @return the response of a ExpressRouteAuthorization list operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync( - String resourceGroupName, String privateCloudName) { + private Mono> listSinglePageAsync(String resourceGroupName, + String privateCloudName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -171,55 +155,35 @@ private Mono> listSinglePageAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .list( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - privateCloudName, - this.client.getApiVersion(), - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, 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 ExpressRoute Circuit Authorizations in a private cloud. - * + * List ExpressRouteAuthorization resources by PrivateCloud. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. * @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 a paged list of ExpressRoute Circuit Authorizations along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * @return the response of a ExpressRouteAuthorization list operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync( - String resourceGroupName, String privateCloudName, Context context) { + private Mono> listSinglePageAsync(String resourceGroupName, + String privateCloudName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -232,70 +196,56 @@ private Mono> listSinglePageAsync( final String accept = "application/json"; context = this.client.mergeContext(context); return service - .list( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - privateCloudName, - this.client.getApiVersion(), - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + .list(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, privateCloudName, accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** - * List ExpressRoute Circuit Authorizations in a private cloud. - * + * List ExpressRouteAuthorization resources by PrivateCloud. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. * @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 paged list of ExpressRoute Circuit Authorizations as paginated response with {@link PagedFlux}. + * @return the response of a ExpressRouteAuthorization list operation as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(String resourceGroupName, String privateCloudName) { - return new PagedFlux<>( - () -> listSinglePageAsync(resourceGroupName, privateCloudName), + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, privateCloudName), nextLink -> listNextSinglePageAsync(nextLink)); } /** - * List ExpressRoute Circuit Authorizations in a private cloud. - * + * List ExpressRouteAuthorization resources by PrivateCloud. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. * @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 a paged list of ExpressRoute Circuit Authorizations as paginated response with {@link PagedFlux}. + * @return the response of a ExpressRouteAuthorization list operation as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync( - String resourceGroupName, String privateCloudName, Context context) { - return new PagedFlux<>( - () -> listSinglePageAsync(resourceGroupName, privateCloudName, context), + private PagedFlux listAsync(String resourceGroupName, String privateCloudName, + Context context) { + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, privateCloudName, context), nextLink -> listNextSinglePageAsync(nextLink, context)); } /** - * List ExpressRoute Circuit Authorizations in a private cloud. - * + * List ExpressRouteAuthorization resources by PrivateCloud. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. * @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 paged list of ExpressRoute Circuit Authorizations as paginated response with {@link PagedIterable}. + * @return the response of a ExpressRouteAuthorization list operation as paginated response with + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(String resourceGroupName, String privateCloudName) { @@ -303,48 +253,44 @@ public PagedIterable list(String resourceGroupNa } /** - * List ExpressRoute Circuit Authorizations in a private cloud. - * + * List ExpressRouteAuthorization resources by PrivateCloud. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. * @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 a paged list of ExpressRoute Circuit Authorizations as paginated response with {@link PagedIterable}. + * @return the response of a ExpressRouteAuthorization list operation as paginated response with + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list( - String resourceGroupName, String privateCloudName, Context context) { + public PagedIterable list(String resourceGroupName, String privateCloudName, + Context context) { return new PagedIterable<>(listAsync(resourceGroupName, privateCloudName, context)); } /** - * Get an ExpressRoute Circuit Authorization by name in a private cloud. - * + * Get a ExpressRouteAuthorization. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param authorizationName Name of the ExpressRoute Circuit Authorization in the private cloud. + * @param authorizationName Name of the ExpressRoute Circuit Authorization. * @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 an ExpressRoute Circuit Authorization by name in a private cloud along with {@link Response} on - * successful completion of {@link Mono}. + * @return a ExpressRouteAuthorization along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String privateCloudName, String authorizationName) { + private Mono> getWithResponseAsync(String resourceGroupName, + String privateCloudName, String authorizationName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -359,49 +305,33 @@ private Mono> getWithResponseAsync( .error(new IllegalArgumentException("Parameter authorizationName is required and cannot be null.")); } final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .get( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - privateCloudName, - authorizationName, - this.client.getApiVersion(), - accept, - context)) + return FluxUtil.withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, authorizationName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Get an ExpressRoute Circuit Authorization by name in a private cloud. - * + * Get a ExpressRouteAuthorization. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param authorizationName Name of the ExpressRoute Circuit Authorization in the private cloud. + * @param authorizationName Name of the ExpressRoute Circuit Authorization. * @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 an ExpressRoute Circuit Authorization by name in a private cloud along with {@link Response} on - * successful completion of {@link Mono}. + * @return a ExpressRouteAuthorization along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String privateCloudName, String authorizationName, Context context) { + private Mono> getWithResponseAsync(String resourceGroupName, + String privateCloudName, String authorizationName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -417,101 +347,85 @@ private Mono> getWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .get( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - privateCloudName, - authorizationName, - this.client.getApiVersion(), - accept, - context); + return service.get(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, privateCloudName, authorizationName, accept, context); } /** - * Get an ExpressRoute Circuit Authorization by name in a private cloud. - * + * Get a ExpressRouteAuthorization. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param authorizationName Name of the ExpressRoute Circuit Authorization in the private cloud. + * @param authorizationName Name of the ExpressRoute Circuit Authorization. * @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 an ExpressRoute Circuit Authorization by name in a private cloud on successful completion of {@link - * Mono}. + * @return a ExpressRouteAuthorization on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync( - String resourceGroupName, String privateCloudName, String authorizationName) { + private Mono getAsync(String resourceGroupName, String privateCloudName, + String authorizationName) { return getWithResponseAsync(resourceGroupName, privateCloudName, authorizationName) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** - * Get an ExpressRoute Circuit Authorization by name in a private cloud. - * + * Get a ExpressRouteAuthorization. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param authorizationName Name of the ExpressRoute Circuit Authorization in the private cloud. + * @param authorizationName Name of the ExpressRoute Circuit Authorization. * @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 an ExpressRoute Circuit Authorization by name in a private cloud along with {@link Response}. + * @return a ExpressRouteAuthorization along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, String privateCloudName, String authorizationName, Context context) { + public Response getWithResponse(String resourceGroupName, String privateCloudName, + String authorizationName, Context context) { return getWithResponseAsync(resourceGroupName, privateCloudName, authorizationName, context).block(); } /** - * Get an ExpressRoute Circuit Authorization by name in a private cloud. - * + * Get a ExpressRouteAuthorization. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param authorizationName Name of the ExpressRoute Circuit Authorization in the private cloud. + * @param authorizationName Name of the ExpressRoute Circuit Authorization. * @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 an ExpressRoute Circuit Authorization by name in a private cloud. + * @return a ExpressRouteAuthorization. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ExpressRouteAuthorizationInner get( - String resourceGroupName, String privateCloudName, String authorizationName) { + public ExpressRouteAuthorizationInner get(String resourceGroupName, String privateCloudName, + String authorizationName) { return getWithResponse(resourceGroupName, privateCloudName, authorizationName, Context.NONE).getValue(); } /** - * Create or update an ExpressRoute Circuit Authorization in a private cloud. - * + * Create a ExpressRouteAuthorization. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName The name of the private cloud. - * @param authorizationName Name of the ExpressRoute Circuit Authorization in the private cloud. - * @param authorization An ExpressRoute Circuit Authorization. + * @param privateCloudName Name of the private cloud. + * @param authorizationName Name of the ExpressRoute Circuit Authorization. + * @param authorization Resource create parameters. * @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 expressRoute Circuit Authorization along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync( - String resourceGroupName, - String privateCloudName, - String authorizationName, - ExpressRouteAuthorizationInner authorization) { + private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String privateCloudName, String authorizationName, ExpressRouteAuthorizationInner authorization) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -532,29 +446,19 @@ private Mono>> createOrUpdateWithResponseAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .createOrUpdate( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - privateCloudName, - authorizationName, - this.client.getApiVersion(), - authorization, - accept, - context)) + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, authorizationName, authorization, + accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Create or update an ExpressRoute Circuit Authorization in a private cloud. - * + * Create a ExpressRouteAuthorization. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName The name of the private cloud. - * @param authorizationName Name of the ExpressRoute Circuit Authorization in the private cloud. - * @param authorization An ExpressRoute Circuit Authorization. + * @param privateCloudName Name of the private cloud. + * @param authorizationName Name of the ExpressRoute Circuit Authorization. + * @param authorization Resource create parameters. * @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. @@ -562,23 +466,16 @@ private Mono>> createOrUpdateWithResponseAsync( * @return expressRoute Circuit Authorization along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync( - String resourceGroupName, - String privateCloudName, - String authorizationName, - ExpressRouteAuthorizationInner authorization, + private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String privateCloudName, String authorizationName, ExpressRouteAuthorizationInner authorization, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -599,26 +496,18 @@ private Mono>> createOrUpdateWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .createOrUpdate( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - privateCloudName, - authorizationName, - this.client.getApiVersion(), - authorization, - accept, - context); + return service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, authorizationName, authorization, + accept, context); } /** - * Create or update an ExpressRoute Circuit Authorization in a private cloud. - * + * Create a ExpressRouteAuthorization. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName The name of the private cloud. - * @param authorizationName Name of the ExpressRoute Circuit Authorization in the private cloud. - * @param authorization An ExpressRoute Circuit Authorization. + * @param privateCloudName Name of the private cloud. + * @param authorizationName Name of the ExpressRoute Circuit Authorization. + * @param authorization Resource create parameters. * @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. @@ -626,30 +515,22 @@ private Mono>> createOrUpdateWithResponseAsync( */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, ExpressRouteAuthorizationInner> - beginCreateOrUpdateAsync( - String resourceGroupName, - String privateCloudName, - String authorizationName, + beginCreateOrUpdateAsync(String resourceGroupName, String privateCloudName, String authorizationName, ExpressRouteAuthorizationInner authorization) { - Mono>> mono = - createOrUpdateWithResponseAsync(resourceGroupName, privateCloudName, authorizationName, authorization); - return this - .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - ExpressRouteAuthorizationInner.class, - ExpressRouteAuthorizationInner.class, - this.client.getContext()); + Mono>> mono + = createOrUpdateWithResponseAsync(resourceGroupName, privateCloudName, authorizationName, authorization); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), ExpressRouteAuthorizationInner.class, ExpressRouteAuthorizationInner.class, + this.client.getContext()); } /** - * Create or update an ExpressRoute Circuit Authorization in a private cloud. - * + * Create a ExpressRouteAuthorization. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName The name of the private cloud. - * @param authorizationName Name of the ExpressRoute Circuit Authorization in the private cloud. - * @param authorization An ExpressRoute Circuit Authorization. + * @param privateCloudName Name of the private cloud. + * @param authorizationName Name of the ExpressRoute Circuit Authorization. + * @param authorization Resource create parameters. * @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. @@ -658,33 +539,23 @@ private Mono>> createOrUpdateWithResponseAsync( */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, ExpressRouteAuthorizationInner> - beginCreateOrUpdateAsync( - String resourceGroupName, - String privateCloudName, - String authorizationName, - ExpressRouteAuthorizationInner authorization, - Context context) { + beginCreateOrUpdateAsync(String resourceGroupName, String privateCloudName, String authorizationName, + ExpressRouteAuthorizationInner authorization, Context context) { context = this.client.mergeContext(context); - Mono>> mono = - createOrUpdateWithResponseAsync( - resourceGroupName, privateCloudName, authorizationName, authorization, context); - return this - .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - ExpressRouteAuthorizationInner.class, - ExpressRouteAuthorizationInner.class, - context); + Mono>> mono = createOrUpdateWithResponseAsync(resourceGroupName, privateCloudName, + authorizationName, authorization, context); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), ExpressRouteAuthorizationInner.class, ExpressRouteAuthorizationInner.class, + context); } /** - * Create or update an ExpressRoute Circuit Authorization in a private cloud. - * + * Create a ExpressRouteAuthorization. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName The name of the private cloud. - * @param authorizationName Name of the ExpressRoute Circuit Authorization in the private cloud. - * @param authorization An ExpressRoute Circuit Authorization. + * @param privateCloudName Name of the private cloud. + * @param authorizationName Name of the ExpressRoute Circuit Authorization. + * @param authorization Resource create parameters. * @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. @@ -692,22 +563,19 @@ private Mono>> createOrUpdateWithResponseAsync( */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, ExpressRouteAuthorizationInner> beginCreateOrUpdate( - String resourceGroupName, - String privateCloudName, - String authorizationName, + String resourceGroupName, String privateCloudName, String authorizationName, ExpressRouteAuthorizationInner authorization) { - return this - .beginCreateOrUpdateAsync(resourceGroupName, privateCloudName, authorizationName, authorization) + return this.beginCreateOrUpdateAsync(resourceGroupName, privateCloudName, authorizationName, authorization) .getSyncPoller(); } /** - * Create or update an ExpressRoute Circuit Authorization in a private cloud. - * + * Create a ExpressRouteAuthorization. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName The name of the private cloud. - * @param authorizationName Name of the ExpressRoute Circuit Authorization in the private cloud. - * @param authorization An ExpressRoute Circuit Authorization. + * @param privateCloudName Name of the private cloud. + * @param authorizationName Name of the ExpressRoute Circuit Authorization. + * @param authorization Resource create parameters. * @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. @@ -716,46 +584,39 @@ public SyncPoller, ExpressRouteAuthor */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, ExpressRouteAuthorizationInner> beginCreateOrUpdate( - String resourceGroupName, - String privateCloudName, - String authorizationName, - ExpressRouteAuthorizationInner authorization, - Context context) { + String resourceGroupName, String privateCloudName, String authorizationName, + ExpressRouteAuthorizationInner authorization, Context context) { return this .beginCreateOrUpdateAsync(resourceGroupName, privateCloudName, authorizationName, authorization, context) .getSyncPoller(); } /** - * Create or update an ExpressRoute Circuit Authorization in a private cloud. - * + * Create a ExpressRouteAuthorization. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName The name of the private cloud. - * @param authorizationName Name of the ExpressRoute Circuit Authorization in the private cloud. - * @param authorization An ExpressRoute Circuit Authorization. + * @param privateCloudName Name of the private cloud. + * @param authorizationName Name of the ExpressRoute Circuit Authorization. + * @param authorization Resource create parameters. * @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 expressRoute Circuit Authorization on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync( - String resourceGroupName, - String privateCloudName, - String authorizationName, - ExpressRouteAuthorizationInner authorization) { - return beginCreateOrUpdateAsync(resourceGroupName, privateCloudName, authorizationName, authorization) - .last() + private Mono createOrUpdateAsync(String resourceGroupName, String privateCloudName, + String authorizationName, ExpressRouteAuthorizationInner authorization) { + return beginCreateOrUpdateAsync(resourceGroupName, privateCloudName, authorizationName, authorization).last() .flatMap(this.client::getLroFinalResultOrError); } /** - * Create or update an ExpressRoute Circuit Authorization in a private cloud. - * + * Create a ExpressRouteAuthorization. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName The name of the private cloud. - * @param authorizationName Name of the ExpressRoute Circuit Authorization in the private cloud. - * @param authorization An ExpressRoute Circuit Authorization. + * @param privateCloudName Name of the private cloud. + * @param authorizationName Name of the ExpressRoute Circuit Authorization. + * @param authorization Resource create parameters. * @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. @@ -763,45 +624,37 @@ private Mono createOrUpdateAsync( * @return expressRoute Circuit Authorization on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync( - String resourceGroupName, - String privateCloudName, - String authorizationName, - ExpressRouteAuthorizationInner authorization, - Context context) { + private Mono createOrUpdateAsync(String resourceGroupName, String privateCloudName, + String authorizationName, ExpressRouteAuthorizationInner authorization, Context context) { return beginCreateOrUpdateAsync(resourceGroupName, privateCloudName, authorizationName, authorization, context) - .last() - .flatMap(this.client::getLroFinalResultOrError); + .last().flatMap(this.client::getLroFinalResultOrError); } /** - * Create or update an ExpressRoute Circuit Authorization in a private cloud. - * + * Create a ExpressRouteAuthorization. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName The name of the private cloud. - * @param authorizationName Name of the ExpressRoute Circuit Authorization in the private cloud. - * @param authorization An ExpressRoute Circuit Authorization. + * @param privateCloudName Name of the private cloud. + * @param authorizationName Name of the ExpressRoute Circuit Authorization. + * @param authorization Resource create parameters. * @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 expressRoute Circuit Authorization. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ExpressRouteAuthorizationInner createOrUpdate( - String resourceGroupName, - String privateCloudName, - String authorizationName, - ExpressRouteAuthorizationInner authorization) { + public ExpressRouteAuthorizationInner createOrUpdate(String resourceGroupName, String privateCloudName, + String authorizationName, ExpressRouteAuthorizationInner authorization) { return createOrUpdateAsync(resourceGroupName, privateCloudName, authorizationName, authorization).block(); } /** - * Create or update an ExpressRoute Circuit Authorization in a private cloud. - * + * Create a ExpressRouteAuthorization. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName The name of the private cloud. - * @param authorizationName Name of the ExpressRoute Circuit Authorization in the private cloud. - * @param authorization An ExpressRoute Circuit Authorization. + * @param privateCloudName Name of the private cloud. + * @param authorizationName Name of the ExpressRoute Circuit Authorization. + * @param authorization Resource create parameters. * @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. @@ -809,41 +662,33 @@ public ExpressRouteAuthorizationInner createOrUpdate( * @return expressRoute Circuit Authorization. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ExpressRouteAuthorizationInner createOrUpdate( - String resourceGroupName, - String privateCloudName, - String authorizationName, - ExpressRouteAuthorizationInner authorization, - Context context) { + public ExpressRouteAuthorizationInner createOrUpdate(String resourceGroupName, String privateCloudName, + String authorizationName, ExpressRouteAuthorizationInner authorization, Context context) { return createOrUpdateAsync(resourceGroupName, privateCloudName, authorizationName, authorization, context) .block(); } /** - * Delete an ExpressRoute Circuit Authorization in a private cloud. - * + * Delete a ExpressRouteAuthorization. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param authorizationName Name of the ExpressRoute Circuit Authorization in the private cloud. + * @param authorizationName Name of the ExpressRoute Circuit Authorization. * @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 privateCloudName, String authorizationName) { + private Mono>> deleteWithResponseAsync(String resourceGroupName, String privateCloudName, + String authorizationName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -858,28 +703,17 @@ private Mono>> deleteWithResponseAsync( .error(new IllegalArgumentException("Parameter authorizationName is required and cannot be null.")); } final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .delete( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - privateCloudName, - authorizationName, - this.client.getApiVersion(), - accept, - context)) + return FluxUtil.withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, authorizationName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Delete an ExpressRoute Circuit Authorization in a private cloud. - * + * Delete a ExpressRouteAuthorization. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param authorizationName Name of the ExpressRoute Circuit Authorization in the private cloud. + * @param authorizationName Name of the ExpressRoute Circuit Authorization. * @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. @@ -887,19 +721,15 @@ private Mono>> deleteWithResponseAsync( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync( - String resourceGroupName, String privateCloudName, String authorizationName, Context context) { + private Mono>> deleteWithResponseAsync(String resourceGroupName, String privateCloudName, + String authorizationName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -915,46 +745,36 @@ private Mono>> deleteWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .delete( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - privateCloudName, - authorizationName, - this.client.getApiVersion(), - accept, - context); + return service.delete(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, privateCloudName, authorizationName, accept, context); } /** - * Delete an ExpressRoute Circuit Authorization in a private cloud. - * + * Delete a ExpressRouteAuthorization. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param authorizationName Name of the ExpressRoute Circuit Authorization in the private cloud. + * @param authorizationName Name of the ExpressRoute Circuit Authorization. * @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 long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync( - String resourceGroupName, String privateCloudName, String authorizationName) { - Mono>> mono = - deleteWithResponseAsync(resourceGroupName, privateCloudName, authorizationName); - return this - .client - .getLroResult( - mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String privateCloudName, + String authorizationName) { + Mono>> mono + = deleteWithResponseAsync(resourceGroupName, privateCloudName, authorizationName); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); } /** - * Delete an ExpressRoute Circuit Authorization in a private cloud. - * + * Delete a ExpressRouteAuthorization. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param authorizationName Name of the ExpressRoute Circuit Authorization in the private cloud. + * @param authorizationName Name of the ExpressRoute Circuit Authorization. * @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. @@ -962,39 +782,38 @@ private PollerFlux, Void> beginDeleteAsync( * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync( - String resourceGroupName, String privateCloudName, String authorizationName, Context context) { + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String privateCloudName, + String authorizationName, Context context) { context = this.client.mergeContext(context); - Mono>> mono = - deleteWithResponseAsync(resourceGroupName, privateCloudName, authorizationName, context); - return this - .client - .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); + Mono>> mono + = deleteWithResponseAsync(resourceGroupName, privateCloudName, authorizationName, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + context); } /** - * Delete an ExpressRoute Circuit Authorization in a private cloud. - * + * Delete a ExpressRouteAuthorization. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param authorizationName Name of the ExpressRoute Circuit Authorization in the private cloud. + * @param authorizationName Name of the ExpressRoute Circuit Authorization. * @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 long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete( - String resourceGroupName, String privateCloudName, String authorizationName) { + public SyncPoller, Void> beginDelete(String resourceGroupName, String privateCloudName, + String authorizationName) { return this.beginDeleteAsync(resourceGroupName, privateCloudName, authorizationName).getSyncPoller(); } /** - * Delete an ExpressRoute Circuit Authorization in a private cloud. - * + * Delete a ExpressRouteAuthorization. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param authorizationName Name of the ExpressRoute Circuit Authorization in the private cloud. + * @param authorizationName Name of the ExpressRoute Circuit Authorization. * @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. @@ -1002,17 +821,17 @@ public SyncPoller, Void> beginDelete( * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete( - String resourceGroupName, String privateCloudName, String authorizationName, Context context) { + public SyncPoller, Void> beginDelete(String resourceGroupName, String privateCloudName, + String authorizationName, Context context) { return this.beginDeleteAsync(resourceGroupName, privateCloudName, authorizationName, context).getSyncPoller(); } /** - * Delete an ExpressRoute Circuit Authorization in a private cloud. - * + * Delete a ExpressRouteAuthorization. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param authorizationName Name of the ExpressRoute Circuit Authorization in the private cloud. + * @param authorizationName Name of the ExpressRoute Circuit Authorization. * @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. @@ -1020,17 +839,16 @@ public SyncPoller, Void> beginDelete( */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono deleteAsync(String resourceGroupName, String privateCloudName, String authorizationName) { - return beginDeleteAsync(resourceGroupName, privateCloudName, authorizationName) - .last() + return beginDeleteAsync(resourceGroupName, privateCloudName, authorizationName).last() .flatMap(this.client::getLroFinalResultOrError); } /** - * Delete an ExpressRoute Circuit Authorization in a private cloud. - * + * Delete a ExpressRouteAuthorization. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param authorizationName Name of the ExpressRoute Circuit Authorization in the private cloud. + * @param authorizationName Name of the ExpressRoute Circuit Authorization. * @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. @@ -1038,19 +856,18 @@ private Mono deleteAsync(String resourceGroupName, String privateCloudName * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync( - String resourceGroupName, String privateCloudName, String authorizationName, Context context) { - return beginDeleteAsync(resourceGroupName, privateCloudName, authorizationName, context) - .last() + private Mono deleteAsync(String resourceGroupName, String privateCloudName, String authorizationName, + Context context) { + return beginDeleteAsync(resourceGroupName, privateCloudName, authorizationName, context).last() .flatMap(this.client::getLroFinalResultOrError); } /** - * Delete an ExpressRoute Circuit Authorization in a private cloud. - * + * Delete a ExpressRouteAuthorization. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param authorizationName Name of the ExpressRoute Circuit Authorization in the private cloud. + * @param authorizationName Name of the ExpressRoute Circuit Authorization. * @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. @@ -1061,11 +878,11 @@ public void delete(String resourceGroupName, String privateCloudName, String aut } /** - * Delete an ExpressRoute Circuit Authorization in a private cloud. - * + * Delete a ExpressRouteAuthorization. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param authorizationName Name of the ExpressRoute Circuit Authorization in the private cloud. + * @param authorizationName Name of the ExpressRoute Circuit Authorization. * @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. @@ -1078,14 +895,15 @@ public void delete(String resourceGroupName, String privateCloudName, String aut /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * 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 a paged list of ExpressRoute Circuit Authorizations along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * @return the response of a ExpressRouteAuthorization list operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink) { @@ -1093,62 +911,43 @@ private Mono> listNextSinglePageAs 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.")); + 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.listNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + return FluxUtil.withContext(context -> service.listNext(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 URL to get the next list of items - *

The nextLink parameter. + * + * 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 a paged list of ExpressRoute Circuit Authorizations along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * @return the response of a ExpressRouteAuthorization list operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync( - String nextLink, Context context) { + private Mono> listNextSinglePageAsync(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.")); + 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 - .listNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.listNext(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/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/AuthorizationsImpl.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/AuthorizationsImpl.java index 5d117bfbdd200..8c94f4de85a11 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/AuthorizationsImpl.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/AuthorizationsImpl.java @@ -21,34 +21,31 @@ public final class AuthorizationsImpl implements Authorizations { private final com.azure.resourcemanager.avs.AvsManager serviceManager; - public AuthorizationsImpl( - AuthorizationsClient innerClient, com.azure.resourcemanager.avs.AvsManager serviceManager) { + public AuthorizationsImpl(AuthorizationsClient innerClient, + com.azure.resourcemanager.avs.AvsManager serviceManager) { this.innerClient = innerClient; this.serviceManager = serviceManager; } public PagedIterable list(String resourceGroupName, String privateCloudName) { - PagedIterable inner = - this.serviceClient().list(resourceGroupName, privateCloudName); - return Utils.mapPage(inner, inner1 -> new ExpressRouteAuthorizationImpl(inner1, this.manager())); + PagedIterable inner + = this.serviceClient().list(resourceGroupName, privateCloudName); + return ResourceManagerUtils.mapPage(inner, inner1 -> new ExpressRouteAuthorizationImpl(inner1, this.manager())); } - public PagedIterable list( - String resourceGroupName, String privateCloudName, Context context) { - PagedIterable inner = - this.serviceClient().list(resourceGroupName, privateCloudName, context); - return Utils.mapPage(inner, inner1 -> new ExpressRouteAuthorizationImpl(inner1, this.manager())); + public PagedIterable list(String resourceGroupName, String privateCloudName, + Context context) { + PagedIterable inner + = this.serviceClient().list(resourceGroupName, privateCloudName, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new ExpressRouteAuthorizationImpl(inner1, this.manager())); } - public Response getWithResponse( - String resourceGroupName, String privateCloudName, String authorizationName, Context context) { - Response inner = - this.serviceClient().getWithResponse(resourceGroupName, privateCloudName, authorizationName, context); + public Response getWithResponse(String resourceGroupName, String privateCloudName, + String authorizationName, Context context) { + Response inner + = this.serviceClient().getWithResponse(resourceGroupName, privateCloudName, authorizationName, context); if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), new ExpressRouteAuthorizationImpl(inner.getValue(), this.manager())); } else { return null; @@ -56,8 +53,8 @@ public Response getWithResponse( } public ExpressRouteAuthorization get(String resourceGroupName, String privateCloudName, String authorizationName) { - ExpressRouteAuthorizationInner inner = - this.serviceClient().get(resourceGroupName, privateCloudName, authorizationName); + ExpressRouteAuthorizationInner inner + = this.serviceClient().get(resourceGroupName, privateCloudName, authorizationName); if (inner != null) { return new ExpressRouteAuthorizationImpl(inner, this.manager()); } else { @@ -74,109 +71,77 @@ public void delete(String resourceGroupName, String privateCloudName, String aut } public ExpressRouteAuthorization getById(String id) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + String resourceGroupName = ResourceManagerUtils.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))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } - String privateCloudName = Utils.getValueFromIdByName(id, "privateClouds"); + String privateCloudName = ResourceManagerUtils.getValueFromIdByName(id, "privateClouds"); if (privateCloudName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'privateClouds'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'privateClouds'.", id))); } - String authorizationName = Utils.getValueFromIdByName(id, "authorizations"); + String authorizationName = ResourceManagerUtils.getValueFromIdByName(id, "authorizations"); if (authorizationName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'authorizations'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'authorizations'.", id))); } return this.getWithResponse(resourceGroupName, privateCloudName, authorizationName, Context.NONE).getValue(); } public Response getByIdWithResponse(String id, Context context) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + String resourceGroupName = ResourceManagerUtils.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))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } - String privateCloudName = Utils.getValueFromIdByName(id, "privateClouds"); + String privateCloudName = ResourceManagerUtils.getValueFromIdByName(id, "privateClouds"); if (privateCloudName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'privateClouds'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'privateClouds'.", id))); } - String authorizationName = Utils.getValueFromIdByName(id, "authorizations"); + String authorizationName = ResourceManagerUtils.getValueFromIdByName(id, "authorizations"); if (authorizationName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'authorizations'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'authorizations'.", id))); } return this.getWithResponse(resourceGroupName, privateCloudName, authorizationName, context); } public void deleteById(String id) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + String resourceGroupName = ResourceManagerUtils.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))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } - String privateCloudName = Utils.getValueFromIdByName(id, "privateClouds"); + String privateCloudName = ResourceManagerUtils.getValueFromIdByName(id, "privateClouds"); if (privateCloudName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'privateClouds'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'privateClouds'.", id))); } - String authorizationName = Utils.getValueFromIdByName(id, "authorizations"); + String authorizationName = ResourceManagerUtils.getValueFromIdByName(id, "authorizations"); if (authorizationName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'authorizations'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'authorizations'.", id))); } this.delete(resourceGroupName, privateCloudName, authorizationName, Context.NONE); } public void deleteByIdWithResponse(String id, Context context) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + String resourceGroupName = ResourceManagerUtils.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))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } - String privateCloudName = Utils.getValueFromIdByName(id, "privateClouds"); + String privateCloudName = ResourceManagerUtils.getValueFromIdByName(id, "privateClouds"); if (privateCloudName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'privateClouds'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'privateClouds'.", id))); } - String authorizationName = Utils.getValueFromIdByName(id, "authorizations"); + String authorizationName = ResourceManagerUtils.getValueFromIdByName(id, "authorizations"); if (authorizationName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'authorizations'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'authorizations'.", id))); } this.delete(resourceGroupName, privateCloudName, authorizationName, context); } diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/AvsClientBuilder.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/AvsClientBuilder.java index 97c6a654f9ddb..bd5008c70e221 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/AvsClientBuilder.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/AvsClientBuilder.java @@ -14,17 +14,19 @@ import com.azure.core.util.serializer.SerializerAdapter; import java.time.Duration; -/** A builder for creating a new instance of the AvsClientImpl type. */ -@ServiceClientBuilder(serviceClients = {AvsClientImpl.class}) +/** + * A builder for creating a new instance of the AvsClientImpl type. + */ +@ServiceClientBuilder(serviceClients = { AvsClientImpl.class }) public final class AvsClientBuilder { /* - * The ID of the target subscription. + * The ID of the target subscription. The value must be an UUID. */ private String subscriptionId; /** - * Sets The ID of the target subscription. - * + * Sets The ID of the target subscription. The value must be an UUID. + * * @param subscriptionId the subscriptionId value. * @return the AvsClientBuilder. */ @@ -40,7 +42,7 @@ public AvsClientBuilder subscriptionId(String subscriptionId) { /** * Sets server parameter. - * + * * @param endpoint the endpoint value. * @return the AvsClientBuilder. */ @@ -56,7 +58,7 @@ public AvsClientBuilder endpoint(String endpoint) { /** * Sets The environment to connect to. - * + * * @param environment the environment value. * @return the AvsClientBuilder. */ @@ -72,7 +74,7 @@ public AvsClientBuilder environment(AzureEnvironment environment) { /** * Sets The HTTP pipeline to send requests through. - * + * * @param pipeline the pipeline value. * @return the AvsClientBuilder. */ @@ -88,7 +90,7 @@ public AvsClientBuilder pipeline(HttpPipeline pipeline) { /** * Sets The default poll interval for long-running operation. - * + * * @param defaultPollInterval the defaultPollInterval value. * @return the AvsClientBuilder. */ @@ -104,7 +106,7 @@ public AvsClientBuilder defaultPollInterval(Duration defaultPollInterval) { /** * Sets The serializer to serialize an object into a string. - * + * * @param serializerAdapter the serializerAdapter value. * @return the AvsClientBuilder. */ @@ -115,30 +117,20 @@ public AvsClientBuilder serializerAdapter(SerializerAdapter serializerAdapter) { /** * Builds an instance of AvsClientImpl with the provided parameters. - * + * * @return an instance of AvsClientImpl. */ public AvsClientImpl buildClient() { String localEndpoint = (endpoint != null) ? endpoint : "https://management.azure.com"; AzureEnvironment localEnvironment = (environment != null) ? environment : AzureEnvironment.AZURE; - HttpPipeline localPipeline = - (pipeline != null) - ? pipeline - : new HttpPipelineBuilder().policies(new UserAgentPolicy(), new RetryPolicy()).build(); - Duration localDefaultPollInterval = - (defaultPollInterval != null) ? defaultPollInterval : Duration.ofSeconds(30); - SerializerAdapter localSerializerAdapter = - (serializerAdapter != null) - ? serializerAdapter - : SerializerFactory.createDefaultManagementSerializerAdapter(); - AvsClientImpl client = - new AvsClientImpl( - localPipeline, - localSerializerAdapter, - localDefaultPollInterval, - localEnvironment, - this.subscriptionId, - localEndpoint); + HttpPipeline localPipeline = (pipeline != null) ? pipeline + : new HttpPipelineBuilder().policies(new UserAgentPolicy(), new RetryPolicy()).build(); + Duration localDefaultPollInterval + = (defaultPollInterval != null) ? defaultPollInterval : Duration.ofSeconds(30); + SerializerAdapter localSerializerAdapter = (serializerAdapter != null) ? serializerAdapter + : SerializerFactory.createDefaultManagementSerializerAdapter(); + AvsClientImpl client = new AvsClientImpl(localPipeline, localSerializerAdapter, localDefaultPollInterval, + localEnvironment, this.subscriptionId, localEndpoint); return client; } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/AvsClientImpl.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/AvsClientImpl.java index 94709c3fb9b88..b65910b58febb 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/AvsClientImpl.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/AvsClientImpl.java @@ -30,6 +30,7 @@ import com.azure.resourcemanager.avs.fluent.DatastoresClient; import com.azure.resourcemanager.avs.fluent.GlobalReachConnectionsClient; import com.azure.resourcemanager.avs.fluent.HcxEnterpriseSitesClient; +import com.azure.resourcemanager.avs.fluent.IscsiPathsClient; import com.azure.resourcemanager.avs.fluent.LocationsClient; import com.azure.resourcemanager.avs.fluent.OperationsClient; import com.azure.resourcemanager.avs.fluent.PlacementPoliciesClient; @@ -48,317 +49,373 @@ import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; -/** Initializes a new instance of the AvsClientImpl type. */ +/** + * Initializes a new instance of the AvsClientImpl type. + */ @ServiceClient(builder = AvsClientBuilder.class) public final class AvsClientImpl implements AvsClient { - /** The ID of the target subscription. */ + /** + * The ID of the target subscription. The value must be an UUID. + */ private final String subscriptionId; /** - * Gets The ID of the target subscription. - * + * Gets The ID of the target subscription. The value must be an UUID. + * * @return the subscriptionId value. */ public String getSubscriptionId() { return this.subscriptionId; } - /** server parameter. */ + /** + * server parameter. + */ private final String endpoint; /** * Gets server parameter. - * + * * @return the endpoint value. */ public String getEndpoint() { return this.endpoint; } - /** Api Version. */ + /** + * Api Version. + */ private final String apiVersion; /** * Gets Api Version. - * + * * @return the apiVersion value. */ public String getApiVersion() { return this.apiVersion; } - /** The HTTP pipeline to send requests through. */ + /** + * The HTTP pipeline to send requests through. + */ private final HttpPipeline httpPipeline; /** * Gets The HTTP pipeline to send requests through. - * + * * @return the httpPipeline value. */ public HttpPipeline getHttpPipeline() { return this.httpPipeline; } - /** The serializer to serialize an object into a string. */ + /** + * The serializer to serialize an object into a string. + */ private final SerializerAdapter serializerAdapter; /** * Gets The serializer to serialize an object into a string. - * + * * @return the serializerAdapter value. */ SerializerAdapter getSerializerAdapter() { return this.serializerAdapter; } - /** The default poll interval for long-running operation. */ + /** + * The default poll interval for long-running operation. + */ private final Duration defaultPollInterval; /** * Gets The default poll interval for long-running operation. - * + * * @return the defaultPollInterval value. */ public Duration getDefaultPollInterval() { return this.defaultPollInterval; } - /** The OperationsClient object to access its operations. */ + /** + * 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; } - /** The LocationsClient object to access its operations. */ + /** + * The LocationsClient object to access its operations. + */ private final LocationsClient locations; /** * Gets the LocationsClient object to access its operations. - * + * * @return the LocationsClient object. */ public LocationsClient getLocations() { return this.locations; } - /** The PrivateCloudsClient object to access its operations. */ + /** + * The PrivateCloudsClient object to access its operations. + */ private final PrivateCloudsClient privateClouds; /** * Gets the PrivateCloudsClient object to access its operations. - * + * * @return the PrivateCloudsClient object. */ public PrivateCloudsClient getPrivateClouds() { return this.privateClouds; } - /** The ClustersClient object to access its operations. */ + /** + * The AddonsClient object to access its operations. + */ + private final AddonsClient addons; + + /** + * Gets the AddonsClient object to access its operations. + * + * @return the AddonsClient object. + */ + public AddonsClient getAddons() { + return this.addons; + } + + /** + * The AuthorizationsClient object to access its operations. + */ + private final AuthorizationsClient authorizations; + + /** + * Gets the AuthorizationsClient object to access its operations. + * + * @return the AuthorizationsClient object. + */ + public AuthorizationsClient getAuthorizations() { + return this.authorizations; + } + + /** + * The CloudLinksClient object to access its operations. + */ + private final CloudLinksClient cloudLinks; + + /** + * Gets the CloudLinksClient object to access its operations. + * + * @return the CloudLinksClient object. + */ + public CloudLinksClient getCloudLinks() { + return this.cloudLinks; + } + + /** + * The ClustersClient object to access its operations. + */ private final ClustersClient clusters; /** * Gets the ClustersClient object to access its operations. - * + * * @return the ClustersClient object. */ public ClustersClient getClusters() { return this.clusters; } - /** The DatastoresClient object to access its operations. */ + /** + * The DatastoresClient object to access its operations. + */ private final DatastoresClient datastores; /** * Gets the DatastoresClient object to access its operations. - * + * * @return the DatastoresClient object. */ public DatastoresClient getDatastores() { return this.datastores; } - /** The HcxEnterpriseSitesClient object to access its operations. */ - private final HcxEnterpriseSitesClient hcxEnterpriseSites; + /** + * The PlacementPoliciesClient object to access its operations. + */ + private final PlacementPoliciesClient placementPolicies; /** - * Gets the HcxEnterpriseSitesClient object to access its operations. - * - * @return the HcxEnterpriseSitesClient object. + * Gets the PlacementPoliciesClient object to access its operations. + * + * @return the PlacementPoliciesClient object. */ - public HcxEnterpriseSitesClient getHcxEnterpriseSites() { - return this.hcxEnterpriseSites; + public PlacementPoliciesClient getPlacementPolicies() { + return this.placementPolicies; } - /** The AuthorizationsClient object to access its operations. */ - private final AuthorizationsClient authorizations; + /** + * The VirtualMachinesClient object to access its operations. + */ + private final VirtualMachinesClient virtualMachines; /** - * Gets the AuthorizationsClient object to access its operations. - * - * @return the AuthorizationsClient object. + * Gets the VirtualMachinesClient object to access its operations. + * + * @return the VirtualMachinesClient object. */ - public AuthorizationsClient getAuthorizations() { - return this.authorizations; + public VirtualMachinesClient getVirtualMachines() { + return this.virtualMachines; } - /** The GlobalReachConnectionsClient object to access its operations. */ + /** + * The GlobalReachConnectionsClient object to access its operations. + */ private final GlobalReachConnectionsClient globalReachConnections; /** * Gets the GlobalReachConnectionsClient object to access its operations. - * + * * @return the GlobalReachConnectionsClient object. */ public GlobalReachConnectionsClient getGlobalReachConnections() { return this.globalReachConnections; } - /** The WorkloadNetworksClient object to access its operations. */ - private final WorkloadNetworksClient workloadNetworks; - /** - * Gets the WorkloadNetworksClient object to access its operations. - * - * @return the WorkloadNetworksClient object. + * The HcxEnterpriseSitesClient object to access its operations. */ - public WorkloadNetworksClient getWorkloadNetworks() { - return this.workloadNetworks; - } - - /** The CloudLinksClient object to access its operations. */ - private final CloudLinksClient cloudLinks; + private final HcxEnterpriseSitesClient hcxEnterpriseSites; /** - * Gets the CloudLinksClient object to access its operations. - * - * @return the CloudLinksClient object. + * Gets the HcxEnterpriseSitesClient object to access its operations. + * + * @return the HcxEnterpriseSitesClient object. */ - public CloudLinksClient getCloudLinks() { - return this.cloudLinks; + public HcxEnterpriseSitesClient getHcxEnterpriseSites() { + return this.hcxEnterpriseSites; } - /** The AddonsClient object to access its operations. */ - private final AddonsClient addons; - /** - * Gets the AddonsClient object to access its operations. - * - * @return the AddonsClient object. + * The IscsiPathsClient object to access its operations. */ - public AddonsClient getAddons() { - return this.addons; - } - - /** The VirtualMachinesClient object to access its operations. */ - private final VirtualMachinesClient virtualMachines; + private final IscsiPathsClient iscsiPaths; /** - * Gets the VirtualMachinesClient object to access its operations. - * - * @return the VirtualMachinesClient object. + * Gets the IscsiPathsClient object to access its operations. + * + * @return the IscsiPathsClient object. */ - public VirtualMachinesClient getVirtualMachines() { - return this.virtualMachines; + public IscsiPathsClient getIscsiPaths() { + return this.iscsiPaths; } - /** The PlacementPoliciesClient object to access its operations. */ - private final PlacementPoliciesClient placementPolicies; + /** + * The ScriptExecutionsClient object to access its operations. + */ + private final ScriptExecutionsClient scriptExecutions; /** - * Gets the PlacementPoliciesClient object to access its operations. - * - * @return the PlacementPoliciesClient object. + * Gets the ScriptExecutionsClient object to access its operations. + * + * @return the ScriptExecutionsClient object. */ - public PlacementPoliciesClient getPlacementPolicies() { - return this.placementPolicies; + public ScriptExecutionsClient getScriptExecutions() { + return this.scriptExecutions; } - /** The ScriptPackagesClient object to access its operations. */ + /** + * The ScriptPackagesClient object to access its operations. + */ private final ScriptPackagesClient scriptPackages; /** * Gets the ScriptPackagesClient object to access its operations. - * + * * @return the ScriptPackagesClient object. */ public ScriptPackagesClient getScriptPackages() { return this.scriptPackages; } - /** The ScriptCmdletsClient object to access its operations. */ + /** + * The ScriptCmdletsClient object to access its operations. + */ private final ScriptCmdletsClient scriptCmdlets; /** * Gets the ScriptCmdletsClient object to access its operations. - * + * * @return the ScriptCmdletsClient object. */ public ScriptCmdletsClient getScriptCmdlets() { return this.scriptCmdlets; } - /** The ScriptExecutionsClient object to access its operations. */ - private final ScriptExecutionsClient scriptExecutions; + /** + * The WorkloadNetworksClient object to access its operations. + */ + private final WorkloadNetworksClient workloadNetworks; /** - * Gets the ScriptExecutionsClient object to access its operations. - * - * @return the ScriptExecutionsClient object. + * Gets the WorkloadNetworksClient object to access its operations. + * + * @return the WorkloadNetworksClient object. */ - public ScriptExecutionsClient getScriptExecutions() { - return this.scriptExecutions; + public WorkloadNetworksClient getWorkloadNetworks() { + return this.workloadNetworks; } /** * Initializes an instance of AvsClient client. - * + * * @param httpPipeline The HTTP pipeline to send requests through. * @param serializerAdapter The serializer to serialize an object into a string. * @param defaultPollInterval The default poll interval for long-running operation. * @param environment The Azure environment. - * @param subscriptionId The ID of the target subscription. + * @param subscriptionId The ID of the target subscription. The value must be an UUID. * @param endpoint server parameter. */ - AvsClientImpl( - HttpPipeline httpPipeline, - SerializerAdapter serializerAdapter, - Duration defaultPollInterval, - AzureEnvironment environment, - String subscriptionId, - String endpoint) { + AvsClientImpl(HttpPipeline httpPipeline, SerializerAdapter serializerAdapter, Duration defaultPollInterval, + AzureEnvironment environment, String subscriptionId, String endpoint) { this.httpPipeline = httpPipeline; this.serializerAdapter = serializerAdapter; this.defaultPollInterval = defaultPollInterval; this.subscriptionId = subscriptionId; this.endpoint = endpoint; - this.apiVersion = "2023-03-01"; + this.apiVersion = "2023-09-01"; this.operations = new OperationsClientImpl(this); this.locations = new LocationsClientImpl(this); this.privateClouds = new PrivateCloudsClientImpl(this); - this.clusters = new ClustersClientImpl(this); - this.datastores = new DatastoresClientImpl(this); - this.hcxEnterpriseSites = new HcxEnterpriseSitesClientImpl(this); + this.addons = new AddonsClientImpl(this); this.authorizations = new AuthorizationsClientImpl(this); - this.globalReachConnections = new GlobalReachConnectionsClientImpl(this); - this.workloadNetworks = new WorkloadNetworksClientImpl(this); this.cloudLinks = new CloudLinksClientImpl(this); - this.addons = new AddonsClientImpl(this); - this.virtualMachines = new VirtualMachinesClientImpl(this); + this.clusters = new ClustersClientImpl(this); + this.datastores = new DatastoresClientImpl(this); this.placementPolicies = new PlacementPoliciesClientImpl(this); + this.virtualMachines = new VirtualMachinesClientImpl(this); + this.globalReachConnections = new GlobalReachConnectionsClientImpl(this); + this.hcxEnterpriseSites = new HcxEnterpriseSitesClientImpl(this); + this.iscsiPaths = new IscsiPathsClientImpl(this); + this.scriptExecutions = new ScriptExecutionsClientImpl(this); this.scriptPackages = new ScriptPackagesClientImpl(this); this.scriptCmdlets = new ScriptCmdletsClientImpl(this); - this.scriptExecutions = new ScriptExecutionsClientImpl(this); + this.workloadNetworks = new WorkloadNetworksClientImpl(this); } /** * Gets default client context. - * + * * @return the default client context. */ public Context getContext() { @@ -367,7 +424,7 @@ public Context getContext() { /** * Merges default client context with provided context. - * + * * @param context the context to be merged with default client context. * @return the merged context. */ @@ -377,7 +434,7 @@ public Context mergeContext(Context context) { /** * Gets long running operation result. - * + * * @param activationResponse the response of activation operation. * @param httpPipeline the http pipeline. * @param pollResultType type of poll result. @@ -387,26 +444,15 @@ public Context mergeContext(Context context) { * @param type of final result. * @return poller flux for poll result and final result. */ - public PollerFlux, U> getLroResult( - Mono>> activationResponse, - HttpPipeline httpPipeline, - Type pollResultType, - Type finalResultType, - Context context) { - return PollerFactory - .create( - serializerAdapter, - httpPipeline, - pollResultType, - finalResultType, - defaultPollInterval, - activationResponse, - context); + public PollerFlux, U> getLroResult(Mono>> activationResponse, + HttpPipeline httpPipeline, Type pollResultType, Type finalResultType, Context context) { + return PollerFactory.create(serializerAdapter, httpPipeline, pollResultType, finalResultType, + defaultPollInterval, activationResponse, context); } /** * Gets the final result, or an error, based on last async poll response. - * + * * @param response the last async poll response. * @param type of poll result. * @param type of final result. @@ -419,19 +465,16 @@ public Mono getLroFinalResultOrError(AsyncPollResponse, HttpResponse errorResponse = null; PollResult.Error lroError = response.getValue().getError(); if (lroError != null) { - errorResponse = - new HttpResponseImpl( - lroError.getResponseStatusCode(), lroError.getResponseHeaders(), lroError.getResponseBody()); + errorResponse = new HttpResponseImpl(lroError.getResponseStatusCode(), lroError.getResponseHeaders(), + lroError.getResponseBody()); errorMessage = response.getValue().getError().getMessage(); String errorBody = response.getValue().getError().getResponseBody(); if (errorBody != null) { // try to deserialize error body to ManagementError try { - managementError = - this - .getSerializerAdapter() - .deserialize(errorBody, ManagementError.class, SerializerEncoding.JSON); + managementError = this.getSerializerAdapter().deserialize(errorBody, ManagementError.class, + SerializerEncoding.JSON); if (managementError.getCode() == null || managementError.getMessage() == null) { managementError = null; } diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/CloudLinkImpl.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/CloudLinkImpl.java index 7a84a06180cf4..360ab1263c86f 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/CloudLinkImpl.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/CloudLinkImpl.java @@ -4,9 +4,11 @@ package com.azure.resourcemanager.avs.implementation; +import com.azure.core.management.SystemData; import com.azure.core.util.Context; import com.azure.resourcemanager.avs.fluent.models.CloudLinkInner; import com.azure.resourcemanager.avs.models.CloudLink; +import com.azure.resourcemanager.avs.models.CloudLinkProvisioningState; import com.azure.resourcemanager.avs.models.CloudLinkStatus; public final class CloudLinkImpl implements CloudLink, CloudLink.Definition, CloudLink.Update { @@ -26,6 +28,14 @@ public String type() { return this.innerModel().type(); } + public SystemData systemData() { + return this.innerModel().systemData(); + } + + public CloudLinkProvisioningState provisioningState() { + return this.innerModel().provisioningState(); + } + public CloudLinkStatus status() { return this.innerModel().status(); } @@ -59,20 +69,14 @@ public CloudLinkImpl withExistingPrivateCloud(String resourceGroupName, String p } public CloudLink create() { - this.innerObject = - serviceManager - .serviceClient() - .getCloudLinks() - .createOrUpdate(resourceGroupName, privateCloudName, cloudLinkName, this.innerModel(), Context.NONE); + this.innerObject = serviceManager.serviceClient().getCloudLinks().createOrUpdate(resourceGroupName, + privateCloudName, cloudLinkName, this.innerModel(), Context.NONE); return this; } public CloudLink create(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getCloudLinks() - .createOrUpdate(resourceGroupName, privateCloudName, cloudLinkName, this.innerModel(), context); + this.innerObject = serviceManager.serviceClient().getCloudLinks().createOrUpdate(resourceGroupName, + privateCloudName, cloudLinkName, this.innerModel(), context); return this; } @@ -87,48 +91,34 @@ public CloudLinkImpl update() { } public CloudLink apply() { - this.innerObject = - serviceManager - .serviceClient() - .getCloudLinks() - .createOrUpdate(resourceGroupName, privateCloudName, cloudLinkName, this.innerModel(), Context.NONE); + this.innerObject = serviceManager.serviceClient().getCloudLinks().createOrUpdate(resourceGroupName, + privateCloudName, cloudLinkName, this.innerModel(), Context.NONE); return this; } public CloudLink apply(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getCloudLinks() - .createOrUpdate(resourceGroupName, privateCloudName, cloudLinkName, this.innerModel(), context); + this.innerObject = serviceManager.serviceClient().getCloudLinks().createOrUpdate(resourceGroupName, + privateCloudName, cloudLinkName, this.innerModel(), context); return this; } CloudLinkImpl(CloudLinkInner innerObject, com.azure.resourcemanager.avs.AvsManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; - this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups"); - this.privateCloudName = Utils.getValueFromIdByName(innerObject.id(), "privateClouds"); - this.cloudLinkName = Utils.getValueFromIdByName(innerObject.id(), "cloudLinks"); + this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); + this.privateCloudName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "privateClouds"); + this.cloudLinkName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "cloudLinks"); } public CloudLink refresh() { - this.innerObject = - serviceManager - .serviceClient() - .getCloudLinks() - .getWithResponse(resourceGroupName, privateCloudName, cloudLinkName, Context.NONE) - .getValue(); + this.innerObject = serviceManager.serviceClient().getCloudLinks() + .getWithResponse(resourceGroupName, privateCloudName, cloudLinkName, Context.NONE).getValue(); return this; } public CloudLink refresh(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getCloudLinks() - .getWithResponse(resourceGroupName, privateCloudName, cloudLinkName, context) - .getValue(); + this.innerObject = serviceManager.serviceClient().getCloudLinks() + .getWithResponse(resourceGroupName, privateCloudName, cloudLinkName, context).getValue(); return this; } diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/CloudLinksClientImpl.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/CloudLinksClientImpl.java index 515d99d48dbea..13af9a5a349ff 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/CloudLinksClientImpl.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/CloudLinksClientImpl.java @@ -33,27 +33,33 @@ import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.avs.fluent.CloudLinksClient; import com.azure.resourcemanager.avs.fluent.models.CloudLinkInner; -import com.azure.resourcemanager.avs.models.CloudLinkList; +import com.azure.resourcemanager.avs.models.CloudLinkListResult; 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 CloudLinksClient. */ +/** + * An instance of this class provides access to all the operations defined in CloudLinksClient. + */ public final class CloudLinksClientImpl implements CloudLinksClient { - /** The proxy service used to perform REST calls. */ + /** + * The proxy service used to perform REST calls. + */ private final CloudLinksService service; - /** The service client containing this operation class. */ + /** + * The service client containing this operation class. + */ private final AvsClientImpl client; /** * Initializes an instance of CloudLinksClientImpl. - * + * * @param client the instance of the service client containing this operation class. */ CloudLinksClientImpl(AvsClientImpl client) { - this.service = - RestProxy.create(CloudLinksService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.service + = RestProxy.create(CloudLinksService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } @@ -64,100 +70,75 @@ public final class CloudLinksClientImpl implements CloudLinksClient { @Host("{$host}") @ServiceInterface(name = "AvsClientCloudLinks") public interface CloudLinksService { - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/cloudLinks") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/cloudLinks") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono> list(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("privateCloudName") String privateCloudName, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, + @PathParam("privateCloudName") String privateCloudName, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/cloudLinks/{cloudLinkName}") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/cloudLinks/{cloudLinkName}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono> get(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("privateCloudName") String privateCloudName, - @PathParam("cloudLinkName") String cloudLinkName, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + @PathParam("privateCloudName") String privateCloudName, @PathParam("cloudLinkName") String cloudLinkName, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/cloudLinks/{cloudLinkName}") - @ExpectedResponses({200, 201}) + @Headers({ "Content-Type: application/json" }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/cloudLinks/{cloudLinkName}") + @ExpectedResponses({ 200, 201 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createOrUpdate( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono>> createOrUpdate(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("privateCloudName") String privateCloudName, - @PathParam("cloudLinkName") String cloudLinkName, - @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") CloudLinkInner cloudLink, - @HeaderParam("Accept") String accept, + @PathParam("privateCloudName") String privateCloudName, @PathParam("cloudLinkName") String cloudLinkName, + @BodyParam("application/json") CloudLinkInner cloudLink, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Delete( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/cloudLinks/{cloudLinkName}") - @ExpectedResponses({200, 202, 204}) + @Headers({ "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/cloudLinks/{cloudLinkName}") + @ExpectedResponses({ 200, 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono>> delete(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("privateCloudName") String privateCloudName, - @PathParam("cloudLinkName") String cloudLinkName, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + @PathParam("privateCloudName") String privateCloudName, @PathParam("cloudLinkName") String cloudLinkName, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + Mono> listNext(@PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); } /** - * List cloud link in a private cloud. - * + * List CloudLink resources by PrivateCloud. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. * @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 paged list of cloud links along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return the response of a CloudLink list operation along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync(String resourceGroupName, String privateCloudName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -169,54 +150,35 @@ private Mono> listSinglePageAsync(String resourceG } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .list( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - privateCloudName, - this.client.getApiVersion(), - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, 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 cloud link in a private cloud. - * + * List CloudLink resources by PrivateCloud. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. * @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 a paged list of cloud links along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return the response of a CloudLink list operation along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync( - String resourceGroupName, String privateCloudName, Context context) { + private Mono> listSinglePageAsync(String resourceGroupName, String privateCloudName, + Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -229,69 +191,54 @@ private Mono> listSinglePageAsync( final String accept = "application/json"; context = this.client.mergeContext(context); return service - .list( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - privateCloudName, - this.client.getApiVersion(), - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + .list(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, privateCloudName, accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** - * List cloud link in a private cloud. - * + * List CloudLink resources by PrivateCloud. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. * @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 paged list of cloud links as paginated response with {@link PagedFlux}. + * @return the response of a CloudLink list operation as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(String resourceGroupName, String privateCloudName) { - return new PagedFlux<>( - () -> listSinglePageAsync(resourceGroupName, privateCloudName), + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, privateCloudName), nextLink -> listNextSinglePageAsync(nextLink)); } /** - * List cloud link in a private cloud. - * + * List CloudLink resources by PrivateCloud. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. * @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 a paged list of cloud links as paginated response with {@link PagedFlux}. + * @return the response of a CloudLink list operation as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(String resourceGroupName, String privateCloudName, Context context) { - return new PagedFlux<>( - () -> listSinglePageAsync(resourceGroupName, privateCloudName, context), + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, privateCloudName, context), nextLink -> listNextSinglePageAsync(nextLink, context)); } /** - * List cloud link in a private cloud. - * + * List CloudLink resources by PrivateCloud. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. * @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 paged list of cloud links as paginated response with {@link PagedIterable}. + * @return the response of a CloudLink list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(String resourceGroupName, String privateCloudName) { @@ -299,15 +246,15 @@ public PagedIterable list(String resourceGroupName, String priva } /** - * List cloud link in a private cloud. - * + * List CloudLink resources by PrivateCloud. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. * @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 a paged list of cloud links as paginated response with {@link PagedIterable}. + * @return the response of a CloudLink list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(String resourceGroupName, String privateCloudName, Context context) { @@ -315,31 +262,26 @@ public PagedIterable list(String resourceGroupName, String priva } /** - * Get an cloud link by name in a private cloud. - * + * Get a CloudLink. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param cloudLinkName Name of the cloud link resource. + * @param cloudLinkName Name of the cloud link. * @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 an cloud link by name in a private cloud along with {@link Response} on successful completion of {@link - * Mono}. + * @return a CloudLink along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String privateCloudName, String cloudLinkName) { + private Mono> getWithResponseAsync(String resourceGroupName, String privateCloudName, + String cloudLinkName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -354,48 +296,33 @@ private Mono> getWithResponseAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .get( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - privateCloudName, - cloudLinkName, - this.client.getApiVersion(), - accept, - context)) + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, cloudLinkName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Get an cloud link by name in a private cloud. - * + * Get a CloudLink. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param cloudLinkName Name of the cloud link resource. + * @param cloudLinkName Name of the cloud link. * @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 an cloud link by name in a private cloud along with {@link Response} on successful completion of {@link - * Mono}. + * @return a CloudLink along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String privateCloudName, String cloudLinkName, Context context) { + private Mono> getWithResponseAsync(String resourceGroupName, String privateCloudName, + String cloudLinkName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -410,28 +337,20 @@ private Mono> getWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .get( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - privateCloudName, - cloudLinkName, - this.client.getApiVersion(), - accept, - context); + return service.get(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, privateCloudName, cloudLinkName, accept, context); } /** - * Get an cloud link by name in a private cloud. - * + * Get a CloudLink. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param cloudLinkName Name of the cloud link resource. + * @param cloudLinkName Name of the cloud link. * @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 an cloud link by name in a private cloud on successful completion of {@link Mono}. + * @return a CloudLink on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono getAsync(String resourceGroupName, String privateCloudName, String cloudLinkName) { @@ -440,33 +359,33 @@ private Mono getAsync(String resourceGroupName, String privateCl } /** - * Get an cloud link by name in a private cloud. - * + * Get a CloudLink. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param cloudLinkName Name of the cloud link resource. + * @param cloudLinkName Name of the cloud link. * @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 an cloud link by name in a private cloud along with {@link Response}. + * @return a CloudLink along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, String privateCloudName, String cloudLinkName, Context context) { + public Response getWithResponse(String resourceGroupName, String privateCloudName, + String cloudLinkName, Context context) { return getWithResponseAsync(resourceGroupName, privateCloudName, cloudLinkName, context).block(); } /** - * Get an cloud link by name in a private cloud. - * + * Get a CloudLink. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param cloudLinkName Name of the cloud link resource. + * @param cloudLinkName Name of the cloud link. * @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 an cloud link by name in a private cloud. + * @return a CloudLink. */ @ServiceMethod(returns = ReturnType.SINGLE) public CloudLinkInner get(String resourceGroupName, String privateCloudName, String cloudLinkName) { @@ -474,31 +393,27 @@ public CloudLinkInner get(String resourceGroupName, String privateCloudName, Str } /** - * Create or update a cloud link in a private cloud. - * + * Create a CloudLink. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName The name of the private cloud. - * @param cloudLinkName Name of the cloud link resource. - * @param cloudLink A cloud link in the private cloud. + * @param privateCloudName Name of the private cloud. + * @param cloudLinkName Name of the cloud link. + * @param cloudLink Resource create parameters. * @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 cloud link resource along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync( - String resourceGroupName, String privateCloudName, String cloudLinkName, CloudLinkInner cloudLink) { + private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String privateCloudName, String cloudLinkName, CloudLinkInner cloudLink) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -518,29 +433,19 @@ private Mono>> createOrUpdateWithResponseAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .createOrUpdate( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - privateCloudName, - cloudLinkName, - this.client.getApiVersion(), - cloudLink, - accept, - context)) + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, cloudLinkName, cloudLink, accept, + context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Create or update a cloud link in a private cloud. - * + * Create a CloudLink. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName The name of the private cloud. - * @param cloudLinkName Name of the cloud link resource. - * @param cloudLink A cloud link in the private cloud. + * @param privateCloudName Name of the private cloud. + * @param cloudLinkName Name of the cloud link. + * @param cloudLink Resource create parameters. * @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. @@ -548,23 +453,15 @@ private Mono>> createOrUpdateWithResponseAsync( * @return a cloud link resource along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync( - String resourceGroupName, - String privateCloudName, - String cloudLinkName, - CloudLinkInner cloudLink, - Context context) { + private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String privateCloudName, String cloudLinkName, CloudLinkInner cloudLink, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -584,53 +481,39 @@ private Mono>> createOrUpdateWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .createOrUpdate( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - privateCloudName, - cloudLinkName, - this.client.getApiVersion(), - cloudLink, - accept, - context); + return service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, cloudLinkName, cloudLink, accept, + context); } /** - * Create or update a cloud link in a private cloud. - * + * Create a CloudLink. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName The name of the private cloud. - * @param cloudLinkName Name of the cloud link resource. - * @param cloudLink A cloud link in the private cloud. + * @param privateCloudName Name of the private cloud. + * @param cloudLinkName Name of the cloud link. + * @param cloudLink Resource create parameters. * @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 a cloud link resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, CloudLinkInner> beginCreateOrUpdateAsync( - String resourceGroupName, String privateCloudName, String cloudLinkName, CloudLinkInner cloudLink) { - Mono>> mono = - createOrUpdateWithResponseAsync(resourceGroupName, privateCloudName, cloudLinkName, cloudLink); - return this - .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - CloudLinkInner.class, - CloudLinkInner.class, - this.client.getContext()); + private PollerFlux, CloudLinkInner> beginCreateOrUpdateAsync(String resourceGroupName, + String privateCloudName, String cloudLinkName, CloudLinkInner cloudLink) { + Mono>> mono + = createOrUpdateWithResponseAsync(resourceGroupName, privateCloudName, cloudLinkName, cloudLink); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + CloudLinkInner.class, CloudLinkInner.class, this.client.getContext()); } /** - * Create or update a cloud link in a private cloud. - * + * Create a CloudLink. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName The name of the private cloud. - * @param cloudLinkName Name of the cloud link resource. - * @param cloudLink A cloud link in the private cloud. + * @param privateCloudName Name of the private cloud. + * @param cloudLinkName Name of the cloud link. + * @param cloudLink Resource create parameters. * @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. @@ -638,48 +521,41 @@ private PollerFlux, CloudLinkInner> beginCreateOrUpda * @return the {@link PollerFlux} for polling of a cloud link resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, CloudLinkInner> beginCreateOrUpdateAsync( - String resourceGroupName, - String privateCloudName, - String cloudLinkName, - CloudLinkInner cloudLink, - Context context) { + private PollerFlux, CloudLinkInner> beginCreateOrUpdateAsync(String resourceGroupName, + String privateCloudName, String cloudLinkName, CloudLinkInner cloudLink, Context context) { context = this.client.mergeContext(context); - Mono>> mono = - createOrUpdateWithResponseAsync(resourceGroupName, privateCloudName, cloudLinkName, cloudLink, context); - return this - .client - .getLroResult( - mono, this.client.getHttpPipeline(), CloudLinkInner.class, CloudLinkInner.class, context); + Mono>> mono + = createOrUpdateWithResponseAsync(resourceGroupName, privateCloudName, cloudLinkName, cloudLink, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + CloudLinkInner.class, CloudLinkInner.class, context); } /** - * Create or update a cloud link in a private cloud. - * + * Create a CloudLink. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName The name of the private cloud. - * @param cloudLinkName Name of the cloud link resource. - * @param cloudLink A cloud link in the private cloud. + * @param privateCloudName Name of the private cloud. + * @param cloudLinkName Name of the cloud link. + * @param cloudLink Resource create parameters. * @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 a cloud link resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, CloudLinkInner> beginCreateOrUpdate( - String resourceGroupName, String privateCloudName, String cloudLinkName, CloudLinkInner cloudLink) { - return this - .beginCreateOrUpdateAsync(resourceGroupName, privateCloudName, cloudLinkName, cloudLink) + public SyncPoller, CloudLinkInner> beginCreateOrUpdate(String resourceGroupName, + String privateCloudName, String cloudLinkName, CloudLinkInner cloudLink) { + return this.beginCreateOrUpdateAsync(resourceGroupName, privateCloudName, cloudLinkName, cloudLink) .getSyncPoller(); } /** - * Create or update a cloud link in a private cloud. - * + * Create a CloudLink. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName The name of the private cloud. - * @param cloudLinkName Name of the cloud link resource. - * @param cloudLink A cloud link in the private cloud. + * @param privateCloudName Name of the private cloud. + * @param cloudLinkName Name of the cloud link. + * @param cloudLink Resource create parameters. * @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. @@ -687,44 +563,38 @@ public SyncPoller, CloudLinkInner> beginCreateOrUpdat * @return the {@link SyncPoller} for polling of a cloud link resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, CloudLinkInner> beginCreateOrUpdate( - String resourceGroupName, - String privateCloudName, - String cloudLinkName, - CloudLinkInner cloudLink, - Context context) { - return this - .beginCreateOrUpdateAsync(resourceGroupName, privateCloudName, cloudLinkName, cloudLink, context) + public SyncPoller, CloudLinkInner> beginCreateOrUpdate(String resourceGroupName, + String privateCloudName, String cloudLinkName, CloudLinkInner cloudLink, Context context) { + return this.beginCreateOrUpdateAsync(resourceGroupName, privateCloudName, cloudLinkName, cloudLink, context) .getSyncPoller(); } /** - * Create or update a cloud link in a private cloud. - * + * Create a CloudLink. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName The name of the private cloud. - * @param cloudLinkName Name of the cloud link resource. - * @param cloudLink A cloud link in the private cloud. + * @param privateCloudName Name of the private cloud. + * @param cloudLinkName Name of the cloud link. + * @param cloudLink Resource create parameters. * @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 cloud link resource on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync( - String resourceGroupName, String privateCloudName, String cloudLinkName, CloudLinkInner cloudLink) { - return beginCreateOrUpdateAsync(resourceGroupName, privateCloudName, cloudLinkName, cloudLink) - .last() + private Mono createOrUpdateAsync(String resourceGroupName, String privateCloudName, + String cloudLinkName, CloudLinkInner cloudLink) { + return beginCreateOrUpdateAsync(resourceGroupName, privateCloudName, cloudLinkName, cloudLink).last() .flatMap(this.client::getLroFinalResultOrError); } /** - * Create or update a cloud link in a private cloud. - * + * Create a CloudLink. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName The name of the private cloud. - * @param cloudLinkName Name of the cloud link resource. - * @param cloudLink A cloud link in the private cloud. + * @param privateCloudName Name of the private cloud. + * @param cloudLinkName Name of the cloud link. + * @param cloudLink Resource create parameters. * @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. @@ -732,42 +602,37 @@ private Mono createOrUpdateAsync( * @return a cloud link resource on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync( - String resourceGroupName, - String privateCloudName, - String cloudLinkName, - CloudLinkInner cloudLink, - Context context) { - return beginCreateOrUpdateAsync(resourceGroupName, privateCloudName, cloudLinkName, cloudLink, context) - .last() + private Mono createOrUpdateAsync(String resourceGroupName, String privateCloudName, + String cloudLinkName, CloudLinkInner cloudLink, Context context) { + return beginCreateOrUpdateAsync(resourceGroupName, privateCloudName, cloudLinkName, cloudLink, context).last() .flatMap(this.client::getLroFinalResultOrError); } /** - * Create or update a cloud link in a private cloud. - * + * Create a CloudLink. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName The name of the private cloud. - * @param cloudLinkName Name of the cloud link resource. - * @param cloudLink A cloud link in the private cloud. + * @param privateCloudName Name of the private cloud. + * @param cloudLinkName Name of the cloud link. + * @param cloudLink Resource create parameters. * @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 cloud link resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - public CloudLinkInner createOrUpdate( - String resourceGroupName, String privateCloudName, String cloudLinkName, CloudLinkInner cloudLink) { + public CloudLinkInner createOrUpdate(String resourceGroupName, String privateCloudName, String cloudLinkName, + CloudLinkInner cloudLink) { return createOrUpdateAsync(resourceGroupName, privateCloudName, cloudLinkName, cloudLink).block(); } /** - * Create or update a cloud link in a private cloud. - * + * Create a CloudLink. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName The name of the private cloud. - * @param cloudLinkName Name of the cloud link resource. - * @param cloudLink A cloud link in the private cloud. + * @param privateCloudName Name of the private cloud. + * @param cloudLinkName Name of the cloud link. + * @param cloudLink Resource create parameters. * @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. @@ -775,40 +640,32 @@ public CloudLinkInner createOrUpdate( * @return a cloud link resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - public CloudLinkInner createOrUpdate( - String resourceGroupName, - String privateCloudName, - String cloudLinkName, - CloudLinkInner cloudLink, - Context context) { + public CloudLinkInner createOrUpdate(String resourceGroupName, String privateCloudName, String cloudLinkName, + CloudLinkInner cloudLink, Context context) { return createOrUpdateAsync(resourceGroupName, privateCloudName, cloudLinkName, cloudLink, context).block(); } /** - * Delete a cloud link in a private cloud. - * + * Delete a CloudLink. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param cloudLinkName Name of the cloud link resource. + * @param cloudLinkName Name of the cloud link. * @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 privateCloudName, String cloudLinkName) { + private Mono>> deleteWithResponseAsync(String resourceGroupName, String privateCloudName, + String cloudLinkName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -823,27 +680,17 @@ private Mono>> deleteWithResponseAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .delete( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - privateCloudName, - cloudLinkName, - this.client.getApiVersion(), - accept, - context)) + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, cloudLinkName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Delete a cloud link in a private cloud. - * + * Delete a CloudLink. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param cloudLinkName Name of the cloud link resource. + * @param cloudLinkName Name of the cloud link. * @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. @@ -851,19 +698,15 @@ private Mono>> deleteWithResponseAsync( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync( - String resourceGroupName, String privateCloudName, String cloudLinkName, Context context) { + private Mono>> deleteWithResponseAsync(String resourceGroupName, String privateCloudName, + String cloudLinkName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -878,46 +721,36 @@ private Mono>> deleteWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .delete( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - privateCloudName, - cloudLinkName, - this.client.getApiVersion(), - accept, - context); + return service.delete(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, privateCloudName, cloudLinkName, accept, context); } /** - * Delete a cloud link in a private cloud. - * + * Delete a CloudLink. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param cloudLinkName Name of the cloud link resource. + * @param cloudLinkName Name of the cloud link. * @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 long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync( - String resourceGroupName, String privateCloudName, String cloudLinkName) { - Mono>> mono = - deleteWithResponseAsync(resourceGroupName, privateCloudName, cloudLinkName); - return this - .client - .getLroResult( - mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String privateCloudName, + String cloudLinkName) { + Mono>> mono + = deleteWithResponseAsync(resourceGroupName, privateCloudName, cloudLinkName); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); } /** - * Delete a cloud link in a private cloud. - * + * Delete a CloudLink. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param cloudLinkName Name of the cloud link resource. + * @param cloudLinkName Name of the cloud link. * @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. @@ -925,39 +758,38 @@ private PollerFlux, Void> beginDeleteAsync( * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync( - String resourceGroupName, String privateCloudName, String cloudLinkName, Context context) { + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String privateCloudName, + String cloudLinkName, Context context) { context = this.client.mergeContext(context); - Mono>> mono = - deleteWithResponseAsync(resourceGroupName, privateCloudName, cloudLinkName, context); - return this - .client - .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); + Mono>> mono + = deleteWithResponseAsync(resourceGroupName, privateCloudName, cloudLinkName, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + context); } /** - * Delete a cloud link in a private cloud. - * + * Delete a CloudLink. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param cloudLinkName Name of the cloud link resource. + * @param cloudLinkName Name of the cloud link. * @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 long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete( - String resourceGroupName, String privateCloudName, String cloudLinkName) { + public SyncPoller, Void> beginDelete(String resourceGroupName, String privateCloudName, + String cloudLinkName) { return this.beginDeleteAsync(resourceGroupName, privateCloudName, cloudLinkName).getSyncPoller(); } /** - * Delete a cloud link in a private cloud. - * + * Delete a CloudLink. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param cloudLinkName Name of the cloud link resource. + * @param cloudLinkName Name of the cloud link. * @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. @@ -965,17 +797,17 @@ public SyncPoller, Void> beginDelete( * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete( - String resourceGroupName, String privateCloudName, String cloudLinkName, Context context) { + public SyncPoller, Void> beginDelete(String resourceGroupName, String privateCloudName, + String cloudLinkName, Context context) { return this.beginDeleteAsync(resourceGroupName, privateCloudName, cloudLinkName, context).getSyncPoller(); } /** - * Delete a cloud link in a private cloud. - * + * Delete a CloudLink. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param cloudLinkName Name of the cloud link resource. + * @param cloudLinkName Name of the cloud link. * @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. @@ -983,17 +815,16 @@ public SyncPoller, Void> beginDelete( */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono deleteAsync(String resourceGroupName, String privateCloudName, String cloudLinkName) { - return beginDeleteAsync(resourceGroupName, privateCloudName, cloudLinkName) - .last() + return beginDeleteAsync(resourceGroupName, privateCloudName, cloudLinkName).last() .flatMap(this.client::getLroFinalResultOrError); } /** - * Delete a cloud link in a private cloud. - * + * Delete a CloudLink. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param cloudLinkName Name of the cloud link resource. + * @param cloudLinkName Name of the cloud link. * @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. @@ -1001,19 +832,18 @@ private Mono deleteAsync(String resourceGroupName, String privateCloudName * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync( - String resourceGroupName, String privateCloudName, String cloudLinkName, Context context) { - return beginDeleteAsync(resourceGroupName, privateCloudName, cloudLinkName, context) - .last() + private Mono deleteAsync(String resourceGroupName, String privateCloudName, String cloudLinkName, + Context context) { + return beginDeleteAsync(resourceGroupName, privateCloudName, cloudLinkName, context).last() .flatMap(this.client::getLroFinalResultOrError); } /** - * Delete a cloud link in a private cloud. - * + * Delete a CloudLink. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param cloudLinkName Name of the cloud link resource. + * @param cloudLinkName Name of the cloud link. * @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. @@ -1024,11 +854,11 @@ public void delete(String resourceGroupName, String privateCloudName, String clo } /** - * Delete a cloud link in a private cloud. - * + * Delete a CloudLink. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param cloudLinkName Name of the cloud link resource. + * @param cloudLinkName Name of the cloud link. * @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. @@ -1041,13 +871,15 @@ public void delete(String resourceGroupName, String privateCloudName, String clo /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * 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 a paged list of cloud links along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return the response of a CloudLink list operation along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink) { @@ -1055,36 +887,28 @@ private Mono> listNextSinglePageAsync(String nextL 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.")); + 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.listNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + return FluxUtil.withContext(context -> service.listNext(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 URL to get the next list of items - *

The nextLink parameter. + * + * 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 a paged list of cloud links along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return the response of a CloudLink list operation along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink, Context context) { @@ -1092,23 +916,13 @@ private Mono> listNextSinglePageAsync(String nextL 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.")); + 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 - .listNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.listNext(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/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/CloudLinksImpl.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/CloudLinksImpl.java index 15419933382ef..19d66b038bedf 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/CloudLinksImpl.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/CloudLinksImpl.java @@ -28,23 +28,20 @@ public CloudLinksImpl(CloudLinksClient innerClient, com.azure.resourcemanager.av public PagedIterable list(String resourceGroupName, String privateCloudName) { PagedIterable inner = this.serviceClient().list(resourceGroupName, privateCloudName); - return Utils.mapPage(inner, inner1 -> new CloudLinkImpl(inner1, this.manager())); + return ResourceManagerUtils.mapPage(inner, inner1 -> new CloudLinkImpl(inner1, this.manager())); } public PagedIterable list(String resourceGroupName, String privateCloudName, Context context) { PagedIterable inner = this.serviceClient().list(resourceGroupName, privateCloudName, context); - return Utils.mapPage(inner, inner1 -> new CloudLinkImpl(inner1, this.manager())); + return ResourceManagerUtils.mapPage(inner, inner1 -> new CloudLinkImpl(inner1, this.manager())); } - public Response getWithResponse( - String resourceGroupName, String privateCloudName, String cloudLinkName, Context context) { - Response inner = - this.serviceClient().getWithResponse(resourceGroupName, privateCloudName, cloudLinkName, context); + public Response getWithResponse(String resourceGroupName, String privateCloudName, String cloudLinkName, + Context context) { + Response inner + = this.serviceClient().getWithResponse(resourceGroupName, privateCloudName, cloudLinkName, context); if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), new CloudLinkImpl(inner.getValue(), this.manager())); } else { return null; @@ -69,105 +66,77 @@ public void delete(String resourceGroupName, String privateCloudName, String clo } public CloudLink getById(String id) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + String resourceGroupName = ResourceManagerUtils.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))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } - String privateCloudName = Utils.getValueFromIdByName(id, "privateClouds"); + String privateCloudName = ResourceManagerUtils.getValueFromIdByName(id, "privateClouds"); if (privateCloudName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'privateClouds'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'privateClouds'.", id))); } - String cloudLinkName = Utils.getValueFromIdByName(id, "cloudLinks"); + String cloudLinkName = ResourceManagerUtils.getValueFromIdByName(id, "cloudLinks"); if (cloudLinkName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'cloudLinks'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'cloudLinks'.", id))); } return this.getWithResponse(resourceGroupName, privateCloudName, cloudLinkName, Context.NONE).getValue(); } public Response getByIdWithResponse(String id, Context context) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + String resourceGroupName = ResourceManagerUtils.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))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } - String privateCloudName = Utils.getValueFromIdByName(id, "privateClouds"); + String privateCloudName = ResourceManagerUtils.getValueFromIdByName(id, "privateClouds"); if (privateCloudName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'privateClouds'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'privateClouds'.", id))); } - String cloudLinkName = Utils.getValueFromIdByName(id, "cloudLinks"); + String cloudLinkName = ResourceManagerUtils.getValueFromIdByName(id, "cloudLinks"); if (cloudLinkName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'cloudLinks'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'cloudLinks'.", id))); } return this.getWithResponse(resourceGroupName, privateCloudName, cloudLinkName, context); } public void deleteById(String id) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + String resourceGroupName = ResourceManagerUtils.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))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } - String privateCloudName = Utils.getValueFromIdByName(id, "privateClouds"); + String privateCloudName = ResourceManagerUtils.getValueFromIdByName(id, "privateClouds"); if (privateCloudName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'privateClouds'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'privateClouds'.", id))); } - String cloudLinkName = Utils.getValueFromIdByName(id, "cloudLinks"); + String cloudLinkName = ResourceManagerUtils.getValueFromIdByName(id, "cloudLinks"); if (cloudLinkName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'cloudLinks'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'cloudLinks'.", id))); } this.delete(resourceGroupName, privateCloudName, cloudLinkName, Context.NONE); } public void deleteByIdWithResponse(String id, Context context) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + String resourceGroupName = ResourceManagerUtils.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))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } - String privateCloudName = Utils.getValueFromIdByName(id, "privateClouds"); + String privateCloudName = ResourceManagerUtils.getValueFromIdByName(id, "privateClouds"); if (privateCloudName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'privateClouds'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'privateClouds'.", id))); } - String cloudLinkName = Utils.getValueFromIdByName(id, "cloudLinks"); + String cloudLinkName = ResourceManagerUtils.getValueFromIdByName(id, "cloudLinks"); if (cloudLinkName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'cloudLinks'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'cloudLinks'.", id))); } this.delete(resourceGroupName, privateCloudName, cloudLinkName, context); } diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/ClusterImpl.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/ClusterImpl.java index fe62d443f946d..08166c37cab2a 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/ClusterImpl.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/ClusterImpl.java @@ -5,6 +5,7 @@ package com.azure.resourcemanager.avs.implementation; import com.azure.core.http.rest.Response; +import com.azure.core.management.SystemData; import com.azure.core.util.Context; import com.azure.resourcemanager.avs.fluent.models.ClusterInner; import com.azure.resourcemanager.avs.models.Cluster; @@ -36,6 +37,10 @@ public Sku sku() { return this.innerModel().sku(); } + public SystemData systemData() { + return this.innerModel().systemData(); + } + public Integer clusterSize() { return this.innerModel().clusterSize(); } @@ -57,6 +62,10 @@ public List hosts() { } } + public String vsanDatastoreName() { + return this.innerModel().vsanDatastoreName(); + } + public String resourceGroupName() { return resourceGroupName; } @@ -84,20 +93,14 @@ public ClusterImpl withExistingPrivateCloud(String resourceGroupName, String pri } public Cluster create() { - this.innerObject = - serviceManager - .serviceClient() - .getClusters() - .createOrUpdate(resourceGroupName, privateCloudName, clusterName, this.innerModel(), Context.NONE); + this.innerObject = serviceManager.serviceClient().getClusters().createOrUpdate(resourceGroupName, + privateCloudName, clusterName, this.innerModel(), Context.NONE); return this; } public Cluster create(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getClusters() - .createOrUpdate(resourceGroupName, privateCloudName, clusterName, this.innerModel(), context); + this.innerObject = serviceManager.serviceClient().getClusters().createOrUpdate(resourceGroupName, + privateCloudName, clusterName, this.innerModel(), context); return this; } @@ -113,55 +116,40 @@ public ClusterImpl update() { } public Cluster apply() { - this.innerObject = - serviceManager - .serviceClient() - .getClusters() - .update(resourceGroupName, privateCloudName, clusterName, updateClusterUpdate, Context.NONE); + this.innerObject = serviceManager.serviceClient().getClusters().update(resourceGroupName, privateCloudName, + clusterName, updateClusterUpdate, Context.NONE); return this; } public Cluster apply(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getClusters() - .update(resourceGroupName, privateCloudName, clusterName, updateClusterUpdate, context); + this.innerObject = serviceManager.serviceClient().getClusters().update(resourceGroupName, privateCloudName, + clusterName, updateClusterUpdate, context); return this; } ClusterImpl(ClusterInner innerObject, com.azure.resourcemanager.avs.AvsManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; - this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups"); - this.privateCloudName = Utils.getValueFromIdByName(innerObject.id(), "privateClouds"); - this.clusterName = Utils.getValueFromIdByName(innerObject.id(), "clusters"); + this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); + this.privateCloudName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "privateClouds"); + this.clusterName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "clusters"); } public Cluster refresh() { - this.innerObject = - serviceManager - .serviceClient() - .getClusters() - .getWithResponse(resourceGroupName, privateCloudName, clusterName, Context.NONE) - .getValue(); + this.innerObject = serviceManager.serviceClient().getClusters() + .getWithResponse(resourceGroupName, privateCloudName, clusterName, Context.NONE).getValue(); return this; } public Cluster refresh(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getClusters() - .getWithResponse(resourceGroupName, privateCloudName, clusterName, context) - .getValue(); + this.innerObject = serviceManager.serviceClient().getClusters() + .getWithResponse(resourceGroupName, privateCloudName, clusterName, context).getValue(); return this; } public Response listZonesWithResponse(Context context) { - return serviceManager - .clusters() - .listZonesWithResponse(resourceGroupName, privateCloudName, clusterName, context); + return serviceManager.clusters().listZonesWithResponse(resourceGroupName, privateCloudName, clusterName, + context); } public ClusterZoneList listZones() { @@ -169,8 +157,13 @@ public ClusterZoneList listZones() { } public ClusterImpl withSku(Sku sku) { - this.innerModel().withSku(sku); - return this; + if (isInCreateMode()) { + this.innerModel().withSku(sku); + return this; + } else { + this.updateClusterUpdate.withSku(sku); + return this; + } } public ClusterImpl withClusterSize(Integer clusterSize) { @@ -193,6 +186,11 @@ public ClusterImpl withHosts(List hosts) { } } + public ClusterImpl withVsanDatastoreName(String vsanDatastoreName) { + this.innerModel().withVsanDatastoreName(vsanDatastoreName); + return this; + } + private boolean isInCreateMode() { return this.innerModel().id() == null; } diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/ClustersClientImpl.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/ClustersClientImpl.java index 75e836594c119..eb53d56ce8ecd 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/ClustersClientImpl.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/ClustersClientImpl.java @@ -36,23 +36,29 @@ import com.azure.resourcemanager.avs.fluent.ClustersClient; import com.azure.resourcemanager.avs.fluent.models.ClusterInner; import com.azure.resourcemanager.avs.fluent.models.ClusterZoneListInner; -import com.azure.resourcemanager.avs.models.ClusterList; +import com.azure.resourcemanager.avs.models.ClusterListResult; import com.azure.resourcemanager.avs.models.ClusterUpdate; 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 ClustersClient. */ +/** + * An instance of this class provides access to all the operations defined in ClustersClient. + */ public final class ClustersClientImpl implements ClustersClient { - /** The proxy service used to perform REST calls. */ + /** + * The proxy service used to perform REST calls. + */ private final ClustersService service; - /** The service client containing this operation class. */ + /** + * The service client containing this operation class. + */ private final AvsClientImpl client; /** * Initializes an instance of ClustersClientImpl. - * + * * @param client the instance of the service client containing this operation class. */ ClustersClientImpl(AvsClientImpl client) { @@ -67,131 +73,95 @@ public final class ClustersClientImpl implements ClustersClient { @Host("{$host}") @ServiceInterface(name = "AvsClientClusters") public interface ClustersService { - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono> list(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("privateCloudName") String privateCloudName, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, + @PathParam("privateCloudName") String privateCloudName, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters/{clusterName}") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters/{clusterName}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono> get(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("privateCloudName") String privateCloudName, - @PathParam("clusterName") String clusterName, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + @PathParam("privateCloudName") String privateCloudName, @PathParam("clusterName") String clusterName, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters/{clusterName}") - @ExpectedResponses({200, 201}) + @Headers({ "Content-Type: application/json" }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters/{clusterName}") + @ExpectedResponses({ 200, 201 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createOrUpdate( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono>> createOrUpdate(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("privateCloudName") String privateCloudName, - @PathParam("clusterName") String clusterName, - @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") ClusterInner cluster, - @HeaderParam("Accept") String accept, - Context context); + @PathParam("privateCloudName") String privateCloudName, @PathParam("clusterName") String clusterName, + @BodyParam("application/json") ClusterInner cluster, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Patch( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters/{clusterName}") - @ExpectedResponses({200, 201}) + @Headers({ "Content-Type: application/json" }) + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters/{clusterName}") + @ExpectedResponses({ 200, 201 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> update( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono>> update(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("privateCloudName") String privateCloudName, - @PathParam("clusterName") String clusterName, - @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") ClusterUpdate clusterUpdate, - @HeaderParam("Accept") String accept, + @PathParam("privateCloudName") String privateCloudName, @PathParam("clusterName") String clusterName, + @BodyParam("application/json") ClusterUpdate clusterUpdate, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Delete( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters/{clusterName}") - @ExpectedResponses({200, 202, 204}) + @Headers({ "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters/{clusterName}") + @ExpectedResponses({ 200, 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono>> delete(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("privateCloudName") String privateCloudName, - @PathParam("clusterName") String clusterName, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + @PathParam("privateCloudName") String privateCloudName, @PathParam("clusterName") String clusterName, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters/{clusterName}/listZones") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters/{clusterName}/listZones") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listZones( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono> listZones(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("privateCloudName") String privateCloudName, - @PathParam("clusterName") String clusterName, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + @PathParam("privateCloudName") String privateCloudName, @PathParam("clusterName") String clusterName, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + Mono> listNext(@PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); } /** - * List clusters in a private cloud. - * + * List Cluster resources by PrivateCloud. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. * @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 paged list of clusters along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return the response of a Cluster list operation along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync(String resourceGroupName, String privateCloudName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -203,54 +173,35 @@ private Mono> listSinglePageAsync(String resourceGro } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .list( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - privateCloudName, - this.client.getApiVersion(), - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, 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 clusters in a private cloud. - * + * List Cluster resources by PrivateCloud. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. * @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 a paged list of clusters along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return the response of a Cluster list operation along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync( - String resourceGroupName, String privateCloudName, Context context) { + private Mono> listSinglePageAsync(String resourceGroupName, String privateCloudName, + Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -263,69 +214,54 @@ private Mono> listSinglePageAsync( final String accept = "application/json"; context = this.client.mergeContext(context); return service - .list( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - privateCloudName, - this.client.getApiVersion(), - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + .list(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, privateCloudName, accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** - * List clusters in a private cloud. - * + * List Cluster resources by PrivateCloud. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. * @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 paged list of clusters as paginated response with {@link PagedFlux}. + * @return the response of a Cluster list operation as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(String resourceGroupName, String privateCloudName) { - return new PagedFlux<>( - () -> listSinglePageAsync(resourceGroupName, privateCloudName), + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, privateCloudName), nextLink -> listNextSinglePageAsync(nextLink)); } /** - * List clusters in a private cloud. - * + * List Cluster resources by PrivateCloud. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. * @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 a paged list of clusters as paginated response with {@link PagedFlux}. + * @return the response of a Cluster list operation as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(String resourceGroupName, String privateCloudName, Context context) { - return new PagedFlux<>( - () -> listSinglePageAsync(resourceGroupName, privateCloudName, context), + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, privateCloudName, context), nextLink -> listNextSinglePageAsync(nextLink, context)); } /** - * List clusters in a private cloud. - * + * List Cluster resources by PrivateCloud. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. * @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 paged list of clusters as paginated response with {@link PagedIterable}. + * @return the response of a Cluster list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(String resourceGroupName, String privateCloudName) { @@ -333,15 +269,15 @@ public PagedIterable list(String resourceGroupName, String private } /** - * List clusters in a private cloud. - * + * List Cluster resources by PrivateCloud. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. * @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 a paged list of clusters as paginated response with {@link PagedIterable}. + * @return the response of a Cluster list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(String resourceGroupName, String privateCloudName, Context context) { @@ -349,31 +285,26 @@ public PagedIterable list(String resourceGroupName, String private } /** - * Get a cluster by name in a private cloud. - * + * Get a Cluster. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param clusterName Name of the cluster in the private cloud. + * @param clusterName Name of the cluster. * @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 cluster by name in a private cloud along with {@link Response} on successful completion of {@link - * Mono}. + * @return a Cluster along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String privateCloudName, String clusterName) { + private Mono> getWithResponseAsync(String resourceGroupName, String privateCloudName, + String clusterName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -388,48 +319,33 @@ private Mono> getWithResponseAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .get( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - privateCloudName, - clusterName, - this.client.getApiVersion(), - accept, - context)) + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, clusterName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Get a cluster by name in a private cloud. - * + * Get a Cluster. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param clusterName Name of the cluster in the private cloud. + * @param clusterName Name of the cluster. * @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 a cluster by name in a private cloud along with {@link Response} on successful completion of {@link - * Mono}. + * @return a Cluster along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String privateCloudName, String clusterName, Context context) { + private Mono> getWithResponseAsync(String resourceGroupName, String privateCloudName, + String clusterName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -444,28 +360,20 @@ private Mono> getWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .get( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - privateCloudName, - clusterName, - this.client.getApiVersion(), - accept, - context); + return service.get(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, privateCloudName, clusterName, accept, context); } /** - * Get a cluster by name in a private cloud. - * + * Get a Cluster. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param clusterName Name of the cluster in the private cloud. + * @param clusterName Name of the cluster. * @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 cluster by name in a private cloud on successful completion of {@link Mono}. + * @return a Cluster on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono getAsync(String resourceGroupName, String privateCloudName, String clusterName) { @@ -474,33 +382,33 @@ private Mono getAsync(String resourceGroupName, String privateClou } /** - * Get a cluster by name in a private cloud. - * + * Get a Cluster. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param clusterName Name of the cluster in the private cloud. + * @param clusterName Name of the cluster. * @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 a cluster by name in a private cloud along with {@link Response}. + * @return a Cluster along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, String privateCloudName, String clusterName, Context context) { + public Response getWithResponse(String resourceGroupName, String privateCloudName, String clusterName, + Context context) { return getWithResponseAsync(resourceGroupName, privateCloudName, clusterName, context).block(); } /** - * Get a cluster by name in a private cloud. - * + * Get a Cluster. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param clusterName Name of the cluster in the private cloud. + * @param clusterName Name of the cluster. * @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 cluster by name in a private cloud. + * @return a Cluster. */ @ServiceMethod(returns = ReturnType.SINGLE) public ClusterInner get(String resourceGroupName, String privateCloudName, String clusterName) { @@ -508,31 +416,27 @@ public ClusterInner get(String resourceGroupName, String privateCloudName, Strin } /** - * Create or update a cluster in a private cloud. - * + * Create a Cluster. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName The name of the private cloud. - * @param clusterName Name of the cluster in the private cloud. - * @param cluster A cluster in the private cloud. + * @param privateCloudName Name of the private cloud. + * @param clusterName Name of the cluster. + * @param cluster Resource create parameters. * @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 cluster resource along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync( - String resourceGroupName, String privateCloudName, String clusterName, ClusterInner cluster) { + private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String privateCloudName, String clusterName, ClusterInner cluster) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -552,29 +456,19 @@ private Mono>> createOrUpdateWithResponseAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .createOrUpdate( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - privateCloudName, - clusterName, - this.client.getApiVersion(), - cluster, - accept, - context)) + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, clusterName, cluster, accept, + context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Create or update a cluster in a private cloud. - * + * Create a Cluster. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName The name of the private cloud. - * @param clusterName Name of the cluster in the private cloud. - * @param cluster A cluster in the private cloud. + * @param privateCloudName Name of the private cloud. + * @param clusterName Name of the cluster. + * @param cluster Resource create parameters. * @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. @@ -582,19 +476,15 @@ private Mono>> createOrUpdateWithResponseAsync( * @return a cluster resource along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync( - String resourceGroupName, String privateCloudName, String clusterName, ClusterInner cluster, Context context) { + private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String privateCloudName, String clusterName, ClusterInner cluster, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -614,49 +504,39 @@ private Mono>> createOrUpdateWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .createOrUpdate( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - privateCloudName, - clusterName, - this.client.getApiVersion(), - cluster, - accept, - context); + return service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, clusterName, cluster, accept, + context); } /** - * Create or update a cluster in a private cloud. - * + * Create a Cluster. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName The name of the private cloud. - * @param clusterName Name of the cluster in the private cloud. - * @param cluster A cluster in the private cloud. + * @param privateCloudName Name of the private cloud. + * @param clusterName Name of the cluster. + * @param cluster Resource create parameters. * @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 a cluster resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, ClusterInner> beginCreateOrUpdateAsync( - String resourceGroupName, String privateCloudName, String clusterName, ClusterInner cluster) { - Mono>> mono = - createOrUpdateWithResponseAsync(resourceGroupName, privateCloudName, clusterName, cluster); - return this - .client - .getLroResult( - mono, this.client.getHttpPipeline(), ClusterInner.class, ClusterInner.class, this.client.getContext()); + private PollerFlux, ClusterInner> beginCreateOrUpdateAsync(String resourceGroupName, + String privateCloudName, String clusterName, ClusterInner cluster) { + Mono>> mono + = createOrUpdateWithResponseAsync(resourceGroupName, privateCloudName, clusterName, cluster); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + ClusterInner.class, ClusterInner.class, this.client.getContext()); } /** - * Create or update a cluster in a private cloud. - * + * Create a Cluster. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName The name of the private cloud. - * @param clusterName Name of the cluster in the private cloud. - * @param cluster A cluster in the private cloud. + * @param privateCloudName Name of the private cloud. + * @param clusterName Name of the cluster. + * @param cluster Resource create parameters. * @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. @@ -664,42 +544,40 @@ private PollerFlux, ClusterInner> beginCreateOrUpdateAs * @return the {@link PollerFlux} for polling of a cluster resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, ClusterInner> beginCreateOrUpdateAsync( - String resourceGroupName, String privateCloudName, String clusterName, ClusterInner cluster, Context context) { + private PollerFlux, ClusterInner> beginCreateOrUpdateAsync(String resourceGroupName, + String privateCloudName, String clusterName, ClusterInner cluster, Context context) { context = this.client.mergeContext(context); - Mono>> mono = - createOrUpdateWithResponseAsync(resourceGroupName, privateCloudName, clusterName, cluster, context); - return this - .client - .getLroResult( - mono, this.client.getHttpPipeline(), ClusterInner.class, ClusterInner.class, context); + Mono>> mono + = createOrUpdateWithResponseAsync(resourceGroupName, privateCloudName, clusterName, cluster, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + ClusterInner.class, ClusterInner.class, context); } /** - * Create or update a cluster in a private cloud. - * + * Create a Cluster. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName The name of the private cloud. - * @param clusterName Name of the cluster in the private cloud. - * @param cluster A cluster in the private cloud. + * @param privateCloudName Name of the private cloud. + * @param clusterName Name of the cluster. + * @param cluster Resource create parameters. * @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 a cluster resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, ClusterInner> beginCreateOrUpdate( - String resourceGroupName, String privateCloudName, String clusterName, ClusterInner cluster) { + public SyncPoller, ClusterInner> beginCreateOrUpdate(String resourceGroupName, + String privateCloudName, String clusterName, ClusterInner cluster) { return this.beginCreateOrUpdateAsync(resourceGroupName, privateCloudName, clusterName, cluster).getSyncPoller(); } /** - * Create or update a cluster in a private cloud. - * + * Create a Cluster. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName The name of the private cloud. - * @param clusterName Name of the cluster in the private cloud. - * @param cluster A cluster in the private cloud. + * @param privateCloudName Name of the private cloud. + * @param clusterName Name of the cluster. + * @param cluster Resource create parameters. * @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. @@ -707,40 +585,38 @@ public SyncPoller, ClusterInner> beginCreateOrUpdate( * @return the {@link SyncPoller} for polling of a cluster resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, ClusterInner> beginCreateOrUpdate( - String resourceGroupName, String privateCloudName, String clusterName, ClusterInner cluster, Context context) { - return this - .beginCreateOrUpdateAsync(resourceGroupName, privateCloudName, clusterName, cluster, context) + public SyncPoller, ClusterInner> beginCreateOrUpdate(String resourceGroupName, + String privateCloudName, String clusterName, ClusterInner cluster, Context context) { + return this.beginCreateOrUpdateAsync(resourceGroupName, privateCloudName, clusterName, cluster, context) .getSyncPoller(); } /** - * Create or update a cluster in a private cloud. - * + * Create a Cluster. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName The name of the private cloud. - * @param clusterName Name of the cluster in the private cloud. - * @param cluster A cluster in the private cloud. + * @param privateCloudName Name of the private cloud. + * @param clusterName Name of the cluster. + * @param cluster Resource create parameters. * @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 cluster resource on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync( - String resourceGroupName, String privateCloudName, String clusterName, ClusterInner cluster) { - return beginCreateOrUpdateAsync(resourceGroupName, privateCloudName, clusterName, cluster) - .last() + private Mono createOrUpdateAsync(String resourceGroupName, String privateCloudName, + String clusterName, ClusterInner cluster) { + return beginCreateOrUpdateAsync(resourceGroupName, privateCloudName, clusterName, cluster).last() .flatMap(this.client::getLroFinalResultOrError); } /** - * Create or update a cluster in a private cloud. - * + * Create a Cluster. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName The name of the private cloud. - * @param clusterName Name of the cluster in the private cloud. - * @param cluster A cluster in the private cloud. + * @param privateCloudName Name of the private cloud. + * @param clusterName Name of the cluster. + * @param cluster Resource create parameters. * @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. @@ -748,38 +624,37 @@ private Mono createOrUpdateAsync( * @return a cluster resource on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync( - String resourceGroupName, String privateCloudName, String clusterName, ClusterInner cluster, Context context) { - return beginCreateOrUpdateAsync(resourceGroupName, privateCloudName, clusterName, cluster, context) - .last() + private Mono createOrUpdateAsync(String resourceGroupName, String privateCloudName, + String clusterName, ClusterInner cluster, Context context) { + return beginCreateOrUpdateAsync(resourceGroupName, privateCloudName, clusterName, cluster, context).last() .flatMap(this.client::getLroFinalResultOrError); } /** - * Create or update a cluster in a private cloud. - * + * Create a Cluster. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName The name of the private cloud. - * @param clusterName Name of the cluster in the private cloud. - * @param cluster A cluster in the private cloud. + * @param privateCloudName Name of the private cloud. + * @param clusterName Name of the cluster. + * @param cluster Resource create parameters. * @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 cluster resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ClusterInner createOrUpdate( - String resourceGroupName, String privateCloudName, String clusterName, ClusterInner cluster) { + public ClusterInner createOrUpdate(String resourceGroupName, String privateCloudName, String clusterName, + ClusterInner cluster) { return createOrUpdateAsync(resourceGroupName, privateCloudName, clusterName, cluster).block(); } /** - * Create or update a cluster in a private cloud. - * + * Create a Cluster. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName The name of the private cloud. - * @param clusterName Name of the cluster in the private cloud. - * @param cluster A cluster in the private cloud. + * @param privateCloudName Name of the private cloud. + * @param clusterName Name of the cluster. + * @param cluster Resource create parameters. * @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. @@ -787,17 +662,17 @@ public ClusterInner createOrUpdate( * @return a cluster resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ClusterInner createOrUpdate( - String resourceGroupName, String privateCloudName, String clusterName, ClusterInner cluster, Context context) { + public ClusterInner createOrUpdate(String resourceGroupName, String privateCloudName, String clusterName, + ClusterInner cluster, Context context) { return createOrUpdateAsync(resourceGroupName, privateCloudName, clusterName, cluster, context).block(); } /** - * Update a cluster in a private cloud. - * + * Update a Cluster. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param clusterName Name of the cluster in the private cloud. + * @param clusterName Name of the cluster. * @param clusterUpdate The cluster properties to be updated. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -805,19 +680,15 @@ public ClusterInner createOrUpdate( * @return a cluster resource along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateWithResponseAsync( - String resourceGroupName, String privateCloudName, String clusterName, ClusterUpdate clusterUpdate) { + private Mono>> updateWithResponseAsync(String resourceGroupName, String privateCloudName, + String clusterName, ClusterUpdate clusterUpdate) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -837,28 +708,18 @@ private Mono>> updateWithResponseAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .update( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - privateCloudName, - clusterName, - this.client.getApiVersion(), - clusterUpdate, - accept, - context)) + .withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, clusterName, clusterUpdate, + accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Update a cluster in a private cloud. - * + * Update a Cluster. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param clusterName Name of the cluster in the private cloud. + * @param clusterName Name of the cluster. * @param clusterUpdate The cluster properties to be updated. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -867,23 +728,15 @@ private Mono>> updateWithResponseAsync( * @return a cluster resource along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateWithResponseAsync( - String resourceGroupName, - String privateCloudName, - String clusterName, - ClusterUpdate clusterUpdate, - Context context) { + private Mono>> updateWithResponseAsync(String resourceGroupName, String privateCloudName, + String clusterName, ClusterUpdate clusterUpdate, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -903,25 +756,16 @@ private Mono>> updateWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .update( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - privateCloudName, - clusterName, - this.client.getApiVersion(), - clusterUpdate, - accept, - context); + return service.update(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, privateCloudName, clusterName, clusterUpdate, accept, context); } /** - * Update a cluster in a private cloud. - * + * Update a Cluster. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param clusterName Name of the cluster in the private cloud. + * @param clusterName Name of the cluster. * @param clusterUpdate The cluster properties to be updated. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -929,22 +773,20 @@ private Mono>> updateWithResponseAsync( * @return the {@link PollerFlux} for polling of a cluster resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, ClusterInner> beginUpdateAsync( - String resourceGroupName, String privateCloudName, String clusterName, ClusterUpdate clusterUpdate) { - Mono>> mono = - updateWithResponseAsync(resourceGroupName, privateCloudName, clusterName, clusterUpdate); - return this - .client - .getLroResult( - mono, this.client.getHttpPipeline(), ClusterInner.class, ClusterInner.class, this.client.getContext()); + private PollerFlux, ClusterInner> beginUpdateAsync(String resourceGroupName, + String privateCloudName, String clusterName, ClusterUpdate clusterUpdate) { + Mono>> mono + = updateWithResponseAsync(resourceGroupName, privateCloudName, clusterName, clusterUpdate); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + ClusterInner.class, ClusterInner.class, this.client.getContext()); } /** - * Update a cluster in a private cloud. - * + * Update a Cluster. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param clusterName Name of the cluster in the private cloud. + * @param clusterName Name of the cluster. * @param clusterUpdate The cluster properties to be updated. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -953,27 +795,21 @@ private PollerFlux, ClusterInner> beginUpdateAsync( * @return the {@link PollerFlux} for polling of a cluster resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, ClusterInner> beginUpdateAsync( - String resourceGroupName, - String privateCloudName, - String clusterName, - ClusterUpdate clusterUpdate, - Context context) { + private PollerFlux, ClusterInner> beginUpdateAsync(String resourceGroupName, + String privateCloudName, String clusterName, ClusterUpdate clusterUpdate, Context context) { context = this.client.mergeContext(context); - Mono>> mono = - updateWithResponseAsync(resourceGroupName, privateCloudName, clusterName, clusterUpdate, context); - return this - .client - .getLroResult( - mono, this.client.getHttpPipeline(), ClusterInner.class, ClusterInner.class, context); + Mono>> mono + = updateWithResponseAsync(resourceGroupName, privateCloudName, clusterName, clusterUpdate, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + ClusterInner.class, ClusterInner.class, context); } /** - * Update a cluster in a private cloud. - * + * Update a Cluster. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param clusterName Name of the cluster in the private cloud. + * @param clusterName Name of the cluster. * @param clusterUpdate The cluster properties to be updated. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -981,17 +817,17 @@ private PollerFlux, ClusterInner> beginUpdateAsync( * @return the {@link SyncPoller} for polling of a cluster resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, ClusterInner> beginUpdate( - String resourceGroupName, String privateCloudName, String clusterName, ClusterUpdate clusterUpdate) { + public SyncPoller, ClusterInner> beginUpdate(String resourceGroupName, + String privateCloudName, String clusterName, ClusterUpdate clusterUpdate) { return this.beginUpdateAsync(resourceGroupName, privateCloudName, clusterName, clusterUpdate).getSyncPoller(); } /** - * Update a cluster in a private cloud. - * + * Update a Cluster. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param clusterName Name of the cluster in the private cloud. + * @param clusterName Name of the cluster. * @param clusterUpdate The cluster properties to be updated. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1000,23 +836,18 @@ public SyncPoller, ClusterInner> beginUpdate( * @return the {@link SyncPoller} for polling of a cluster resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, ClusterInner> beginUpdate( - String resourceGroupName, - String privateCloudName, - String clusterName, - ClusterUpdate clusterUpdate, - Context context) { - return this - .beginUpdateAsync(resourceGroupName, privateCloudName, clusterName, clusterUpdate, context) + public SyncPoller, ClusterInner> beginUpdate(String resourceGroupName, + String privateCloudName, String clusterName, ClusterUpdate clusterUpdate, Context context) { + return this.beginUpdateAsync(resourceGroupName, privateCloudName, clusterName, clusterUpdate, context) .getSyncPoller(); } /** - * Update a cluster in a private cloud. - * + * Update a Cluster. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param clusterName Name of the cluster in the private cloud. + * @param clusterName Name of the cluster. * @param clusterUpdate The cluster properties to be updated. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1024,19 +855,18 @@ public SyncPoller, ClusterInner> beginUpdate( * @return a cluster resource on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync( - String resourceGroupName, String privateCloudName, String clusterName, ClusterUpdate clusterUpdate) { - return beginUpdateAsync(resourceGroupName, privateCloudName, clusterName, clusterUpdate) - .last() + private Mono updateAsync(String resourceGroupName, String privateCloudName, String clusterName, + ClusterUpdate clusterUpdate) { + return beginUpdateAsync(resourceGroupName, privateCloudName, clusterName, clusterUpdate).last() .flatMap(this.client::getLroFinalResultOrError); } /** - * Update a cluster in a private cloud. - * + * Update a Cluster. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param clusterName Name of the cluster in the private cloud. + * @param clusterName Name of the cluster. * @param clusterUpdate The cluster properties to be updated. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1045,23 +875,18 @@ private Mono updateAsync( * @return a cluster resource on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync( - String resourceGroupName, - String privateCloudName, - String clusterName, - ClusterUpdate clusterUpdate, - Context context) { - return beginUpdateAsync(resourceGroupName, privateCloudName, clusterName, clusterUpdate, context) - .last() + private Mono updateAsync(String resourceGroupName, String privateCloudName, String clusterName, + ClusterUpdate clusterUpdate, Context context) { + return beginUpdateAsync(resourceGroupName, privateCloudName, clusterName, clusterUpdate, context).last() .flatMap(this.client::getLroFinalResultOrError); } /** - * Update a cluster in a private cloud. - * + * Update a Cluster. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param clusterName Name of the cluster in the private cloud. + * @param clusterName Name of the cluster. * @param clusterUpdate The cluster properties to be updated. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1069,17 +894,17 @@ private Mono updateAsync( * @return a cluster resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ClusterInner update( - String resourceGroupName, String privateCloudName, String clusterName, ClusterUpdate clusterUpdate) { + public ClusterInner update(String resourceGroupName, String privateCloudName, String clusterName, + ClusterUpdate clusterUpdate) { return updateAsync(resourceGroupName, privateCloudName, clusterName, clusterUpdate).block(); } /** - * Update a cluster in a private cloud. - * + * Update a Cluster. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param clusterName Name of the cluster in the private cloud. + * @param clusterName Name of the cluster. * @param clusterUpdate The cluster properties to be updated. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1088,40 +913,32 @@ public ClusterInner update( * @return a cluster resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ClusterInner update( - String resourceGroupName, - String privateCloudName, - String clusterName, - ClusterUpdate clusterUpdate, - Context context) { + public ClusterInner update(String resourceGroupName, String privateCloudName, String clusterName, + ClusterUpdate clusterUpdate, Context context) { return updateAsync(resourceGroupName, privateCloudName, clusterName, clusterUpdate, context).block(); } /** - * Delete a cluster in a private cloud. - * + * Delete a Cluster. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param clusterName Name of the cluster in the private cloud. + * @param clusterName Name of the cluster. * @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 privateCloudName, String clusterName) { + private Mono>> deleteWithResponseAsync(String resourceGroupName, String privateCloudName, + String clusterName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1136,27 +953,17 @@ private Mono>> deleteWithResponseAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .delete( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - privateCloudName, - clusterName, - this.client.getApiVersion(), - accept, - context)) + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, clusterName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Delete a cluster in a private cloud. - * + * Delete a Cluster. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param clusterName Name of the cluster in the private cloud. + * @param clusterName Name of the cluster. * @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. @@ -1164,19 +971,15 @@ private Mono>> deleteWithResponseAsync( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync( - String resourceGroupName, String privateCloudName, String clusterName, Context context) { + private Mono>> deleteWithResponseAsync(String resourceGroupName, String privateCloudName, + String clusterName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1191,46 +994,36 @@ private Mono>> deleteWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .delete( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - privateCloudName, - clusterName, - this.client.getApiVersion(), - accept, - context); + return service.delete(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, privateCloudName, clusterName, accept, context); } /** - * Delete a cluster in a private cloud. - * + * Delete a Cluster. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param clusterName Name of the cluster in the private cloud. + * @param clusterName Name of the cluster. * @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 long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync( - String resourceGroupName, String privateCloudName, String clusterName) { - Mono>> mono = - deleteWithResponseAsync(resourceGroupName, privateCloudName, clusterName); - return this - .client - .getLroResult( - mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String privateCloudName, + String clusterName) { + Mono>> mono + = deleteWithResponseAsync(resourceGroupName, privateCloudName, clusterName); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); } /** - * Delete a cluster in a private cloud. - * + * Delete a Cluster. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param clusterName Name of the cluster in the private cloud. + * @param clusterName Name of the cluster. * @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. @@ -1238,39 +1031,38 @@ private PollerFlux, Void> beginDeleteAsync( * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync( - String resourceGroupName, String privateCloudName, String clusterName, Context context) { + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String privateCloudName, + String clusterName, Context context) { context = this.client.mergeContext(context); - Mono>> mono = - deleteWithResponseAsync(resourceGroupName, privateCloudName, clusterName, context); - return this - .client - .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); + Mono>> mono + = deleteWithResponseAsync(resourceGroupName, privateCloudName, clusterName, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + context); } /** - * Delete a cluster in a private cloud. - * + * Delete a Cluster. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param clusterName Name of the cluster in the private cloud. + * @param clusterName Name of the cluster. * @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 long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete( - String resourceGroupName, String privateCloudName, String clusterName) { + public SyncPoller, Void> beginDelete(String resourceGroupName, String privateCloudName, + String clusterName) { return this.beginDeleteAsync(resourceGroupName, privateCloudName, clusterName).getSyncPoller(); } /** - * Delete a cluster in a private cloud. - * + * Delete a Cluster. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param clusterName Name of the cluster in the private cloud. + * @param clusterName Name of the cluster. * @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. @@ -1278,17 +1070,17 @@ public SyncPoller, Void> beginDelete( * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete( - String resourceGroupName, String privateCloudName, String clusterName, Context context) { + public SyncPoller, Void> beginDelete(String resourceGroupName, String privateCloudName, + String clusterName, Context context) { return this.beginDeleteAsync(resourceGroupName, privateCloudName, clusterName, context).getSyncPoller(); } /** - * Delete a cluster in a private cloud. - * + * Delete a Cluster. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param clusterName Name of the cluster in the private cloud. + * @param clusterName Name of the cluster. * @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. @@ -1296,17 +1088,16 @@ public SyncPoller, Void> beginDelete( */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono deleteAsync(String resourceGroupName, String privateCloudName, String clusterName) { - return beginDeleteAsync(resourceGroupName, privateCloudName, clusterName) - .last() + return beginDeleteAsync(resourceGroupName, privateCloudName, clusterName).last() .flatMap(this.client::getLroFinalResultOrError); } /** - * Delete a cluster in a private cloud. - * + * Delete a Cluster. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param clusterName Name of the cluster in the private cloud. + * @param clusterName Name of the cluster. * @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. @@ -1314,19 +1105,18 @@ private Mono deleteAsync(String resourceGroupName, String privateCloudName * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync( - String resourceGroupName, String privateCloudName, String clusterName, Context context) { - return beginDeleteAsync(resourceGroupName, privateCloudName, clusterName, context) - .last() + private Mono deleteAsync(String resourceGroupName, String privateCloudName, String clusterName, + Context context) { + return beginDeleteAsync(resourceGroupName, privateCloudName, clusterName, context).last() .flatMap(this.client::getLroFinalResultOrError); } /** - * Delete a cluster in a private cloud. - * + * Delete a Cluster. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param clusterName Name of the cluster in the private cloud. + * @param clusterName Name of the cluster. * @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. @@ -1337,11 +1127,11 @@ public void delete(String resourceGroupName, String privateCloudName, String clu } /** - * Delete a cluster in a private cloud. - * + * Delete a Cluster. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param clusterName Name of the cluster in the private cloud. + * @param clusterName Name of the cluster. * @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. @@ -1354,30 +1144,26 @@ public void delete(String resourceGroupName, String privateCloudName, String clu /** * List hosts by zone in a cluster. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param clusterName Name of the cluster in the private cloud. + * @param clusterName Name of the cluster. * @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 all zones and associated hosts for a cluster along with {@link Response} on successful completion - * of {@link Mono}. + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listZonesWithResponseAsync( - String resourceGroupName, String privateCloudName, String clusterName) { + private Mono> listZonesWithResponseAsync(String resourceGroupName, + String privateCloudName, String clusterName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1392,48 +1178,34 @@ private Mono> listZonesWithResponseAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .listZones( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - privateCloudName, - clusterName, - this.client.getApiVersion(), - accept, - context)) + .withContext(context -> service.listZones(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, clusterName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * List hosts by zone in a cluster. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param clusterName Name of the cluster in the private cloud. + * @param clusterName Name of the cluster. * @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 all zones and associated hosts for a cluster along with {@link Response} on successful completion - * of {@link Mono}. + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listZonesWithResponseAsync( - String resourceGroupName, String privateCloudName, String clusterName, Context context) { + private Mono> listZonesWithResponseAsync(String resourceGroupName, + String privateCloudName, String clusterName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1448,42 +1220,34 @@ private Mono> listZonesWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .listZones( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - privateCloudName, - clusterName, - this.client.getApiVersion(), - accept, - context); + return service.listZones(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, clusterName, accept, context); } /** * List hosts by zone in a cluster. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param clusterName Name of the cluster in the private cloud. + * @param clusterName Name of the cluster. * @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 all zones and associated hosts for a cluster on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono listZonesAsync( - String resourceGroupName, String privateCloudName, String clusterName) { + private Mono listZonesAsync(String resourceGroupName, String privateCloudName, + String clusterName) { return listZonesWithResponseAsync(resourceGroupName, privateCloudName, clusterName) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** * List hosts by zone in a cluster. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param clusterName Name of the cluster in the private cloud. + * @param clusterName Name of the cluster. * @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. @@ -1491,17 +1255,17 @@ private Mono listZonesAsync( * @return list of all zones and associated hosts for a cluster along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response listZonesWithResponse( - String resourceGroupName, String privateCloudName, String clusterName, Context context) { + public Response listZonesWithResponse(String resourceGroupName, String privateCloudName, + String clusterName, Context context) { return listZonesWithResponseAsync(resourceGroupName, privateCloudName, clusterName, context).block(); } /** * List hosts by zone in a cluster. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param clusterName Name of the cluster in the private cloud. + * @param clusterName Name of the cluster. * @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. @@ -1514,13 +1278,15 @@ public ClusterZoneListInner listZones(String resourceGroupName, String privateCl /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * 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 a paged list of clusters along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return the response of a Cluster list operation along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink) { @@ -1528,36 +1294,28 @@ private Mono> listNextSinglePageAsync(String nextLin 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.")); + 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.listNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + return FluxUtil.withContext(context -> service.listNext(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 URL to get the next list of items - *

The nextLink parameter. + * + * 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 a paged list of clusters along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return the response of a Cluster list operation along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink, Context context) { @@ -1565,23 +1323,13 @@ private Mono> listNextSinglePageAsync(String nextLin 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.")); + 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 - .listNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.listNext(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/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/ClustersImpl.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/ClustersImpl.java index 3f768a5c6164e..74dfa673057aa 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/ClustersImpl.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/ClustersImpl.java @@ -30,23 +30,20 @@ public ClustersImpl(ClustersClient innerClient, com.azure.resourcemanager.avs.Av public PagedIterable list(String resourceGroupName, String privateCloudName) { PagedIterable inner = this.serviceClient().list(resourceGroupName, privateCloudName); - return Utils.mapPage(inner, inner1 -> new ClusterImpl(inner1, this.manager())); + return ResourceManagerUtils.mapPage(inner, inner1 -> new ClusterImpl(inner1, this.manager())); } public PagedIterable list(String resourceGroupName, String privateCloudName, Context context) { PagedIterable inner = this.serviceClient().list(resourceGroupName, privateCloudName, context); - return Utils.mapPage(inner, inner1 -> new ClusterImpl(inner1, this.manager())); + return ResourceManagerUtils.mapPage(inner, inner1 -> new ClusterImpl(inner1, this.manager())); } - public Response getWithResponse( - String resourceGroupName, String privateCloudName, String clusterName, Context context) { - Response inner = - this.serviceClient().getWithResponse(resourceGroupName, privateCloudName, clusterName, context); + public Response getWithResponse(String resourceGroupName, String privateCloudName, String clusterName, + Context context) { + Response inner + = this.serviceClient().getWithResponse(resourceGroupName, privateCloudName, clusterName, context); if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), new ClusterImpl(inner.getValue(), this.manager())); } else { return null; @@ -70,15 +67,12 @@ public void delete(String resourceGroupName, String privateCloudName, String clu this.serviceClient().delete(resourceGroupName, privateCloudName, clusterName, context); } - public Response listZonesWithResponse( - String resourceGroupName, String privateCloudName, String clusterName, Context context) { - Response inner = - this.serviceClient().listZonesWithResponse(resourceGroupName, privateCloudName, clusterName, context); + public Response listZonesWithResponse(String resourceGroupName, String privateCloudName, + String clusterName, Context context) { + Response inner + = this.serviceClient().listZonesWithResponse(resourceGroupName, privateCloudName, clusterName, context); if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), new ClusterZoneListImpl(inner.getValue(), this.manager())); } else { return null; @@ -95,105 +89,77 @@ public ClusterZoneList listZones(String resourceGroupName, String privateCloudNa } public Cluster getById(String id) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + String resourceGroupName = ResourceManagerUtils.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))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } - String privateCloudName = Utils.getValueFromIdByName(id, "privateClouds"); + String privateCloudName = ResourceManagerUtils.getValueFromIdByName(id, "privateClouds"); if (privateCloudName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'privateClouds'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'privateClouds'.", id))); } - String clusterName = Utils.getValueFromIdByName(id, "clusters"); + String clusterName = ResourceManagerUtils.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))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'clusters'.", id))); } return this.getWithResponse(resourceGroupName, privateCloudName, clusterName, Context.NONE).getValue(); } public Response getByIdWithResponse(String id, Context context) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + String resourceGroupName = ResourceManagerUtils.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))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } - String privateCloudName = Utils.getValueFromIdByName(id, "privateClouds"); + String privateCloudName = ResourceManagerUtils.getValueFromIdByName(id, "privateClouds"); if (privateCloudName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'privateClouds'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'privateClouds'.", id))); } - String clusterName = Utils.getValueFromIdByName(id, "clusters"); + String clusterName = ResourceManagerUtils.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))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'clusters'.", id))); } return this.getWithResponse(resourceGroupName, privateCloudName, clusterName, context); } public void deleteById(String id) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + String resourceGroupName = ResourceManagerUtils.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))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } - String privateCloudName = Utils.getValueFromIdByName(id, "privateClouds"); + String privateCloudName = ResourceManagerUtils.getValueFromIdByName(id, "privateClouds"); if (privateCloudName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'privateClouds'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'privateClouds'.", id))); } - String clusterName = Utils.getValueFromIdByName(id, "clusters"); + String clusterName = ResourceManagerUtils.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))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'clusters'.", id))); } this.delete(resourceGroupName, privateCloudName, clusterName, Context.NONE); } public void deleteByIdWithResponse(String id, Context context) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + String resourceGroupName = ResourceManagerUtils.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))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } - String privateCloudName = Utils.getValueFromIdByName(id, "privateClouds"); + String privateCloudName = ResourceManagerUtils.getValueFromIdByName(id, "privateClouds"); if (privateCloudName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'privateClouds'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'privateClouds'.", id))); } - String clusterName = Utils.getValueFromIdByName(id, "clusters"); + String clusterName = ResourceManagerUtils.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))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'clusters'.", id))); } this.delete(resourceGroupName, privateCloudName, clusterName, context); } diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/DatastoreImpl.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/DatastoreImpl.java index 4a6f2fd3fdfa6..7cb9f4c0b682a 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/DatastoreImpl.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/DatastoreImpl.java @@ -4,12 +4,14 @@ package com.azure.resourcemanager.avs.implementation; +import com.azure.core.management.SystemData; import com.azure.core.util.Context; import com.azure.resourcemanager.avs.fluent.models.DatastoreInner; import com.azure.resourcemanager.avs.models.Datastore; import com.azure.resourcemanager.avs.models.DatastoreProvisioningState; import com.azure.resourcemanager.avs.models.DatastoreStatus; import com.azure.resourcemanager.avs.models.DiskPoolVolume; +import com.azure.resourcemanager.avs.models.ElasticSanVolume; import com.azure.resourcemanager.avs.models.NetAppVolume; public final class DatastoreImpl implements Datastore, Datastore.Definition, Datastore.Update { @@ -29,6 +31,10 @@ public String type() { return this.innerModel().type(); } + public SystemData systemData() { + return this.innerModel().systemData(); + } + public DatastoreProvisioningState provisioningState() { return this.innerModel().provisioningState(); } @@ -41,6 +47,10 @@ public DiskPoolVolume diskPoolVolume() { return this.innerModel().diskPoolVolume(); } + public ElasticSanVolume elasticSanVolume() { + return this.innerModel().elasticSanVolume(); + } + public DatastoreStatus status() { return this.innerModel().status(); } @@ -73,22 +83,14 @@ public DatastoreImpl withExistingCluster(String resourceGroupName, String privat } public Datastore create() { - this.innerObject = - serviceManager - .serviceClient() - .getDatastores() - .createOrUpdate( - resourceGroupName, privateCloudName, clusterName, datastoreName, this.innerModel(), Context.NONE); + this.innerObject = serviceManager.serviceClient().getDatastores().createOrUpdate(resourceGroupName, + privateCloudName, clusterName, datastoreName, this.innerModel(), Context.NONE); return this; } public Datastore create(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getDatastores() - .createOrUpdate( - resourceGroupName, privateCloudName, clusterName, datastoreName, this.innerModel(), context); + this.innerObject = serviceManager.serviceClient().getDatastores().createOrUpdate(resourceGroupName, + privateCloudName, clusterName, datastoreName, this.innerModel(), context); return this; } @@ -103,51 +105,35 @@ public DatastoreImpl update() { } public Datastore apply() { - this.innerObject = - serviceManager - .serviceClient() - .getDatastores() - .createOrUpdate( - resourceGroupName, privateCloudName, clusterName, datastoreName, this.innerModel(), Context.NONE); + this.innerObject = serviceManager.serviceClient().getDatastores().createOrUpdate(resourceGroupName, + privateCloudName, clusterName, datastoreName, this.innerModel(), Context.NONE); return this; } public Datastore apply(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getDatastores() - .createOrUpdate( - resourceGroupName, privateCloudName, clusterName, datastoreName, this.innerModel(), context); + this.innerObject = serviceManager.serviceClient().getDatastores().createOrUpdate(resourceGroupName, + privateCloudName, clusterName, datastoreName, this.innerModel(), context); return this; } DatastoreImpl(DatastoreInner innerObject, com.azure.resourcemanager.avs.AvsManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; - this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups"); - this.privateCloudName = Utils.getValueFromIdByName(innerObject.id(), "privateClouds"); - this.clusterName = Utils.getValueFromIdByName(innerObject.id(), "clusters"); - this.datastoreName = Utils.getValueFromIdByName(innerObject.id(), "datastores"); + this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); + this.privateCloudName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "privateClouds"); + this.clusterName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "clusters"); + this.datastoreName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "datastores"); } public Datastore refresh() { - this.innerObject = - serviceManager - .serviceClient() - .getDatastores() - .getWithResponse(resourceGroupName, privateCloudName, clusterName, datastoreName, Context.NONE) - .getValue(); + this.innerObject = serviceManager.serviceClient().getDatastores() + .getWithResponse(resourceGroupName, privateCloudName, clusterName, datastoreName, Context.NONE).getValue(); return this; } public Datastore refresh(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getDatastores() - .getWithResponse(resourceGroupName, privateCloudName, clusterName, datastoreName, context) - .getValue(); + this.innerObject = serviceManager.serviceClient().getDatastores() + .getWithResponse(resourceGroupName, privateCloudName, clusterName, datastoreName, context).getValue(); return this; } @@ -160,4 +146,9 @@ public DatastoreImpl withDiskPoolVolume(DiskPoolVolume diskPoolVolume) { this.innerModel().withDiskPoolVolume(diskPoolVolume); return this; } + + public DatastoreImpl withElasticSanVolume(ElasticSanVolume elasticSanVolume) { + this.innerModel().withElasticSanVolume(elasticSanVolume); + return this; + } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/DatastoresClientImpl.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/DatastoresClientImpl.java index 353260f531b99..3d0e85dd28856 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/DatastoresClientImpl.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/DatastoresClientImpl.java @@ -33,27 +33,33 @@ import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.avs.fluent.DatastoresClient; import com.azure.resourcemanager.avs.fluent.models.DatastoreInner; -import com.azure.resourcemanager.avs.models.DatastoreList; +import com.azure.resourcemanager.avs.models.DatastoreListResult; 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 DatastoresClient. */ +/** + * An instance of this class provides access to all the operations defined in DatastoresClient. + */ public final class DatastoresClientImpl implements DatastoresClient { - /** The proxy service used to perform REST calls. */ + /** + * The proxy service used to perform REST calls. + */ private final DatastoresService service; - /** The service client containing this operation class. */ + /** + * The service client containing this operation class. + */ private final AvsClientImpl client; /** * Initializes an instance of DatastoresClientImpl. - * + * * @param client the instance of the service client containing this operation class. */ DatastoresClientImpl(AvsClientImpl client) { - this.service = - RestProxy.create(DatastoresService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.service + = RestProxy.create(DatastoresService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } @@ -64,106 +70,77 @@ public final class DatastoresClientImpl implements DatastoresClient { @Host("{$host}") @ServiceInterface(name = "AvsClientDatastores") public interface DatastoresService { - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters/{clusterName}/datastores") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters/{clusterName}/datastores") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono> list(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("privateCloudName") String privateCloudName, - @PathParam("clusterName") String clusterName, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + @PathParam("privateCloudName") String privateCloudName, @PathParam("clusterName") String clusterName, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters/{clusterName}/datastores/{datastoreName}") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters/{clusterName}/datastores/{datastoreName}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono> get(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("privateCloudName") String privateCloudName, - @PathParam("clusterName") String clusterName, - @PathParam("datastoreName") String datastoreName, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + @PathParam("privateCloudName") String privateCloudName, @PathParam("clusterName") String clusterName, + @PathParam("datastoreName") String datastoreName, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters/{clusterName}/datastores/{datastoreName}") - @ExpectedResponses({200, 201}) + @Headers({ "Content-Type: application/json" }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters/{clusterName}/datastores/{datastoreName}") + @ExpectedResponses({ 200, 201 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createOrUpdate( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono>> createOrUpdate(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("privateCloudName") String privateCloudName, - @PathParam("clusterName") String clusterName, - @PathParam("datastoreName") String datastoreName, - @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") DatastoreInner datastore, - @HeaderParam("Accept") String accept, - Context context); + @PathParam("privateCloudName") String privateCloudName, @PathParam("clusterName") String clusterName, + @PathParam("datastoreName") String datastoreName, @BodyParam("application/json") DatastoreInner datastore, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Delete( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters/{clusterName}/datastores/{datastoreName}") - @ExpectedResponses({200, 202, 204}) + @Headers({ "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters/{clusterName}/datastores/{datastoreName}") + @ExpectedResponses({ 200, 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono>> delete(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("privateCloudName") String privateCloudName, - @PathParam("clusterName") String clusterName, - @PathParam("datastoreName") String datastoreName, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + @PathParam("privateCloudName") String privateCloudName, @PathParam("clusterName") String clusterName, + @PathParam("datastoreName") String datastoreName, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + Mono> listNext(@PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); } /** - * List datastores in a private cloud cluster. - * + * List Datastore resources by Cluster. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param clusterName Name of the cluster in the private cloud. + * @param clusterName Name of the cluster. * @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 paged list of datastores along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return the response of a Datastore list operation along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync( - String resourceGroupName, String privateCloudName, String clusterName) { + private Mono> listSinglePageAsync(String resourceGroupName, String privateCloudName, + String clusterName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -178,56 +155,36 @@ private Mono> listSinglePageAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .list( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - privateCloudName, - clusterName, - this.client.getApiVersion(), - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, clusterName, 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 datastores in a private cloud cluster. - * + * List Datastore resources by Cluster. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param clusterName Name of the cluster in the private cloud. + * @param clusterName Name of the cluster. * @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 a paged list of datastores along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return the response of a Datastore list operation along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync( - String resourceGroupName, String privateCloudName, String clusterName, Context context) { + private Mono> listSinglePageAsync(String resourceGroupName, String privateCloudName, + String clusterName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -243,74 +200,58 @@ private Mono> listSinglePageAsync( final String accept = "application/json"; context = this.client.mergeContext(context); return service - .list( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - privateCloudName, - clusterName, - this.client.getApiVersion(), - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + .list(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, privateCloudName, clusterName, accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** - * List datastores in a private cloud cluster. - * + * List Datastore resources by Cluster. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param clusterName Name of the cluster in the private cloud. + * @param clusterName Name of the cluster. * @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 paged list of datastores as paginated response with {@link PagedFlux}. + * @return the response of a Datastore list operation as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(String resourceGroupName, String privateCloudName, String clusterName) { - return new PagedFlux<>( - () -> listSinglePageAsync(resourceGroupName, privateCloudName, clusterName), + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, privateCloudName, clusterName), nextLink -> listNextSinglePageAsync(nextLink)); } /** - * List datastores in a private cloud cluster. - * + * List Datastore resources by Cluster. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param clusterName Name of the cluster in the private cloud. + * @param clusterName Name of the cluster. * @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 a paged list of datastores as paginated response with {@link PagedFlux}. + * @return the response of a Datastore list operation as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync( - String resourceGroupName, String privateCloudName, String clusterName, Context context) { - return new PagedFlux<>( - () -> listSinglePageAsync(resourceGroupName, privateCloudName, clusterName, context), + private PagedFlux listAsync(String resourceGroupName, String privateCloudName, String clusterName, + Context context) { + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, privateCloudName, clusterName, context), nextLink -> listNextSinglePageAsync(nextLink, context)); } /** - * List datastores in a private cloud cluster. - * + * List Datastore resources by Cluster. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param clusterName Name of the cluster in the private cloud. + * @param clusterName Name of the cluster. * @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 paged list of datastores as paginated response with {@link PagedIterable}. + * @return the response of a Datastore list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(String resourceGroupName, String privateCloudName, String clusterName) { @@ -318,50 +259,45 @@ public PagedIterable list(String resourceGroupName, String priva } /** - * List datastores in a private cloud cluster. - * + * List Datastore resources by Cluster. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param clusterName Name of the cluster in the private cloud. + * @param clusterName Name of the cluster. * @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 a paged list of datastores as paginated response with {@link PagedIterable}. + * @return the response of a Datastore list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list( - String resourceGroupName, String privateCloudName, String clusterName, Context context) { + public PagedIterable list(String resourceGroupName, String privateCloudName, String clusterName, + Context context) { return new PagedIterable<>(listAsync(resourceGroupName, privateCloudName, clusterName, context)); } /** - * Get a datastore in a private cloud cluster. - * + * Get a Datastore. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param clusterName Name of the cluster in the private cloud. - * @param datastoreName Name of the datastore in the private cloud cluster. + * @param clusterName Name of the cluster. + * @param datastoreName Name of the datastore. * @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 datastore in a private cloud cluster along with {@link Response} on successful completion of {@link - * Mono}. + * @return a Datastore along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String privateCloudName, String clusterName, String datastoreName) { + private Mono> getWithResponseAsync(String resourceGroupName, String privateCloudName, + String clusterName, String datastoreName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -379,50 +315,35 @@ private Mono> getWithResponseAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .get( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - privateCloudName, - clusterName, - datastoreName, - this.client.getApiVersion(), - accept, - context)) + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, clusterName, datastoreName, + accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Get a datastore in a private cloud cluster. - * + * Get a Datastore. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param clusterName Name of the cluster in the private cloud. - * @param datastoreName Name of the datastore in the private cloud cluster. + * @param clusterName Name of the cluster. + * @param datastoreName Name of the datastore. * @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 a datastore in a private cloud cluster along with {@link Response} on successful completion of {@link - * Mono}. + * @return a Datastore along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String privateCloudName, String clusterName, String datastoreName, Context context) { + private Mono> getWithResponseAsync(String resourceGroupName, String privateCloudName, + String clusterName, String datastoreName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -440,107 +361,90 @@ private Mono> getWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .get( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - privateCloudName, - clusterName, - datastoreName, - this.client.getApiVersion(), - accept, - context); + return service.get(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, privateCloudName, clusterName, datastoreName, accept, context); } /** - * Get a datastore in a private cloud cluster. - * + * Get a Datastore. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param clusterName Name of the cluster in the private cloud. - * @param datastoreName Name of the datastore in the private cloud cluster. + * @param clusterName Name of the cluster. + * @param datastoreName Name of the datastore. * @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 datastore in a private cloud cluster on successful completion of {@link Mono}. + * @return a Datastore on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync( - String resourceGroupName, String privateCloudName, String clusterName, String datastoreName) { + private Mono getAsync(String resourceGroupName, String privateCloudName, String clusterName, + String datastoreName) { return getWithResponseAsync(resourceGroupName, privateCloudName, clusterName, datastoreName) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** - * Get a datastore in a private cloud cluster. - * + * Get a Datastore. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param clusterName Name of the cluster in the private cloud. - * @param datastoreName Name of the datastore in the private cloud cluster. + * @param clusterName Name of the cluster. + * @param datastoreName Name of the datastore. * @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 a datastore in a private cloud cluster along with {@link Response}. + * @return a Datastore along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, String privateCloudName, String clusterName, String datastoreName, Context context) { + public Response getWithResponse(String resourceGroupName, String privateCloudName, + String clusterName, String datastoreName, Context context) { return getWithResponseAsync(resourceGroupName, privateCloudName, clusterName, datastoreName, context).block(); } /** - * Get a datastore in a private cloud cluster. - * + * Get a Datastore. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param clusterName Name of the cluster in the private cloud. - * @param datastoreName Name of the datastore in the private cloud cluster. + * @param clusterName Name of the cluster. + * @param datastoreName Name of the datastore. * @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 datastore in a private cloud cluster. + * @return a Datastore. */ @ServiceMethod(returns = ReturnType.SINGLE) - public DatastoreInner get( - String resourceGroupName, String privateCloudName, String clusterName, String datastoreName) { + public DatastoreInner get(String resourceGroupName, String privateCloudName, String clusterName, + String datastoreName) { return getWithResponse(resourceGroupName, privateCloudName, clusterName, datastoreName, Context.NONE) .getValue(); } /** - * Create or update a datastore in a private cloud cluster. - * + * Create a Datastore. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param clusterName Name of the cluster in the private cloud. - * @param datastoreName Name of the datastore in the private cloud cluster. - * @param datastore A datastore in a private cloud cluster. + * @param clusterName Name of the cluster. + * @param datastoreName Name of the datastore. + * @param datastore Resource create parameters. * @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 datastore resource along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync( - String resourceGroupName, - String privateCloudName, - String clusterName, - String datastoreName, - DatastoreInner datastore) { + private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String privateCloudName, String clusterName, String datastoreName, DatastoreInner datastore) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -563,31 +467,20 @@ private Mono>> createOrUpdateWithResponseAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .createOrUpdate( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - privateCloudName, - clusterName, - datastoreName, - this.client.getApiVersion(), - datastore, - accept, - context)) + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, clusterName, datastoreName, + datastore, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Create or update a datastore in a private cloud cluster. - * + * Create a Datastore. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param clusterName Name of the cluster in the private cloud. - * @param datastoreName Name of the datastore in the private cloud cluster. - * @param datastore A datastore in a private cloud cluster. + * @param clusterName Name of the cluster. + * @param datastoreName Name of the datastore. + * @param datastore Resource create parameters. * @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. @@ -595,24 +488,15 @@ private Mono>> createOrUpdateWithResponseAsync( * @return a datastore resource along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync( - String resourceGroupName, - String privateCloudName, - String clusterName, - String datastoreName, - DatastoreInner datastore, - Context context) { + private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String privateCloudName, String clusterName, String datastoreName, DatastoreInner datastore, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -635,60 +519,41 @@ private Mono>> createOrUpdateWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .createOrUpdate( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - privateCloudName, - clusterName, - datastoreName, - this.client.getApiVersion(), - datastore, - accept, - context); + return service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, clusterName, datastoreName, datastore, + accept, context); } /** - * Create or update a datastore in a private cloud cluster. - * + * Create a Datastore. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param clusterName Name of the cluster in the private cloud. - * @param datastoreName Name of the datastore in the private cloud cluster. - * @param datastore A datastore in a private cloud cluster. + * @param clusterName Name of the cluster. + * @param datastoreName Name of the datastore. + * @param datastore Resource create parameters. * @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 a datastore resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, DatastoreInner> beginCreateOrUpdateAsync( - String resourceGroupName, - String privateCloudName, - String clusterName, - String datastoreName, - DatastoreInner datastore) { - Mono>> mono = - createOrUpdateWithResponseAsync(resourceGroupName, privateCloudName, clusterName, datastoreName, datastore); - return this - .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - DatastoreInner.class, - DatastoreInner.class, - this.client.getContext()); + private PollerFlux, DatastoreInner> beginCreateOrUpdateAsync(String resourceGroupName, + String privateCloudName, String clusterName, String datastoreName, DatastoreInner datastore) { + Mono>> mono = createOrUpdateWithResponseAsync(resourceGroupName, privateCloudName, + clusterName, datastoreName, datastore); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + DatastoreInner.class, DatastoreInner.class, this.client.getContext()); } /** - * Create or update a datastore in a private cloud cluster. - * + * Create a Datastore. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param clusterName Name of the cluster in the private cloud. - * @param datastoreName Name of the datastore in the private cloud cluster. - * @param datastore A datastore in a private cloud cluster. + * @param clusterName Name of the cluster. + * @param datastoreName Name of the datastore. + * @param datastore Resource create parameters. * @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. @@ -696,56 +561,43 @@ private PollerFlux, DatastoreInner> beginCreateOrUpda * @return the {@link PollerFlux} for polling of a datastore resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, DatastoreInner> beginCreateOrUpdateAsync( - String resourceGroupName, - String privateCloudName, - String clusterName, - String datastoreName, - DatastoreInner datastore, - Context context) { + private PollerFlux, DatastoreInner> beginCreateOrUpdateAsync(String resourceGroupName, + String privateCloudName, String clusterName, String datastoreName, DatastoreInner datastore, Context context) { context = this.client.mergeContext(context); - Mono>> mono = - createOrUpdateWithResponseAsync( - resourceGroupName, privateCloudName, clusterName, datastoreName, datastore, context); - return this - .client - .getLroResult( - mono, this.client.getHttpPipeline(), DatastoreInner.class, DatastoreInner.class, context); + Mono>> mono = createOrUpdateWithResponseAsync(resourceGroupName, privateCloudName, + clusterName, datastoreName, datastore, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + DatastoreInner.class, DatastoreInner.class, context); } /** - * Create or update a datastore in a private cloud cluster. - * + * Create a Datastore. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param clusterName Name of the cluster in the private cloud. - * @param datastoreName Name of the datastore in the private cloud cluster. - * @param datastore A datastore in a private cloud cluster. + * @param clusterName Name of the cluster. + * @param datastoreName Name of the datastore. + * @param datastore Resource create parameters. * @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 a datastore resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, DatastoreInner> beginCreateOrUpdate( - String resourceGroupName, - String privateCloudName, - String clusterName, - String datastoreName, - DatastoreInner datastore) { - return this - .beginCreateOrUpdateAsync(resourceGroupName, privateCloudName, clusterName, datastoreName, datastore) + public SyncPoller, DatastoreInner> beginCreateOrUpdate(String resourceGroupName, + String privateCloudName, String clusterName, String datastoreName, DatastoreInner datastore) { + return this.beginCreateOrUpdateAsync(resourceGroupName, privateCloudName, clusterName, datastoreName, datastore) .getSyncPoller(); } /** - * Create or update a datastore in a private cloud cluster. - * + * Create a Datastore. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param clusterName Name of the cluster in the private cloud. - * @param datastoreName Name of the datastore in the private cloud cluster. - * @param datastore A datastore in a private cloud cluster. + * @param clusterName Name of the cluster. + * @param datastoreName Name of the datastore. + * @param datastore Resource create parameters. * @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. @@ -753,52 +605,40 @@ public SyncPoller, DatastoreInner> beginCreateOrUpdat * @return the {@link SyncPoller} for polling of a datastore resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, DatastoreInner> beginCreateOrUpdate( - String resourceGroupName, - String privateCloudName, - String clusterName, - String datastoreName, - DatastoreInner datastore, - Context context) { - return this - .beginCreateOrUpdateAsync( - resourceGroupName, privateCloudName, clusterName, datastoreName, datastore, context) - .getSyncPoller(); + public SyncPoller, DatastoreInner> beginCreateOrUpdate(String resourceGroupName, + String privateCloudName, String clusterName, String datastoreName, DatastoreInner datastore, Context context) { + return this.beginCreateOrUpdateAsync(resourceGroupName, privateCloudName, clusterName, datastoreName, datastore, + context).getSyncPoller(); } /** - * Create or update a datastore in a private cloud cluster. - * + * Create a Datastore. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param clusterName Name of the cluster in the private cloud. - * @param datastoreName Name of the datastore in the private cloud cluster. - * @param datastore A datastore in a private cloud cluster. + * @param clusterName Name of the cluster. + * @param datastoreName Name of the datastore. + * @param datastore Resource create parameters. * @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 datastore resource on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync( - String resourceGroupName, - String privateCloudName, - String clusterName, - String datastoreName, - DatastoreInner datastore) { + private Mono createOrUpdateAsync(String resourceGroupName, String privateCloudName, + String clusterName, String datastoreName, DatastoreInner datastore) { return beginCreateOrUpdateAsync(resourceGroupName, privateCloudName, clusterName, datastoreName, datastore) - .last() - .flatMap(this.client::getLroFinalResultOrError); + .last().flatMap(this.client::getLroFinalResultOrError); } /** - * Create or update a datastore in a private cloud cluster. - * + * Create a Datastore. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param clusterName Name of the cluster in the private cloud. - * @param datastoreName Name of the datastore in the private cloud cluster. - * @param datastore A datastore in a private cloud cluster. + * @param clusterName Name of the cluster. + * @param datastoreName Name of the datastore. + * @param datastore Resource create parameters. * @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. @@ -806,50 +646,39 @@ private Mono createOrUpdateAsync( * @return a datastore resource on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync( - String resourceGroupName, - String privateCloudName, - String clusterName, - String datastoreName, - DatastoreInner datastore, - Context context) { - return beginCreateOrUpdateAsync( - resourceGroupName, privateCloudName, clusterName, datastoreName, datastore, context) - .last() - .flatMap(this.client::getLroFinalResultOrError); + private Mono createOrUpdateAsync(String resourceGroupName, String privateCloudName, + String clusterName, String datastoreName, DatastoreInner datastore, Context context) { + return beginCreateOrUpdateAsync(resourceGroupName, privateCloudName, clusterName, datastoreName, datastore, + context).last().flatMap(this.client::getLroFinalResultOrError); } /** - * Create or update a datastore in a private cloud cluster. - * + * Create a Datastore. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param clusterName Name of the cluster in the private cloud. - * @param datastoreName Name of the datastore in the private cloud cluster. - * @param datastore A datastore in a private cloud cluster. + * @param clusterName Name of the cluster. + * @param datastoreName Name of the datastore. + * @param datastore Resource create parameters. * @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 datastore resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - public DatastoreInner createOrUpdate( - String resourceGroupName, - String privateCloudName, - String clusterName, - String datastoreName, - DatastoreInner datastore) { + public DatastoreInner createOrUpdate(String resourceGroupName, String privateCloudName, String clusterName, + String datastoreName, DatastoreInner datastore) { return createOrUpdateAsync(resourceGroupName, privateCloudName, clusterName, datastoreName, datastore).block(); } /** - * Create or update a datastore in a private cloud cluster. - * + * Create a Datastore. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param clusterName Name of the cluster in the private cloud. - * @param datastoreName Name of the datastore in the private cloud cluster. - * @param datastore A datastore in a private cloud cluster. + * @param clusterName Name of the cluster. + * @param datastoreName Name of the datastore. + * @param datastore Resource create parameters. * @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. @@ -857,43 +686,34 @@ public DatastoreInner createOrUpdate( * @return a datastore resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - public DatastoreInner createOrUpdate( - String resourceGroupName, - String privateCloudName, - String clusterName, - String datastoreName, - DatastoreInner datastore, - Context context) { + public DatastoreInner createOrUpdate(String resourceGroupName, String privateCloudName, String clusterName, + String datastoreName, DatastoreInner datastore, Context context) { return createOrUpdateAsync(resourceGroupName, privateCloudName, clusterName, datastoreName, datastore, context) .block(); } /** - * Delete a datastore in a private cloud cluster. - * + * Delete a Datastore. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param clusterName Name of the cluster in the private cloud. - * @param datastoreName Name of the datastore in the private cloud cluster. + * @param clusterName Name of the cluster. + * @param datastoreName Name of the datastore. * @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 privateCloudName, String clusterName, String datastoreName) { + private Mono>> deleteWithResponseAsync(String resourceGroupName, String privateCloudName, + String clusterName, String datastoreName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -911,29 +731,19 @@ private Mono>> deleteWithResponseAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .delete( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - privateCloudName, - clusterName, - datastoreName, - this.client.getApiVersion(), - accept, - context)) + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, clusterName, datastoreName, + accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Delete a datastore in a private cloud cluster. - * + * Delete a Datastore. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param clusterName Name of the cluster in the private cloud. - * @param datastoreName Name of the datastore in the private cloud cluster. + * @param clusterName Name of the cluster. + * @param datastoreName Name of the datastore. * @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. @@ -941,19 +751,15 @@ private Mono>> deleteWithResponseAsync( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync( - String resourceGroupName, String privateCloudName, String clusterName, String datastoreName, Context context) { + private Mono>> deleteWithResponseAsync(String resourceGroupName, String privateCloudName, + String clusterName, String datastoreName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -971,49 +777,38 @@ private Mono>> deleteWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .delete( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - privateCloudName, - clusterName, - datastoreName, - this.client.getApiVersion(), - accept, - context); + return service.delete(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, privateCloudName, clusterName, datastoreName, accept, context); } /** - * Delete a datastore in a private cloud cluster. - * + * Delete a Datastore. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param clusterName Name of the cluster in the private cloud. - * @param datastoreName Name of the datastore in the private cloud cluster. + * @param clusterName Name of the cluster. + * @param datastoreName Name of the datastore. * @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 long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync( - String resourceGroupName, String privateCloudName, String clusterName, String datastoreName) { - Mono>> mono = - deleteWithResponseAsync(resourceGroupName, privateCloudName, clusterName, datastoreName); - return this - .client - .getLroResult( - mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String privateCloudName, + String clusterName, String datastoreName) { + Mono>> mono + = deleteWithResponseAsync(resourceGroupName, privateCloudName, clusterName, datastoreName); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); } /** - * Delete a datastore in a private cloud cluster. - * + * Delete a Datastore. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param clusterName Name of the cluster in the private cloud. - * @param datastoreName Name of the datastore in the private cloud cluster. + * @param clusterName Name of the cluster. + * @param datastoreName Name of the datastore. * @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. @@ -1021,41 +816,40 @@ private PollerFlux, Void> beginDeleteAsync( * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync( - String resourceGroupName, String privateCloudName, String clusterName, String datastoreName, Context context) { + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String privateCloudName, + String clusterName, String datastoreName, Context context) { context = this.client.mergeContext(context); - Mono>> mono = - deleteWithResponseAsync(resourceGroupName, privateCloudName, clusterName, datastoreName, context); - return this - .client - .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); + Mono>> mono + = deleteWithResponseAsync(resourceGroupName, privateCloudName, clusterName, datastoreName, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + context); } /** - * Delete a datastore in a private cloud cluster. - * + * Delete a Datastore. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param clusterName Name of the cluster in the private cloud. - * @param datastoreName Name of the datastore in the private cloud cluster. + * @param clusterName Name of the cluster. + * @param datastoreName Name of the datastore. * @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 long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete( - String resourceGroupName, String privateCloudName, String clusterName, String datastoreName) { + public SyncPoller, Void> beginDelete(String resourceGroupName, String privateCloudName, + String clusterName, String datastoreName) { return this.beginDeleteAsync(resourceGroupName, privateCloudName, clusterName, datastoreName).getSyncPoller(); } /** - * Delete a datastore in a private cloud cluster. - * + * Delete a Datastore. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param clusterName Name of the cluster in the private cloud. - * @param datastoreName Name of the datastore in the private cloud cluster. + * @param clusterName Name of the cluster. + * @param datastoreName Name of the datastore. * @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. @@ -1063,40 +857,38 @@ public SyncPoller, Void> beginDelete( * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete( - String resourceGroupName, String privateCloudName, String clusterName, String datastoreName, Context context) { - return this - .beginDeleteAsync(resourceGroupName, privateCloudName, clusterName, datastoreName, context) + public SyncPoller, Void> beginDelete(String resourceGroupName, String privateCloudName, + String clusterName, String datastoreName, Context context) { + return this.beginDeleteAsync(resourceGroupName, privateCloudName, clusterName, datastoreName, context) .getSyncPoller(); } /** - * Delete a datastore in a private cloud cluster. - * + * Delete a Datastore. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param clusterName Name of the cluster in the private cloud. - * @param datastoreName Name of the datastore in the private cloud cluster. + * @param clusterName Name of the cluster. + * @param datastoreName Name of the datastore. * @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 privateCloudName, String clusterName, String datastoreName) { - return beginDeleteAsync(resourceGroupName, privateCloudName, clusterName, datastoreName) - .last() + private Mono deleteAsync(String resourceGroupName, String privateCloudName, String clusterName, + String datastoreName) { + return beginDeleteAsync(resourceGroupName, privateCloudName, clusterName, datastoreName).last() .flatMap(this.client::getLroFinalResultOrError); } /** - * Delete a datastore in a private cloud cluster. - * + * Delete a Datastore. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param clusterName Name of the cluster in the private cloud. - * @param datastoreName Name of the datastore in the private cloud cluster. + * @param clusterName Name of the cluster. + * @param datastoreName Name of the datastore. * @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. @@ -1104,20 +896,19 @@ private Mono deleteAsync( * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync( - String resourceGroupName, String privateCloudName, String clusterName, String datastoreName, Context context) { - return beginDeleteAsync(resourceGroupName, privateCloudName, clusterName, datastoreName, context) - .last() + private Mono deleteAsync(String resourceGroupName, String privateCloudName, String clusterName, + String datastoreName, Context context) { + return beginDeleteAsync(resourceGroupName, privateCloudName, clusterName, datastoreName, context).last() .flatMap(this.client::getLroFinalResultOrError); } /** - * Delete a datastore in a private cloud cluster. - * + * Delete a Datastore. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param clusterName Name of the cluster in the private cloud. - * @param datastoreName Name of the datastore in the private cloud cluster. + * @param clusterName Name of the cluster. + * @param datastoreName Name of the datastore. * @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. @@ -1128,32 +919,34 @@ public void delete(String resourceGroupName, String privateCloudName, String clu } /** - * Delete a datastore in a private cloud cluster. - * + * Delete a Datastore. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param clusterName Name of the cluster in the private cloud. - * @param datastoreName Name of the datastore in the private cloud cluster. + * @param clusterName Name of the cluster. + * @param datastoreName Name of the datastore. * @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. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void delete( - String resourceGroupName, String privateCloudName, String clusterName, String datastoreName, Context context) { + public void delete(String resourceGroupName, String privateCloudName, String clusterName, String datastoreName, + Context context) { deleteAsync(resourceGroupName, privateCloudName, clusterName, datastoreName, context).block(); } /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * 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 a paged list of datastores along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return the response of a Datastore list operation along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink) { @@ -1161,36 +954,28 @@ private Mono> listNextSinglePageAsync(String nextL 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.")); + 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.listNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + return FluxUtil.withContext(context -> service.listNext(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 URL to get the next list of items - *

The nextLink parameter. + * + * 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 a paged list of datastores along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return the response of a Datastore list operation along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink, Context context) { @@ -1198,23 +983,13 @@ private Mono> listNextSinglePageAsync(String nextL 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.")); + 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 - .listNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.listNext(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/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/DatastoresImpl.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/DatastoresImpl.java index 8abe9945c2b9d..823ba196b71b0 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/DatastoresImpl.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/DatastoresImpl.java @@ -27,29 +27,24 @@ public DatastoresImpl(DatastoresClient innerClient, com.azure.resourcemanager.av } public PagedIterable list(String resourceGroupName, String privateCloudName, String clusterName) { - PagedIterable inner = - this.serviceClient().list(resourceGroupName, privateCloudName, clusterName); - return Utils.mapPage(inner, inner1 -> new DatastoreImpl(inner1, this.manager())); + PagedIterable inner + = this.serviceClient().list(resourceGroupName, privateCloudName, clusterName); + return ResourceManagerUtils.mapPage(inner, inner1 -> new DatastoreImpl(inner1, this.manager())); } - public PagedIterable list( - String resourceGroupName, String privateCloudName, String clusterName, Context context) { - PagedIterable inner = - this.serviceClient().list(resourceGroupName, privateCloudName, clusterName, context); - return Utils.mapPage(inner, inner1 -> new DatastoreImpl(inner1, this.manager())); + public PagedIterable list(String resourceGroupName, String privateCloudName, String clusterName, + Context context) { + PagedIterable inner + = this.serviceClient().list(resourceGroupName, privateCloudName, clusterName, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new DatastoreImpl(inner1, this.manager())); } - public Response getWithResponse( - String resourceGroupName, String privateCloudName, String clusterName, String datastoreName, Context context) { - Response inner = - this - .serviceClient() - .getWithResponse(resourceGroupName, privateCloudName, clusterName, datastoreName, context); + public Response getWithResponse(String resourceGroupName, String privateCloudName, String clusterName, + String datastoreName, Context context) { + Response inner = this.serviceClient().getWithResponse(resourceGroupName, privateCloudName, + clusterName, datastoreName, context); if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), new DatastoreImpl(inner.getValue(), this.manager())); } else { return null; @@ -57,8 +52,8 @@ public Response getWithResponse( } public Datastore get(String resourceGroupName, String privateCloudName, String clusterName, String datastoreName) { - DatastoreInner inner = - this.serviceClient().get(resourceGroupName, privateCloudName, clusterName, datastoreName); + DatastoreInner inner + = this.serviceClient().get(resourceGroupName, privateCloudName, clusterName, datastoreName); if (inner != null) { return new DatastoreImpl(inner, this.manager()); } else { @@ -70,141 +65,104 @@ public void delete(String resourceGroupName, String privateCloudName, String clu this.serviceClient().delete(resourceGroupName, privateCloudName, clusterName, datastoreName); } - public void delete( - String resourceGroupName, String privateCloudName, String clusterName, String datastoreName, Context context) { + public void delete(String resourceGroupName, String privateCloudName, String clusterName, String datastoreName, + Context context) { this.serviceClient().delete(resourceGroupName, privateCloudName, clusterName, datastoreName, context); } public Datastore getById(String id) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + String resourceGroupName = ResourceManagerUtils.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))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } - String privateCloudName = Utils.getValueFromIdByName(id, "privateClouds"); + String privateCloudName = ResourceManagerUtils.getValueFromIdByName(id, "privateClouds"); if (privateCloudName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'privateClouds'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'privateClouds'.", id))); } - String clusterName = Utils.getValueFromIdByName(id, "clusters"); + String clusterName = ResourceManagerUtils.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))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'clusters'.", id))); } - String datastoreName = Utils.getValueFromIdByName(id, "datastores"); + String datastoreName = ResourceManagerUtils.getValueFromIdByName(id, "datastores"); if (datastoreName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'datastores'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'datastores'.", id))); } - return this - .getWithResponse(resourceGroupName, privateCloudName, clusterName, datastoreName, Context.NONE) + return this.getWithResponse(resourceGroupName, privateCloudName, clusterName, datastoreName, Context.NONE) .getValue(); } public Response getByIdWithResponse(String id, Context context) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + String resourceGroupName = ResourceManagerUtils.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))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } - String privateCloudName = Utils.getValueFromIdByName(id, "privateClouds"); + String privateCloudName = ResourceManagerUtils.getValueFromIdByName(id, "privateClouds"); if (privateCloudName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'privateClouds'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'privateClouds'.", id))); } - String clusterName = Utils.getValueFromIdByName(id, "clusters"); + String clusterName = ResourceManagerUtils.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))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'clusters'.", id))); } - String datastoreName = Utils.getValueFromIdByName(id, "datastores"); + String datastoreName = ResourceManagerUtils.getValueFromIdByName(id, "datastores"); if (datastoreName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'datastores'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'datastores'.", id))); } return this.getWithResponse(resourceGroupName, privateCloudName, clusterName, datastoreName, context); } public void deleteById(String id) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + String resourceGroupName = ResourceManagerUtils.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))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } - String privateCloudName = Utils.getValueFromIdByName(id, "privateClouds"); + String privateCloudName = ResourceManagerUtils.getValueFromIdByName(id, "privateClouds"); if (privateCloudName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'privateClouds'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'privateClouds'.", id))); } - String clusterName = Utils.getValueFromIdByName(id, "clusters"); + String clusterName = ResourceManagerUtils.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))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'clusters'.", id))); } - String datastoreName = Utils.getValueFromIdByName(id, "datastores"); + String datastoreName = ResourceManagerUtils.getValueFromIdByName(id, "datastores"); if (datastoreName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'datastores'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'datastores'.", id))); } this.delete(resourceGroupName, privateCloudName, clusterName, datastoreName, Context.NONE); } public void deleteByIdWithResponse(String id, Context context) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + String resourceGroupName = ResourceManagerUtils.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))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } - String privateCloudName = Utils.getValueFromIdByName(id, "privateClouds"); + String privateCloudName = ResourceManagerUtils.getValueFromIdByName(id, "privateClouds"); if (privateCloudName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'privateClouds'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'privateClouds'.", id))); } - String clusterName = Utils.getValueFromIdByName(id, "clusters"); + String clusterName = ResourceManagerUtils.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))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'clusters'.", id))); } - String datastoreName = Utils.getValueFromIdByName(id, "datastores"); + String datastoreName = ResourceManagerUtils.getValueFromIdByName(id, "datastores"); if (datastoreName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'datastores'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'datastores'.", id))); } this.delete(resourceGroupName, privateCloudName, clusterName, datastoreName, context); } diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/ExpressRouteAuthorizationImpl.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/ExpressRouteAuthorizationImpl.java index fca23311cf819..e203d35b1a0b1 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/ExpressRouteAuthorizationImpl.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/ExpressRouteAuthorizationImpl.java @@ -4,6 +4,7 @@ package com.azure.resourcemanager.avs.implementation; +import com.azure.core.management.SystemData; import com.azure.core.util.Context; import com.azure.resourcemanager.avs.fluent.models.ExpressRouteAuthorizationInner; import com.azure.resourcemanager.avs.models.ExpressRouteAuthorization; @@ -27,6 +28,10 @@ public String type() { return this.innerModel().type(); } + public SystemData systemData() { + return this.innerModel().systemData(); + } + public ExpressRouteAuthorizationProvisioningState provisioningState() { return this.innerModel().provisioningState(); } @@ -68,21 +73,14 @@ public ExpressRouteAuthorizationImpl withExistingPrivateCloud(String resourceGro } public ExpressRouteAuthorization create() { - this.innerObject = - serviceManager - .serviceClient() - .getAuthorizations() - .createOrUpdate( - resourceGroupName, privateCloudName, authorizationName, this.innerModel(), Context.NONE); + this.innerObject = serviceManager.serviceClient().getAuthorizations().createOrUpdate(resourceGroupName, + privateCloudName, authorizationName, this.innerModel(), Context.NONE); return this; } public ExpressRouteAuthorization create(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getAuthorizations() - .createOrUpdate(resourceGroupName, privateCloudName, authorizationName, this.innerModel(), context); + this.innerObject = serviceManager.serviceClient().getAuthorizations().createOrUpdate(resourceGroupName, + privateCloudName, authorizationName, this.innerModel(), context); return this; } @@ -97,50 +95,40 @@ public ExpressRouteAuthorizationImpl update() { } public ExpressRouteAuthorization apply() { - this.innerObject = - serviceManager - .serviceClient() - .getAuthorizations() - .createOrUpdate( - resourceGroupName, privateCloudName, authorizationName, this.innerModel(), Context.NONE); + this.innerObject = serviceManager.serviceClient().getAuthorizations().createOrUpdate(resourceGroupName, + privateCloudName, authorizationName, this.innerModel(), Context.NONE); return this; } public ExpressRouteAuthorization apply(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getAuthorizations() - .createOrUpdate(resourceGroupName, privateCloudName, authorizationName, this.innerModel(), context); + this.innerObject = serviceManager.serviceClient().getAuthorizations().createOrUpdate(resourceGroupName, + privateCloudName, authorizationName, this.innerModel(), context); return this; } - ExpressRouteAuthorizationImpl( - ExpressRouteAuthorizationInner innerObject, com.azure.resourcemanager.avs.AvsManager serviceManager) { + ExpressRouteAuthorizationImpl(ExpressRouteAuthorizationInner innerObject, + com.azure.resourcemanager.avs.AvsManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; - this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups"); - this.privateCloudName = Utils.getValueFromIdByName(innerObject.id(), "privateClouds"); - this.authorizationName = Utils.getValueFromIdByName(innerObject.id(), "authorizations"); + this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); + this.privateCloudName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "privateClouds"); + this.authorizationName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "authorizations"); } public ExpressRouteAuthorization refresh() { - this.innerObject = - serviceManager - .serviceClient() - .getAuthorizations() - .getWithResponse(resourceGroupName, privateCloudName, authorizationName, Context.NONE) - .getValue(); + this.innerObject = serviceManager.serviceClient().getAuthorizations() + .getWithResponse(resourceGroupName, privateCloudName, authorizationName, Context.NONE).getValue(); return this; } public ExpressRouteAuthorization refresh(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getAuthorizations() - .getWithResponse(resourceGroupName, privateCloudName, authorizationName, context) - .getValue(); + this.innerObject = serviceManager.serviceClient().getAuthorizations() + .getWithResponse(resourceGroupName, privateCloudName, authorizationName, context).getValue(); + return this; + } + + public ExpressRouteAuthorizationImpl withExpressRouteId(String expressRouteId) { + this.innerModel().withExpressRouteId(expressRouteId); return this; } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/GlobalReachConnectionImpl.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/GlobalReachConnectionImpl.java index 7a83850600124..0f83cbfc530f8 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/GlobalReachConnectionImpl.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/GlobalReachConnectionImpl.java @@ -4,6 +4,7 @@ package com.azure.resourcemanager.avs.implementation; +import com.azure.core.management.SystemData; import com.azure.core.util.Context; import com.azure.resourcemanager.avs.fluent.models.GlobalReachConnectionInner; import com.azure.resourcemanager.avs.models.GlobalReachConnection; @@ -28,6 +29,10 @@ public String type() { return this.innerModel().type(); } + public SystemData systemData() { + return this.innerModel().systemData(); + } + public GlobalReachConnectionProvisioningState provisioningState() { return this.innerModel().provisioningState(); } @@ -77,22 +82,14 @@ public GlobalReachConnectionImpl withExistingPrivateCloud(String resourceGroupNa } public GlobalReachConnection create() { - this.innerObject = - serviceManager - .serviceClient() - .getGlobalReachConnections() - .createOrUpdate( - resourceGroupName, privateCloudName, globalReachConnectionName, this.innerModel(), Context.NONE); + this.innerObject = serviceManager.serviceClient().getGlobalReachConnections().createOrUpdate(resourceGroupName, + privateCloudName, globalReachConnectionName, this.innerModel(), Context.NONE); return this; } public GlobalReachConnection create(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getGlobalReachConnections() - .createOrUpdate( - resourceGroupName, privateCloudName, globalReachConnectionName, this.innerModel(), context); + this.innerObject = serviceManager.serviceClient().getGlobalReachConnections().createOrUpdate(resourceGroupName, + privateCloudName, globalReachConnectionName, this.innerModel(), context); return this; } @@ -107,51 +104,36 @@ public GlobalReachConnectionImpl update() { } public GlobalReachConnection apply() { - this.innerObject = - serviceManager - .serviceClient() - .getGlobalReachConnections() - .createOrUpdate( - resourceGroupName, privateCloudName, globalReachConnectionName, this.innerModel(), Context.NONE); + this.innerObject = serviceManager.serviceClient().getGlobalReachConnections().createOrUpdate(resourceGroupName, + privateCloudName, globalReachConnectionName, this.innerModel(), Context.NONE); return this; } public GlobalReachConnection apply(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getGlobalReachConnections() - .createOrUpdate( - resourceGroupName, privateCloudName, globalReachConnectionName, this.innerModel(), context); + this.innerObject = serviceManager.serviceClient().getGlobalReachConnections().createOrUpdate(resourceGroupName, + privateCloudName, globalReachConnectionName, this.innerModel(), context); return this; } - GlobalReachConnectionImpl( - GlobalReachConnectionInner innerObject, com.azure.resourcemanager.avs.AvsManager serviceManager) { + GlobalReachConnectionImpl(GlobalReachConnectionInner innerObject, + com.azure.resourcemanager.avs.AvsManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; - this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups"); - this.privateCloudName = Utils.getValueFromIdByName(innerObject.id(), "privateClouds"); - this.globalReachConnectionName = Utils.getValueFromIdByName(innerObject.id(), "globalReachConnections"); + this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); + this.privateCloudName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "privateClouds"); + this.globalReachConnectionName + = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "globalReachConnections"); } public GlobalReachConnection refresh() { - this.innerObject = - serviceManager - .serviceClient() - .getGlobalReachConnections() - .getWithResponse(resourceGroupName, privateCloudName, globalReachConnectionName, Context.NONE) - .getValue(); + this.innerObject = serviceManager.serviceClient().getGlobalReachConnections() + .getWithResponse(resourceGroupName, privateCloudName, globalReachConnectionName, Context.NONE).getValue(); return this; } public GlobalReachConnection refresh(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getGlobalReachConnections() - .getWithResponse(resourceGroupName, privateCloudName, globalReachConnectionName, context) - .getValue(); + this.innerObject = serviceManager.serviceClient().getGlobalReachConnections() + .getWithResponse(resourceGroupName, privateCloudName, globalReachConnectionName, context).getValue(); return this; } diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/GlobalReachConnectionsClientImpl.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/GlobalReachConnectionsClientImpl.java index dc01203c9c80a..902449b5cc3af 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/GlobalReachConnectionsClientImpl.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/GlobalReachConnectionsClientImpl.java @@ -33,28 +33,33 @@ import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.avs.fluent.GlobalReachConnectionsClient; import com.azure.resourcemanager.avs.fluent.models.GlobalReachConnectionInner; -import com.azure.resourcemanager.avs.models.GlobalReachConnectionList; +import com.azure.resourcemanager.avs.models.GlobalReachConnectionListResult; 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 GlobalReachConnectionsClient. */ +/** + * An instance of this class provides access to all the operations defined in GlobalReachConnectionsClient. + */ public final class GlobalReachConnectionsClientImpl implements GlobalReachConnectionsClient { - /** The proxy service used to perform REST calls. */ + /** + * The proxy service used to perform REST calls. + */ private final GlobalReachConnectionsService service; - /** The service client containing this operation class. */ + /** + * The service client containing this operation class. + */ private final AvsClientImpl client; /** * Initializes an instance of GlobalReachConnectionsClientImpl. - * + * * @param client the instance of the service client containing this operation class. */ GlobalReachConnectionsClientImpl(AvsClientImpl client) { - this.service = - RestProxy - .create(GlobalReachConnectionsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.service = RestProxy.create(GlobalReachConnectionsService.class, client.getHttpPipeline(), + client.getSerializerAdapter()); this.client = client; } @@ -65,102 +70,80 @@ public final class GlobalReachConnectionsClientImpl implements GlobalReachConnec @Host("{$host}") @ServiceInterface(name = "AvsClientGlobalReach") public interface GlobalReachConnectionsService { - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/globalReachConnections") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/globalReachConnections") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono> list(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("privateCloudName") String privateCloudName, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, + @PathParam("privateCloudName") String privateCloudName, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/globalReachConnections/{globalReachConnectionName}") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/globalReachConnections/{globalReachConnectionName}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono> get(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("privateCloudName") String privateCloudName, @PathParam("globalReachConnectionName") String globalReachConnectionName, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/globalReachConnections/{globalReachConnectionName}") - @ExpectedResponses({200, 201}) + @Headers({ "Content-Type: application/json" }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/globalReachConnections/{globalReachConnectionName}") + @ExpectedResponses({ 200, 201 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createOrUpdate( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono>> createOrUpdate(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("privateCloudName") String privateCloudName, @PathParam("globalReachConnectionName") String globalReachConnectionName, - @QueryParam("api-version") String apiVersion, @BodyParam("application/json") GlobalReachConnectionInner globalReachConnection, - @HeaderParam("Accept") String accept, - Context context); + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Delete( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/globalReachConnections/{globalReachConnectionName}") - @ExpectedResponses({200, 202, 204}) + @Headers({ "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/globalReachConnections/{globalReachConnectionName}") + @ExpectedResponses({ 200, 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono>> delete(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("privateCloudName") String privateCloudName, @PathParam("globalReachConnectionName") String globalReachConnectionName, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + Mono> listNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); } /** - * List global reach connections in a private cloud. - * + * List GlobalReachConnection resources by PrivateCloud. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. * @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 paged list of global reach connections along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * @return the response of a GlobalReachConnection list operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync( - String resourceGroupName, String privateCloudName) { + private Mono> listSinglePageAsync(String resourceGroupName, + String privateCloudName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -172,55 +155,35 @@ private Mono> listSinglePageAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .list( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - privateCloudName, - this.client.getApiVersion(), - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, 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 global reach connections in a private cloud. - * + * List GlobalReachConnection resources by PrivateCloud. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. * @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 a paged list of global reach connections along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * @return the response of a GlobalReachConnection list operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync( - String resourceGroupName, String privateCloudName, Context context) { + private Mono> listSinglePageAsync(String resourceGroupName, + String privateCloudName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -233,70 +196,55 @@ private Mono> listSinglePageAsync( final String accept = "application/json"; context = this.client.mergeContext(context); return service - .list( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - privateCloudName, - this.client.getApiVersion(), - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + .list(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, privateCloudName, accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** - * List global reach connections in a private cloud. - * + * List GlobalReachConnection resources by PrivateCloud. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. * @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 paged list of global reach connections as paginated response with {@link PagedFlux}. + * @return the response of a GlobalReachConnection list operation as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(String resourceGroupName, String privateCloudName) { - return new PagedFlux<>( - () -> listSinglePageAsync(resourceGroupName, privateCloudName), + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, privateCloudName), nextLink -> listNextSinglePageAsync(nextLink)); } /** - * List global reach connections in a private cloud. - * + * List GlobalReachConnection resources by PrivateCloud. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. * @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 a paged list of global reach connections as paginated response with {@link PagedFlux}. + * @return the response of a GlobalReachConnection list operation as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync( - String resourceGroupName, String privateCloudName, Context context) { - return new PagedFlux<>( - () -> listSinglePageAsync(resourceGroupName, privateCloudName, context), + private PagedFlux listAsync(String resourceGroupName, String privateCloudName, + Context context) { + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, privateCloudName, context), nextLink -> listNextSinglePageAsync(nextLink, context)); } /** - * List global reach connections in a private cloud. - * + * List GlobalReachConnection resources by PrivateCloud. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. * @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 paged list of global reach connections as paginated response with {@link PagedIterable}. + * @return the response of a GlobalReachConnection list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(String resourceGroupName, String privateCloudName) { @@ -304,48 +252,43 @@ public PagedIterable list(String resourceGroupName, } /** - * List global reach connections in a private cloud. - * + * List GlobalReachConnection resources by PrivateCloud. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. * @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 a paged list of global reach connections as paginated response with {@link PagedIterable}. + * @return the response of a GlobalReachConnection list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list( - String resourceGroupName, String privateCloudName, Context context) { + public PagedIterable list(String resourceGroupName, String privateCloudName, + Context context) { return new PagedIterable<>(listAsync(resourceGroupName, privateCloudName, context)); } /** - * Get a global reach connection by name in a private cloud. - * + * Get a GlobalReachConnection. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param globalReachConnectionName Name of the global reach connection in the private cloud. + * @param globalReachConnectionName Name of the global reach connection. * @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 global reach connection by name in a private cloud along with {@link Response} on successful completion - * of {@link Mono}. + * @return a GlobalReachConnection along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String privateCloudName, String globalReachConnectionName) { + private Mono> getWithResponseAsync(String resourceGroupName, + String privateCloudName, String globalReachConnectionName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -356,55 +299,39 @@ private Mono> getWithResponseAsync( .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); } if (globalReachConnectionName == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter globalReachConnectionName is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter globalReachConnectionName is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .get( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - privateCloudName, - globalReachConnectionName, - this.client.getApiVersion(), - accept, - context)) + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, globalReachConnectionName, accept, + context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Get a global reach connection by name in a private cloud. - * + * Get a GlobalReachConnection. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param globalReachConnectionName Name of the global reach connection in the private cloud. + * @param globalReachConnectionName Name of the global reach connection. * @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 a global reach connection by name in a private cloud along with {@link Response} on successful completion - * of {@link Mono}. + * @return a GlobalReachConnection along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String privateCloudName, String globalReachConnectionName, Context context) { + private Mono> getWithResponseAsync(String resourceGroupName, + String privateCloudName, String globalReachConnectionName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -415,107 +342,90 @@ private Mono> getWithResponseAsync( .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); } if (globalReachConnectionName == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter globalReachConnectionName is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter globalReachConnectionName is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .get( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - privateCloudName, - globalReachConnectionName, - this.client.getApiVersion(), - accept, - context); + return service.get(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, privateCloudName, globalReachConnectionName, accept, context); } /** - * Get a global reach connection by name in a private cloud. - * + * Get a GlobalReachConnection. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param globalReachConnectionName Name of the global reach connection in the private cloud. + * @param globalReachConnectionName Name of the global reach connection. * @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 global reach connection by name in a private cloud on successful completion of {@link Mono}. + * @return a GlobalReachConnection on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync( - String resourceGroupName, String privateCloudName, String globalReachConnectionName) { + private Mono getAsync(String resourceGroupName, String privateCloudName, + String globalReachConnectionName) { return getWithResponseAsync(resourceGroupName, privateCloudName, globalReachConnectionName) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** - * Get a global reach connection by name in a private cloud. - * + * Get a GlobalReachConnection. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param globalReachConnectionName Name of the global reach connection in the private cloud. + * @param globalReachConnectionName Name of the global reach connection. * @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 a global reach connection by name in a private cloud along with {@link Response}. + * @return a GlobalReachConnection along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, String privateCloudName, String globalReachConnectionName, Context context) { + public Response getWithResponse(String resourceGroupName, String privateCloudName, + String globalReachConnectionName, Context context) { return getWithResponseAsync(resourceGroupName, privateCloudName, globalReachConnectionName, context).block(); } /** - * Get a global reach connection by name in a private cloud. - * + * Get a GlobalReachConnection. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param globalReachConnectionName Name of the global reach connection in the private cloud. + * @param globalReachConnectionName Name of the global reach connection. * @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 global reach connection by name in a private cloud. + * @return a GlobalReachConnection. */ @ServiceMethod(returns = ReturnType.SINGLE) - public GlobalReachConnectionInner get( - String resourceGroupName, String privateCloudName, String globalReachConnectionName) { + public GlobalReachConnectionInner get(String resourceGroupName, String privateCloudName, + String globalReachConnectionName) { return getWithResponse(resourceGroupName, privateCloudName, globalReachConnectionName, Context.NONE).getValue(); } /** - * Create or update a global reach connection in a private cloud. - * + * Create a GlobalReachConnection. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName The name of the private cloud. - * @param globalReachConnectionName Name of the global reach connection in the private cloud. - * @param globalReachConnection A global reach connection in the private cloud. + * @param privateCloudName Name of the private cloud. + * @param globalReachConnectionName Name of the global reach connection. + * @param globalReachConnection Resource create parameters. * @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 global reach connection resource along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync( - String resourceGroupName, - String privateCloudName, - String globalReachConnectionName, - GlobalReachConnectionInner globalReachConnection) { + private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String privateCloudName, String globalReachConnectionName, GlobalReachConnectionInner globalReachConnection) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -526,10 +436,8 @@ private Mono>> createOrUpdateWithResponseAsync( .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); } if (globalReachConnectionName == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter globalReachConnectionName is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter globalReachConnectionName is required and cannot be null.")); } if (globalReachConnection == null) { return Mono @@ -539,29 +447,19 @@ private Mono>> createOrUpdateWithResponseAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .createOrUpdate( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - privateCloudName, - globalReachConnectionName, - this.client.getApiVersion(), - globalReachConnection, - accept, - context)) + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, globalReachConnectionName, + globalReachConnection, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Create or update a global reach connection in a private cloud. - * + * Create a GlobalReachConnection. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName The name of the private cloud. - * @param globalReachConnectionName Name of the global reach connection in the private cloud. - * @param globalReachConnection A global reach connection in the private cloud. + * @param privateCloudName Name of the private cloud. + * @param globalReachConnectionName Name of the global reach connection. + * @param globalReachConnection Resource create parameters. * @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. @@ -569,23 +467,16 @@ private Mono>> createOrUpdateWithResponseAsync( * @return a global reach connection resource along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync( - String resourceGroupName, - String privateCloudName, - String globalReachConnectionName, - GlobalReachConnectionInner globalReachConnection, + private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String privateCloudName, String globalReachConnectionName, GlobalReachConnectionInner globalReachConnection, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -596,10 +487,8 @@ private Mono>> createOrUpdateWithResponseAsync( .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); } if (globalReachConnectionName == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter globalReachConnectionName is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter globalReachConnectionName is required and cannot be null.")); } if (globalReachConnection == null) { return Mono @@ -609,26 +498,18 @@ private Mono>> createOrUpdateWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .createOrUpdate( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - privateCloudName, - globalReachConnectionName, - this.client.getApiVersion(), - globalReachConnection, - accept, - context); + return service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, globalReachConnectionName, + globalReachConnection, accept, context); } /** - * Create or update a global reach connection in a private cloud. - * + * Create a GlobalReachConnection. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName The name of the private cloud. - * @param globalReachConnectionName Name of the global reach connection in the private cloud. - * @param globalReachConnection A global reach connection in the private cloud. + * @param privateCloudName Name of the private cloud. + * @param globalReachConnectionName Name of the global reach connection. + * @param globalReachConnection Resource create parameters. * @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. @@ -636,30 +517,22 @@ private Mono>> createOrUpdateWithResponseAsync( */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, GlobalReachConnectionInner> beginCreateOrUpdateAsync( - String resourceGroupName, - String privateCloudName, - String globalReachConnectionName, + String resourceGroupName, String privateCloudName, String globalReachConnectionName, GlobalReachConnectionInner globalReachConnection) { - Mono>> mono = - createOrUpdateWithResponseAsync( - resourceGroupName, privateCloudName, globalReachConnectionName, globalReachConnection); - return this - .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - GlobalReachConnectionInner.class, - GlobalReachConnectionInner.class, - this.client.getContext()); + Mono>> mono = createOrUpdateWithResponseAsync(resourceGroupName, privateCloudName, + globalReachConnectionName, globalReachConnection); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), GlobalReachConnectionInner.class, GlobalReachConnectionInner.class, + this.client.getContext()); } /** - * Create or update a global reach connection in a private cloud. - * + * Create a GlobalReachConnection. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName The name of the private cloud. - * @param globalReachConnectionName Name of the global reach connection in the private cloud. - * @param globalReachConnection A global reach connection in the private cloud. + * @param privateCloudName Name of the private cloud. + * @param globalReachConnectionName Name of the global reach connection. + * @param globalReachConnection Resource create parameters. * @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. @@ -668,32 +541,22 @@ private PollerFlux, GlobalReachConnection */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, GlobalReachConnectionInner> beginCreateOrUpdateAsync( - String resourceGroupName, - String privateCloudName, - String globalReachConnectionName, - GlobalReachConnectionInner globalReachConnection, - Context context) { + String resourceGroupName, String privateCloudName, String globalReachConnectionName, + GlobalReachConnectionInner globalReachConnection, Context context) { context = this.client.mergeContext(context); - Mono>> mono = - createOrUpdateWithResponseAsync( - resourceGroupName, privateCloudName, globalReachConnectionName, globalReachConnection, context); - return this - .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - GlobalReachConnectionInner.class, - GlobalReachConnectionInner.class, - context); + Mono>> mono = createOrUpdateWithResponseAsync(resourceGroupName, privateCloudName, + globalReachConnectionName, globalReachConnection, context); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), GlobalReachConnectionInner.class, GlobalReachConnectionInner.class, context); } /** - * Create or update a global reach connection in a private cloud. - * + * Create a GlobalReachConnection. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName The name of the private cloud. - * @param globalReachConnectionName Name of the global reach connection in the private cloud. - * @param globalReachConnection A global reach connection in the private cloud. + * @param privateCloudName Name of the private cloud. + * @param globalReachConnectionName Name of the global reach connection. + * @param globalReachConnection Resource create parameters. * @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. @@ -701,23 +564,19 @@ private PollerFlux, GlobalReachConnection */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, GlobalReachConnectionInner> beginCreateOrUpdate( - String resourceGroupName, - String privateCloudName, - String globalReachConnectionName, + String resourceGroupName, String privateCloudName, String globalReachConnectionName, GlobalReachConnectionInner globalReachConnection) { - return this - .beginCreateOrUpdateAsync( - resourceGroupName, privateCloudName, globalReachConnectionName, globalReachConnection) - .getSyncPoller(); + return this.beginCreateOrUpdateAsync(resourceGroupName, privateCloudName, globalReachConnectionName, + globalReachConnection).getSyncPoller(); } /** - * Create or update a global reach connection in a private cloud. - * + * Create a GlobalReachConnection. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName The name of the private cloud. - * @param globalReachConnectionName Name of the global reach connection in the private cloud. - * @param globalReachConnection A global reach connection in the private cloud. + * @param privateCloudName Name of the private cloud. + * @param globalReachConnectionName Name of the global reach connection. + * @param globalReachConnection Resource create parameters. * @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. @@ -726,48 +585,38 @@ public SyncPoller, GlobalReachConnectionI */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, GlobalReachConnectionInner> beginCreateOrUpdate( - String resourceGroupName, - String privateCloudName, - String globalReachConnectionName, - GlobalReachConnectionInner globalReachConnection, - Context context) { - return this - .beginCreateOrUpdateAsync( - resourceGroupName, privateCloudName, globalReachConnectionName, globalReachConnection, context) - .getSyncPoller(); + String resourceGroupName, String privateCloudName, String globalReachConnectionName, + GlobalReachConnectionInner globalReachConnection, Context context) { + return this.beginCreateOrUpdateAsync(resourceGroupName, privateCloudName, globalReachConnectionName, + globalReachConnection, context).getSyncPoller(); } /** - * Create or update a global reach connection in a private cloud. - * + * Create a GlobalReachConnection. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName The name of the private cloud. - * @param globalReachConnectionName Name of the global reach connection in the private cloud. - * @param globalReachConnection A global reach connection in the private cloud. + * @param privateCloudName Name of the private cloud. + * @param globalReachConnectionName Name of the global reach connection. + * @param globalReachConnection Resource create parameters. * @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 global reach connection resource on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync( - String resourceGroupName, - String privateCloudName, - String globalReachConnectionName, - GlobalReachConnectionInner globalReachConnection) { - return beginCreateOrUpdateAsync( - resourceGroupName, privateCloudName, globalReachConnectionName, globalReachConnection) - .last() - .flatMap(this.client::getLroFinalResultOrError); + private Mono createOrUpdateAsync(String resourceGroupName, String privateCloudName, + String globalReachConnectionName, GlobalReachConnectionInner globalReachConnection) { + return beginCreateOrUpdateAsync(resourceGroupName, privateCloudName, globalReachConnectionName, + globalReachConnection).last().flatMap(this.client::getLroFinalResultOrError); } /** - * Create or update a global reach connection in a private cloud. - * + * Create a GlobalReachConnection. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName The name of the private cloud. - * @param globalReachConnectionName Name of the global reach connection in the private cloud. - * @param globalReachConnection A global reach connection in the private cloud. + * @param privateCloudName Name of the private cloud. + * @param globalReachConnectionName Name of the global reach connection. + * @param globalReachConnection Resource create parameters. * @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. @@ -775,48 +624,38 @@ private Mono createOrUpdateAsync( * @return a global reach connection resource on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync( - String resourceGroupName, - String privateCloudName, - String globalReachConnectionName, - GlobalReachConnectionInner globalReachConnection, - Context context) { - return beginCreateOrUpdateAsync( - resourceGroupName, privateCloudName, globalReachConnectionName, globalReachConnection, context) - .last() - .flatMap(this.client::getLroFinalResultOrError); + private Mono createOrUpdateAsync(String resourceGroupName, String privateCloudName, + String globalReachConnectionName, GlobalReachConnectionInner globalReachConnection, Context context) { + return beginCreateOrUpdateAsync(resourceGroupName, privateCloudName, globalReachConnectionName, + globalReachConnection, context).last().flatMap(this.client::getLroFinalResultOrError); } /** - * Create or update a global reach connection in a private cloud. - * + * Create a GlobalReachConnection. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName The name of the private cloud. - * @param globalReachConnectionName Name of the global reach connection in the private cloud. - * @param globalReachConnection A global reach connection in the private cloud. + * @param privateCloudName Name of the private cloud. + * @param globalReachConnectionName Name of the global reach connection. + * @param globalReachConnection Resource create parameters. * @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 global reach connection resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - public GlobalReachConnectionInner createOrUpdate( - String resourceGroupName, - String privateCloudName, - String globalReachConnectionName, - GlobalReachConnectionInner globalReachConnection) { - return createOrUpdateAsync( - resourceGroupName, privateCloudName, globalReachConnectionName, globalReachConnection) - .block(); + public GlobalReachConnectionInner createOrUpdate(String resourceGroupName, String privateCloudName, + String globalReachConnectionName, GlobalReachConnectionInner globalReachConnection) { + return createOrUpdateAsync(resourceGroupName, privateCloudName, globalReachConnectionName, + globalReachConnection).block(); } /** - * Create or update a global reach connection in a private cloud. - * + * Create a GlobalReachConnection. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName The name of the private cloud. - * @param globalReachConnectionName Name of the global reach connection in the private cloud. - * @param globalReachConnection A global reach connection in the private cloud. + * @param privateCloudName Name of the private cloud. + * @param globalReachConnectionName Name of the global reach connection. + * @param globalReachConnection Resource create parameters. * @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. @@ -824,42 +663,33 @@ public GlobalReachConnectionInner createOrUpdate( * @return a global reach connection resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - public GlobalReachConnectionInner createOrUpdate( - String resourceGroupName, - String privateCloudName, - String globalReachConnectionName, - GlobalReachConnectionInner globalReachConnection, - Context context) { - return createOrUpdateAsync( - resourceGroupName, privateCloudName, globalReachConnectionName, globalReachConnection, context) - .block(); + public GlobalReachConnectionInner createOrUpdate(String resourceGroupName, String privateCloudName, + String globalReachConnectionName, GlobalReachConnectionInner globalReachConnection, Context context) { + return createOrUpdateAsync(resourceGroupName, privateCloudName, globalReachConnectionName, + globalReachConnection, context).block(); } /** - * Delete a global reach connection in a private cloud. - * + * Delete a GlobalReachConnection. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param globalReachConnectionName Name of the global reach connection in the private cloud. + * @param globalReachConnectionName Name of the global reach connection. * @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 privateCloudName, String globalReachConnectionName) { + private Mono>> deleteWithResponseAsync(String resourceGroupName, String privateCloudName, + String globalReachConnectionName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -870,34 +700,23 @@ private Mono>> deleteWithResponseAsync( .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); } if (globalReachConnectionName == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter globalReachConnectionName is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter globalReachConnectionName is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .delete( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - privateCloudName, - globalReachConnectionName, - this.client.getApiVersion(), - accept, - context)) + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, globalReachConnectionName, accept, + context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Delete a global reach connection in a private cloud. - * + * Delete a GlobalReachConnection. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param globalReachConnectionName Name of the global reach connection in the private cloud. + * @param globalReachConnectionName Name of the global reach connection. * @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. @@ -905,19 +724,15 @@ private Mono>> deleteWithResponseAsync( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync( - String resourceGroupName, String privateCloudName, String globalReachConnectionName, Context context) { + private Mono>> deleteWithResponseAsync(String resourceGroupName, String privateCloudName, + String globalReachConnectionName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -928,53 +743,41 @@ private Mono>> deleteWithResponseAsync( .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); } if (globalReachConnectionName == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter globalReachConnectionName is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter globalReachConnectionName 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, - privateCloudName, - globalReachConnectionName, - this.client.getApiVersion(), - accept, - context); + return service.delete(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, privateCloudName, globalReachConnectionName, accept, context); } /** - * Delete a global reach connection in a private cloud. - * + * Delete a GlobalReachConnection. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param globalReachConnectionName Name of the global reach connection in the private cloud. + * @param globalReachConnectionName Name of the global reach connection. * @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 long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync( - String resourceGroupName, String privateCloudName, String globalReachConnectionName) { - Mono>> mono = - deleteWithResponseAsync(resourceGroupName, privateCloudName, globalReachConnectionName); - return this - .client - .getLroResult( - mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String privateCloudName, + String globalReachConnectionName) { + Mono>> mono + = deleteWithResponseAsync(resourceGroupName, privateCloudName, globalReachConnectionName); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); } /** - * Delete a global reach connection in a private cloud. - * + * Delete a GlobalReachConnection. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param globalReachConnectionName Name of the global reach connection in the private cloud. + * @param globalReachConnectionName Name of the global reach connection. * @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. @@ -982,39 +785,38 @@ private PollerFlux, Void> beginDeleteAsync( * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync( - String resourceGroupName, String privateCloudName, String globalReachConnectionName, Context context) { + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String privateCloudName, + String globalReachConnectionName, Context context) { context = this.client.mergeContext(context); - Mono>> mono = - deleteWithResponseAsync(resourceGroupName, privateCloudName, globalReachConnectionName, context); - return this - .client - .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); + Mono>> mono + = deleteWithResponseAsync(resourceGroupName, privateCloudName, globalReachConnectionName, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + context); } /** - * Delete a global reach connection in a private cloud. - * + * Delete a GlobalReachConnection. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param globalReachConnectionName Name of the global reach connection in the private cloud. + * @param globalReachConnectionName Name of the global reach connection. * @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 long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete( - String resourceGroupName, String privateCloudName, String globalReachConnectionName) { + public SyncPoller, Void> beginDelete(String resourceGroupName, String privateCloudName, + String globalReachConnectionName) { return this.beginDeleteAsync(resourceGroupName, privateCloudName, globalReachConnectionName).getSyncPoller(); } /** - * Delete a global reach connection in a private cloud. - * + * Delete a GlobalReachConnection. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param globalReachConnectionName Name of the global reach connection in the private cloud. + * @param globalReachConnectionName Name of the global reach connection. * @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. @@ -1022,38 +824,36 @@ public SyncPoller, Void> beginDelete( * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete( - String resourceGroupName, String privateCloudName, String globalReachConnectionName, Context context) { - return this - .beginDeleteAsync(resourceGroupName, privateCloudName, globalReachConnectionName, context) + public SyncPoller, Void> beginDelete(String resourceGroupName, String privateCloudName, + String globalReachConnectionName, Context context) { + return this.beginDeleteAsync(resourceGroupName, privateCloudName, globalReachConnectionName, context) .getSyncPoller(); } /** - * Delete a global reach connection in a private cloud. - * + * Delete a GlobalReachConnection. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param globalReachConnectionName Name of the global reach connection in the private cloud. + * @param globalReachConnectionName Name of the global reach connection. * @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 privateCloudName, String globalReachConnectionName) { - return beginDeleteAsync(resourceGroupName, privateCloudName, globalReachConnectionName) - .last() + private Mono deleteAsync(String resourceGroupName, String privateCloudName, + String globalReachConnectionName) { + return beginDeleteAsync(resourceGroupName, privateCloudName, globalReachConnectionName).last() .flatMap(this.client::getLroFinalResultOrError); } /** - * Delete a global reach connection in a private cloud. - * + * Delete a GlobalReachConnection. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param globalReachConnectionName Name of the global reach connection in the private cloud. + * @param globalReachConnectionName Name of the global reach connection. * @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. @@ -1061,19 +861,18 @@ private Mono deleteAsync( * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync( - String resourceGroupName, String privateCloudName, String globalReachConnectionName, Context context) { - return beginDeleteAsync(resourceGroupName, privateCloudName, globalReachConnectionName, context) - .last() + private Mono deleteAsync(String resourceGroupName, String privateCloudName, String globalReachConnectionName, + Context context) { + return beginDeleteAsync(resourceGroupName, privateCloudName, globalReachConnectionName, context).last() .flatMap(this.client::getLroFinalResultOrError); } /** - * Delete a global reach connection in a private cloud. - * + * Delete a GlobalReachConnection. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param globalReachConnectionName Name of the global reach connection in the private cloud. + * @param globalReachConnectionName Name of the global reach connection. * @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. @@ -1084,32 +883,33 @@ public void delete(String resourceGroupName, String privateCloudName, String glo } /** - * Delete a global reach connection in a private cloud. - * + * Delete a GlobalReachConnection. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param globalReachConnectionName Name of the global reach connection in the private cloud. + * @param globalReachConnectionName Name of the global reach connection. * @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. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void delete( - String resourceGroupName, String privateCloudName, String globalReachConnectionName, Context context) { + public void delete(String resourceGroupName, String privateCloudName, String globalReachConnectionName, + Context context) { deleteAsync(resourceGroupName, privateCloudName, globalReachConnectionName, context).block(); } /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * 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 a paged list of global reach connections along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * @return the response of a GlobalReachConnection list operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink) { @@ -1117,37 +917,28 @@ private Mono> listNextSinglePageAsync( 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.")); + 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.listNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + return FluxUtil.withContext(context -> service.listNext(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 URL to get the next list of items - *

The nextLink parameter. + * + * 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 a paged list of global reach connections along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * @return the response of a GlobalReachConnection list operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink, Context context) { @@ -1155,23 +946,13 @@ private Mono> listNextSinglePageAsync( 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.")); + 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 - .listNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.listNext(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/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/GlobalReachConnectionsImpl.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/GlobalReachConnectionsImpl.java index ab9add31f05db..10e0abb6d561c 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/GlobalReachConnectionsImpl.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/GlobalReachConnectionsImpl.java @@ -21,46 +21,41 @@ public final class GlobalReachConnectionsImpl implements GlobalReachConnections private final com.azure.resourcemanager.avs.AvsManager serviceManager; - public GlobalReachConnectionsImpl( - GlobalReachConnectionsClient innerClient, com.azure.resourcemanager.avs.AvsManager serviceManager) { + public GlobalReachConnectionsImpl(GlobalReachConnectionsClient innerClient, + com.azure.resourcemanager.avs.AvsManager serviceManager) { this.innerClient = innerClient; this.serviceManager = serviceManager; } public PagedIterable list(String resourceGroupName, String privateCloudName) { - PagedIterable inner = - this.serviceClient().list(resourceGroupName, privateCloudName); - return Utils.mapPage(inner, inner1 -> new GlobalReachConnectionImpl(inner1, this.manager())); + PagedIterable inner + = this.serviceClient().list(resourceGroupName, privateCloudName); + return ResourceManagerUtils.mapPage(inner, inner1 -> new GlobalReachConnectionImpl(inner1, this.manager())); } - public PagedIterable list( - String resourceGroupName, String privateCloudName, Context context) { - PagedIterable inner = - this.serviceClient().list(resourceGroupName, privateCloudName, context); - return Utils.mapPage(inner, inner1 -> new GlobalReachConnectionImpl(inner1, this.manager())); + public PagedIterable list(String resourceGroupName, String privateCloudName, + Context context) { + PagedIterable inner + = this.serviceClient().list(resourceGroupName, privateCloudName, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new GlobalReachConnectionImpl(inner1, this.manager())); } - public Response getWithResponse( - String resourceGroupName, String privateCloudName, String globalReachConnectionName, Context context) { - Response inner = - this - .serviceClient() - .getWithResponse(resourceGroupName, privateCloudName, globalReachConnectionName, context); + public Response getWithResponse(String resourceGroupName, String privateCloudName, + String globalReachConnectionName, Context context) { + Response inner = this.serviceClient().getWithResponse(resourceGroupName, + privateCloudName, globalReachConnectionName, context); if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), new GlobalReachConnectionImpl(inner.getValue(), this.manager())); } else { return null; } } - public GlobalReachConnection get( - String resourceGroupName, String privateCloudName, String globalReachConnectionName) { - GlobalReachConnectionInner inner = - this.serviceClient().get(resourceGroupName, privateCloudName, globalReachConnectionName); + public GlobalReachConnection get(String resourceGroupName, String privateCloudName, + String globalReachConnectionName) { + GlobalReachConnectionInner inner + = this.serviceClient().get(resourceGroupName, privateCloudName, globalReachConnectionName); if (inner != null) { return new GlobalReachConnectionImpl(inner, this.manager()); } else { @@ -72,125 +67,84 @@ public void delete(String resourceGroupName, String privateCloudName, String glo this.serviceClient().delete(resourceGroupName, privateCloudName, globalReachConnectionName); } - public void delete( - String resourceGroupName, String privateCloudName, String globalReachConnectionName, Context context) { + public void delete(String resourceGroupName, String privateCloudName, String globalReachConnectionName, + Context context) { this.serviceClient().delete(resourceGroupName, privateCloudName, globalReachConnectionName, context); } public GlobalReachConnection getById(String id) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + String resourceGroupName = ResourceManagerUtils.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))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } - String privateCloudName = Utils.getValueFromIdByName(id, "privateClouds"); + String privateCloudName = ResourceManagerUtils.getValueFromIdByName(id, "privateClouds"); if (privateCloudName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'privateClouds'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'privateClouds'.", id))); } - String globalReachConnectionName = Utils.getValueFromIdByName(id, "globalReachConnections"); + String globalReachConnectionName = ResourceManagerUtils.getValueFromIdByName(id, "globalReachConnections"); if (globalReachConnectionName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format( - "The resource ID '%s' is not valid. Missing path segment 'globalReachConnections'.", - id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException(String + .format("The resource ID '%s' is not valid. Missing path segment 'globalReachConnections'.", id))); } - return this - .getWithResponse(resourceGroupName, privateCloudName, globalReachConnectionName, Context.NONE) + return this.getWithResponse(resourceGroupName, privateCloudName, globalReachConnectionName, Context.NONE) .getValue(); } public Response getByIdWithResponse(String id, Context context) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + String resourceGroupName = ResourceManagerUtils.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))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } - String privateCloudName = Utils.getValueFromIdByName(id, "privateClouds"); + String privateCloudName = ResourceManagerUtils.getValueFromIdByName(id, "privateClouds"); if (privateCloudName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'privateClouds'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'privateClouds'.", id))); } - String globalReachConnectionName = Utils.getValueFromIdByName(id, "globalReachConnections"); + String globalReachConnectionName = ResourceManagerUtils.getValueFromIdByName(id, "globalReachConnections"); if (globalReachConnectionName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format( - "The resource ID '%s' is not valid. Missing path segment 'globalReachConnections'.", - id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException(String + .format("The resource ID '%s' is not valid. Missing path segment 'globalReachConnections'.", id))); } return this.getWithResponse(resourceGroupName, privateCloudName, globalReachConnectionName, context); } public void deleteById(String id) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + String resourceGroupName = ResourceManagerUtils.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))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } - String privateCloudName = Utils.getValueFromIdByName(id, "privateClouds"); + String privateCloudName = ResourceManagerUtils.getValueFromIdByName(id, "privateClouds"); if (privateCloudName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'privateClouds'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'privateClouds'.", id))); } - String globalReachConnectionName = Utils.getValueFromIdByName(id, "globalReachConnections"); + String globalReachConnectionName = ResourceManagerUtils.getValueFromIdByName(id, "globalReachConnections"); if (globalReachConnectionName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format( - "The resource ID '%s' is not valid. Missing path segment 'globalReachConnections'.", - id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException(String + .format("The resource ID '%s' is not valid. Missing path segment 'globalReachConnections'.", id))); } this.delete(resourceGroupName, privateCloudName, globalReachConnectionName, Context.NONE); } public void deleteByIdWithResponse(String id, Context context) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + String resourceGroupName = ResourceManagerUtils.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))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } - String privateCloudName = Utils.getValueFromIdByName(id, "privateClouds"); + String privateCloudName = ResourceManagerUtils.getValueFromIdByName(id, "privateClouds"); if (privateCloudName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'privateClouds'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'privateClouds'.", id))); } - String globalReachConnectionName = Utils.getValueFromIdByName(id, "globalReachConnections"); + String globalReachConnectionName = ResourceManagerUtils.getValueFromIdByName(id, "globalReachConnections"); if (globalReachConnectionName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format( - "The resource ID '%s' is not valid. Missing path segment 'globalReachConnections'.", - id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException(String + .format("The resource ID '%s' is not valid. Missing path segment 'globalReachConnections'.", id))); } this.delete(resourceGroupName, privateCloudName, globalReachConnectionName, context); } diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/HcxEnterpriseSiteImpl.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/HcxEnterpriseSiteImpl.java index 5b895cc9d1fdb..99b88b20ee0e0 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/HcxEnterpriseSiteImpl.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/HcxEnterpriseSiteImpl.java @@ -4,9 +4,11 @@ package com.azure.resourcemanager.avs.implementation; +import com.azure.core.management.SystemData; import com.azure.core.util.Context; import com.azure.resourcemanager.avs.fluent.models.HcxEnterpriseSiteInner; import com.azure.resourcemanager.avs.models.HcxEnterpriseSite; +import com.azure.resourcemanager.avs.models.HcxEnterpriseSiteProvisioningState; import com.azure.resourcemanager.avs.models.HcxEnterpriseSiteStatus; public final class HcxEnterpriseSiteImpl @@ -27,6 +29,14 @@ public String type() { return this.innerModel().type(); } + public SystemData systemData() { + return this.innerModel().systemData(); + } + + public HcxEnterpriseSiteProvisioningState provisioningState() { + return this.innerModel().provisioningState(); + } + public String activationKey() { return this.innerModel().activationKey(); } @@ -60,24 +70,16 @@ public HcxEnterpriseSiteImpl withExistingPrivateCloud(String resourceGroupName, } public HcxEnterpriseSite create() { - this.innerObject = - serviceManager - .serviceClient() - .getHcxEnterpriseSites() - .createOrUpdateWithResponse( - resourceGroupName, privateCloudName, hcxEnterpriseSiteName, this.innerModel(), Context.NONE) - .getValue(); + this.innerObject + = serviceManager.serviceClient().getHcxEnterpriseSites().createOrUpdateWithResponse(resourceGroupName, + privateCloudName, hcxEnterpriseSiteName, this.innerModel(), Context.NONE).getValue(); return this; } public HcxEnterpriseSite create(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getHcxEnterpriseSites() - .createOrUpdateWithResponse( - resourceGroupName, privateCloudName, hcxEnterpriseSiteName, this.innerModel(), context) - .getValue(); + this.innerObject + = serviceManager.serviceClient().getHcxEnterpriseSites().createOrUpdateWithResponse(resourceGroupName, + privateCloudName, hcxEnterpriseSiteName, this.innerModel(), context).getValue(); return this; } @@ -92,52 +94,36 @@ public HcxEnterpriseSiteImpl update() { } public HcxEnterpriseSite apply() { - this.innerObject = - serviceManager - .serviceClient() - .getHcxEnterpriseSites() - .createOrUpdateWithResponse( - resourceGroupName, privateCloudName, hcxEnterpriseSiteName, this.innerModel(), Context.NONE) - .getValue(); + this.innerObject + = serviceManager.serviceClient().getHcxEnterpriseSites().createOrUpdateWithResponse(resourceGroupName, + privateCloudName, hcxEnterpriseSiteName, this.innerModel(), Context.NONE).getValue(); return this; } public HcxEnterpriseSite apply(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getHcxEnterpriseSites() - .createOrUpdateWithResponse( - resourceGroupName, privateCloudName, hcxEnterpriseSiteName, this.innerModel(), context) - .getValue(); + this.innerObject + = serviceManager.serviceClient().getHcxEnterpriseSites().createOrUpdateWithResponse(resourceGroupName, + privateCloudName, hcxEnterpriseSiteName, this.innerModel(), context).getValue(); return this; } HcxEnterpriseSiteImpl(HcxEnterpriseSiteInner innerObject, com.azure.resourcemanager.avs.AvsManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; - this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups"); - this.privateCloudName = Utils.getValueFromIdByName(innerObject.id(), "privateClouds"); - this.hcxEnterpriseSiteName = Utils.getValueFromIdByName(innerObject.id(), "hcxEnterpriseSites"); + this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); + this.privateCloudName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "privateClouds"); + this.hcxEnterpriseSiteName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "hcxEnterpriseSites"); } public HcxEnterpriseSite refresh() { - this.innerObject = - serviceManager - .serviceClient() - .getHcxEnterpriseSites() - .getWithResponse(resourceGroupName, privateCloudName, hcxEnterpriseSiteName, Context.NONE) - .getValue(); + this.innerObject = serviceManager.serviceClient().getHcxEnterpriseSites() + .getWithResponse(resourceGroupName, privateCloudName, hcxEnterpriseSiteName, Context.NONE).getValue(); return this; } public HcxEnterpriseSite refresh(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getHcxEnterpriseSites() - .getWithResponse(resourceGroupName, privateCloudName, hcxEnterpriseSiteName, context) - .getValue(); + this.innerObject = serviceManager.serviceClient().getHcxEnterpriseSites() + .getWithResponse(resourceGroupName, privateCloudName, hcxEnterpriseSiteName, context).getValue(); return this; } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/HcxEnterpriseSitesClientImpl.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/HcxEnterpriseSitesClientImpl.java index 2d35ee5a1d333..a2f9a5a03a983 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/HcxEnterpriseSitesClientImpl.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/HcxEnterpriseSitesClientImpl.java @@ -30,25 +30,31 @@ import com.azure.core.util.FluxUtil; import com.azure.resourcemanager.avs.fluent.HcxEnterpriseSitesClient; import com.azure.resourcemanager.avs.fluent.models.HcxEnterpriseSiteInner; -import com.azure.resourcemanager.avs.models.HcxEnterpriseSiteList; +import com.azure.resourcemanager.avs.models.HcxEnterpriseSiteListResult; import reactor.core.publisher.Mono; -/** An instance of this class provides access to all the operations defined in HcxEnterpriseSitesClient. */ +/** + * An instance of this class provides access to all the operations defined in HcxEnterpriseSitesClient. + */ public final class HcxEnterpriseSitesClientImpl implements HcxEnterpriseSitesClient { - /** The proxy service used to perform REST calls. */ + /** + * The proxy service used to perform REST calls. + */ private final HcxEnterpriseSitesService service; - /** The service client containing this operation class. */ + /** + * The service client containing this operation class. + */ private final AvsClientImpl client; /** * Initializes an instance of HcxEnterpriseSitesClientImpl. - * + * * @param client the instance of the service client containing this operation class. */ HcxEnterpriseSitesClientImpl(AvsClientImpl client) { - this.service = - RestProxy.create(HcxEnterpriseSitesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.service = RestProxy.create(HcxEnterpriseSitesService.class, client.getHttpPipeline(), + client.getSerializerAdapter()); this.client = client; } @@ -59,102 +65,80 @@ public final class HcxEnterpriseSitesClientImpl implements HcxEnterpriseSitesCli @Host("{$host}") @ServiceInterface(name = "AvsClientHcxEnterpri") public interface HcxEnterpriseSitesService { - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/hcxEnterpriseSites") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/hcxEnterpriseSites") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono> list(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("privateCloudName") String privateCloudName, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, + @PathParam("privateCloudName") String privateCloudName, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/hcxEnterpriseSites/{hcxEnterpriseSiteName}") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/hcxEnterpriseSites/{hcxEnterpriseSiteName}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono> get(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("privateCloudName") String privateCloudName, - @PathParam("hcxEnterpriseSiteName") String hcxEnterpriseSiteName, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, + @PathParam("hcxEnterpriseSiteName") String hcxEnterpriseSiteName, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/hcxEnterpriseSites/{hcxEnterpriseSiteName}") - @ExpectedResponses({200, 201}) + @Headers({ "Content-Type: application/json" }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/hcxEnterpriseSites/{hcxEnterpriseSiteName}") + @ExpectedResponses({ 200, 201 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> createOrUpdate( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono> createOrUpdate(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("privateCloudName") String privateCloudName, @PathParam("hcxEnterpriseSiteName") String hcxEnterpriseSiteName, - @QueryParam("api-version") String apiVersion, @BodyParam("application/json") HcxEnterpriseSiteInner hcxEnterpriseSite, - @HeaderParam("Accept") String accept, - Context context); + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Delete( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/hcxEnterpriseSites/{hcxEnterpriseSiteName}") - @ExpectedResponses({200, 204}) + @Headers({ "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/hcxEnterpriseSites/{hcxEnterpriseSiteName}") + @ExpectedResponses({ 200, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> delete( - @HostParam("$host") String endpoint, + Mono> delete(@HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("privateCloudName") String privateCloudName, - @PathParam("hcxEnterpriseSiteName") String hcxEnterpriseSiteName, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, + @PathParam("hcxEnterpriseSiteName") String hcxEnterpriseSiteName, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + Mono> listNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); } /** - * List HCX on-premises key in a private cloud. - * + * List HcxEnterpriseSite resources by PrivateCloud. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. * @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 paged list of HCX Enterprise Sites along with {@link PagedResponse} on successful completion of {@link - * Mono}. + * @return the response of a HcxEnterpriseSite list operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync( - String resourceGroupName, String privateCloudName) { + private Mono> listSinglePageAsync(String resourceGroupName, + String privateCloudName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -166,55 +150,35 @@ private Mono> listSinglePageAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .list( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - privateCloudName, - this.client.getApiVersion(), - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, 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 HCX on-premises key in a private cloud. - * + * List HcxEnterpriseSite resources by PrivateCloud. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. * @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 a paged list of HCX Enterprise Sites along with {@link PagedResponse} on successful completion of {@link - * Mono}. + * @return the response of a HcxEnterpriseSite list operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync( - String resourceGroupName, String privateCloudName, Context context) { + private Mono> listSinglePageAsync(String resourceGroupName, + String privateCloudName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -227,70 +191,55 @@ private Mono> listSinglePageAsync( final String accept = "application/json"; context = this.client.mergeContext(context); return service - .list( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - privateCloudName, - this.client.getApiVersion(), - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + .list(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, privateCloudName, accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** - * List HCX on-premises key in a private cloud. - * + * List HcxEnterpriseSite resources by PrivateCloud. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. * @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 paged list of HCX Enterprise Sites as paginated response with {@link PagedFlux}. + * @return the response of a HcxEnterpriseSite list operation as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(String resourceGroupName, String privateCloudName) { - return new PagedFlux<>( - () -> listSinglePageAsync(resourceGroupName, privateCloudName), + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, privateCloudName), nextLink -> listNextSinglePageAsync(nextLink)); } /** - * List HCX on-premises key in a private cloud. - * + * List HcxEnterpriseSite resources by PrivateCloud. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. * @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 a paged list of HCX Enterprise Sites as paginated response with {@link PagedFlux}. + * @return the response of a HcxEnterpriseSite list operation as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync( - String resourceGroupName, String privateCloudName, Context context) { - return new PagedFlux<>( - () -> listSinglePageAsync(resourceGroupName, privateCloudName, context), + private PagedFlux listAsync(String resourceGroupName, String privateCloudName, + Context context) { + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, privateCloudName, context), nextLink -> listNextSinglePageAsync(nextLink, context)); } /** - * List HCX on-premises key in a private cloud. - * + * List HcxEnterpriseSite resources by PrivateCloud. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. * @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 paged list of HCX Enterprise Sites as paginated response with {@link PagedIterable}. + * @return the response of a HcxEnterpriseSite list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(String resourceGroupName, String privateCloudName) { @@ -298,48 +247,43 @@ public PagedIterable list(String resourceGroupName, Stri } /** - * List HCX on-premises key in a private cloud. - * + * List HcxEnterpriseSite resources by PrivateCloud. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. * @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 a paged list of HCX Enterprise Sites as paginated response with {@link PagedIterable}. + * @return the response of a HcxEnterpriseSite list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list( - String resourceGroupName, String privateCloudName, Context context) { + public PagedIterable list(String resourceGroupName, String privateCloudName, + Context context) { return new PagedIterable<>(listAsync(resourceGroupName, privateCloudName, context)); } /** - * Get an HCX on-premises key by name in a private cloud. - * + * Get a HcxEnterpriseSite. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param hcxEnterpriseSiteName Name of the HCX Enterprise Site in the private cloud. + * @param hcxEnterpriseSiteName Name of the HCX Enterprise Site. * @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 an HCX on-premises key by name in a private cloud along with {@link Response} on successful completion of - * {@link Mono}. + * @return a HcxEnterpriseSite along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String privateCloudName, String hcxEnterpriseSiteName) { + private Mono> getWithResponseAsync(String resourceGroupName, + String privateCloudName, String hcxEnterpriseSiteName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -355,48 +299,34 @@ private Mono> getWithResponseAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .get( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - privateCloudName, - hcxEnterpriseSiteName, - this.client.getApiVersion(), - accept, - context)) + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, hcxEnterpriseSiteName, accept, + context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Get an HCX on-premises key by name in a private cloud. - * + * Get a HcxEnterpriseSite. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param hcxEnterpriseSiteName Name of the HCX Enterprise Site in the private cloud. + * @param hcxEnterpriseSiteName Name of the HCX Enterprise Site. * @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 an HCX on-premises key by name in a private cloud along with {@link Response} on successful completion of - * {@link Mono}. + * @return a HcxEnterpriseSite along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String privateCloudName, String hcxEnterpriseSiteName, Context context) { + private Mono> getWithResponseAsync(String resourceGroupName, + String privateCloudName, String hcxEnterpriseSiteName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -412,64 +342,56 @@ private Mono> getWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .get( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - privateCloudName, - hcxEnterpriseSiteName, - this.client.getApiVersion(), - accept, - context); + return service.get(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, privateCloudName, hcxEnterpriseSiteName, accept, context); } /** - * Get an HCX on-premises key by name in a private cloud. - * + * Get a HcxEnterpriseSite. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param hcxEnterpriseSiteName Name of the HCX Enterprise Site in the private cloud. + * @param hcxEnterpriseSiteName Name of the HCX Enterprise Site. * @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 an HCX on-premises key by name in a private cloud on successful completion of {@link Mono}. + * @return a HcxEnterpriseSite on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync( - String resourceGroupName, String privateCloudName, String hcxEnterpriseSiteName) { + private Mono getAsync(String resourceGroupName, String privateCloudName, + String hcxEnterpriseSiteName) { return getWithResponseAsync(resourceGroupName, privateCloudName, hcxEnterpriseSiteName) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** - * Get an HCX on-premises key by name in a private cloud. - * + * Get a HcxEnterpriseSite. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param hcxEnterpriseSiteName Name of the HCX Enterprise Site in the private cloud. + * @param hcxEnterpriseSiteName Name of the HCX Enterprise Site. * @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 an HCX on-premises key by name in a private cloud along with {@link Response}. + * @return a HcxEnterpriseSite along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, String privateCloudName, String hcxEnterpriseSiteName, Context context) { + public Response getWithResponse(String resourceGroupName, String privateCloudName, + String hcxEnterpriseSiteName, Context context) { return getWithResponseAsync(resourceGroupName, privateCloudName, hcxEnterpriseSiteName, context).block(); } /** - * Get an HCX on-premises key by name in a private cloud. - * + * Get a HcxEnterpriseSite. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param hcxEnterpriseSiteName Name of the HCX Enterprise Site in the private cloud. + * @param hcxEnterpriseSiteName Name of the HCX Enterprise Site. * @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 an HCX on-premises key by name in a private cloud. + * @return a HcxEnterpriseSite. */ @ServiceMethod(returns = ReturnType.SINGLE) public HcxEnterpriseSiteInner get(String resourceGroupName, String privateCloudName, String hcxEnterpriseSiteName) { @@ -477,34 +399,27 @@ public HcxEnterpriseSiteInner get(String resourceGroupName, String privateCloudN } /** - * Create or update an activation key for on-premises HCX site. - * + * Create a HcxEnterpriseSite. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName The name of the private cloud. - * @param hcxEnterpriseSiteName Name of the HCX Enterprise Site in the private cloud. - * @param hcxEnterpriseSite The HCX Enterprise Site. + * @param privateCloudName Name of the private cloud. + * @param hcxEnterpriseSiteName Name of the HCX Enterprise Site. + * @param hcxEnterpriseSite Resource create parameters. * @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 an HCX Enterprise Site resource along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createOrUpdateWithResponseAsync( - String resourceGroupName, - String privateCloudName, - String hcxEnterpriseSiteName, - HcxEnterpriseSiteInner hcxEnterpriseSite) { + private Mono> createOrUpdateWithResponseAsync(String resourceGroupName, + String privateCloudName, String hcxEnterpriseSiteName, HcxEnterpriseSiteInner hcxEnterpriseSite) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -526,29 +441,19 @@ private Mono> createOrUpdateWithResponseAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .createOrUpdate( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - privateCloudName, - hcxEnterpriseSiteName, - this.client.getApiVersion(), - hcxEnterpriseSite, - accept, - context)) + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, hcxEnterpriseSiteName, + hcxEnterpriseSite, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Create or update an activation key for on-premises HCX site. - * + * Create a HcxEnterpriseSite. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName The name of the private cloud. - * @param hcxEnterpriseSiteName Name of the HCX Enterprise Site in the private cloud. - * @param hcxEnterpriseSite The HCX Enterprise Site. + * @param privateCloudName Name of the private cloud. + * @param hcxEnterpriseSiteName Name of the HCX Enterprise Site. + * @param hcxEnterpriseSite Resource create parameters. * @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. @@ -556,23 +461,16 @@ private Mono> createOrUpdateWithResponseAsync( * @return an HCX Enterprise Site resource along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createOrUpdateWithResponseAsync( - String resourceGroupName, - String privateCloudName, - String hcxEnterpriseSiteName, - HcxEnterpriseSiteInner hcxEnterpriseSite, + private Mono> createOrUpdateWithResponseAsync(String resourceGroupName, + String privateCloudName, String hcxEnterpriseSiteName, HcxEnterpriseSiteInner hcxEnterpriseSite, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -594,49 +492,37 @@ private Mono> createOrUpdateWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .createOrUpdate( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - privateCloudName, - hcxEnterpriseSiteName, - this.client.getApiVersion(), - hcxEnterpriseSite, - accept, - context); + return service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, hcxEnterpriseSiteName, + hcxEnterpriseSite, accept, context); } /** - * Create or update an activation key for on-premises HCX site. - * + * Create a HcxEnterpriseSite. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName The name of the private cloud. - * @param hcxEnterpriseSiteName Name of the HCX Enterprise Site in the private cloud. - * @param hcxEnterpriseSite The HCX Enterprise Site. + * @param privateCloudName Name of the private cloud. + * @param hcxEnterpriseSiteName Name of the HCX Enterprise Site. + * @param hcxEnterpriseSite Resource create parameters. * @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 an HCX Enterprise Site resource on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync( - String resourceGroupName, - String privateCloudName, - String hcxEnterpriseSiteName, - HcxEnterpriseSiteInner hcxEnterpriseSite) { - return createOrUpdateWithResponseAsync( - resourceGroupName, privateCloudName, hcxEnterpriseSiteName, hcxEnterpriseSite) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); + private Mono createOrUpdateAsync(String resourceGroupName, String privateCloudName, + String hcxEnterpriseSiteName, HcxEnterpriseSiteInner hcxEnterpriseSite) { + return createOrUpdateWithResponseAsync(resourceGroupName, privateCloudName, hcxEnterpriseSiteName, + hcxEnterpriseSite).flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** - * Create or update an activation key for on-premises HCX site. - * + * Create a HcxEnterpriseSite. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName The name of the private cloud. - * @param hcxEnterpriseSiteName Name of the HCX Enterprise Site in the private cloud. - * @param hcxEnterpriseSite The HCX Enterprise Site. + * @param privateCloudName Name of the private cloud. + * @param hcxEnterpriseSiteName Name of the HCX Enterprise Site. + * @param hcxEnterpriseSite Resource create parameters. * @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. @@ -644,65 +530,53 @@ private Mono createOrUpdateAsync( * @return an HCX Enterprise Site resource along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response createOrUpdateWithResponse( - String resourceGroupName, - String privateCloudName, - String hcxEnterpriseSiteName, - HcxEnterpriseSiteInner hcxEnterpriseSite, + public Response createOrUpdateWithResponse(String resourceGroupName, + String privateCloudName, String hcxEnterpriseSiteName, HcxEnterpriseSiteInner hcxEnterpriseSite, Context context) { - return createOrUpdateWithResponseAsync( - resourceGroupName, privateCloudName, hcxEnterpriseSiteName, hcxEnterpriseSite, context) - .block(); + return createOrUpdateWithResponseAsync(resourceGroupName, privateCloudName, hcxEnterpriseSiteName, + hcxEnterpriseSite, context).block(); } /** - * Create or update an activation key for on-premises HCX site. - * + * Create a HcxEnterpriseSite. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName The name of the private cloud. - * @param hcxEnterpriseSiteName Name of the HCX Enterprise Site in the private cloud. - * @param hcxEnterpriseSite The HCX Enterprise Site. + * @param privateCloudName Name of the private cloud. + * @param hcxEnterpriseSiteName Name of the HCX Enterprise Site. + * @param hcxEnterpriseSite Resource create parameters. * @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 an HCX Enterprise Site resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - public HcxEnterpriseSiteInner createOrUpdate( - String resourceGroupName, - String privateCloudName, - String hcxEnterpriseSiteName, - HcxEnterpriseSiteInner hcxEnterpriseSite) { - return createOrUpdateWithResponse( - resourceGroupName, privateCloudName, hcxEnterpriseSiteName, hcxEnterpriseSite, Context.NONE) - .getValue(); + public HcxEnterpriseSiteInner createOrUpdate(String resourceGroupName, String privateCloudName, + String hcxEnterpriseSiteName, HcxEnterpriseSiteInner hcxEnterpriseSite) { + return createOrUpdateWithResponse(resourceGroupName, privateCloudName, hcxEnterpriseSiteName, hcxEnterpriseSite, + Context.NONE).getValue(); } /** - * Delete HCX on-premises key in a private cloud. - * + * Delete a HcxEnterpriseSite. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param hcxEnterpriseSiteName Name of the HCX Enterprise Site in the private cloud. + * @param hcxEnterpriseSiteName Name of the HCX Enterprise Site. * @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 privateCloudName, String hcxEnterpriseSiteName) { + private Mono> deleteWithResponseAsync(String resourceGroupName, String privateCloudName, + String hcxEnterpriseSiteName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -718,27 +592,18 @@ private Mono> deleteWithResponseAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .delete( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - privateCloudName, - hcxEnterpriseSiteName, - this.client.getApiVersion(), - accept, - context)) + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, hcxEnterpriseSiteName, accept, + context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Delete HCX on-premises key in a private cloud. - * + * Delete a HcxEnterpriseSite. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param hcxEnterpriseSiteName Name of the HCX Enterprise Site in the private cloud. + * @param hcxEnterpriseSiteName Name of the HCX Enterprise Site. * @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. @@ -746,19 +611,15 @@ private Mono> deleteWithResponseAsync( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> deleteWithResponseAsync( - String resourceGroupName, String privateCloudName, String hcxEnterpriseSiteName, Context context) { + private Mono> deleteWithResponseAsync(String resourceGroupName, String privateCloudName, + String hcxEnterpriseSiteName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -774,24 +635,16 @@ private Mono> deleteWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .delete( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - privateCloudName, - hcxEnterpriseSiteName, - this.client.getApiVersion(), - accept, - context); + return service.delete(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, privateCloudName, hcxEnterpriseSiteName, accept, context); } /** - * Delete HCX on-premises key in a private cloud. - * + * Delete a HcxEnterpriseSite. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param hcxEnterpriseSiteName Name of the HCX Enterprise Site in the private cloud. + * @param hcxEnterpriseSiteName Name of the HCX Enterprise Site. * @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. @@ -804,11 +657,11 @@ private Mono deleteAsync(String resourceGroupName, String privateCloudName } /** - * Delete HCX on-premises key in a private cloud. - * + * Delete a HcxEnterpriseSite. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param hcxEnterpriseSiteName Name of the HCX Enterprise Site in the private cloud. + * @param hcxEnterpriseSiteName Name of the HCX Enterprise Site. * @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. @@ -816,17 +669,17 @@ private Mono deleteAsync(String resourceGroupName, String privateCloudName * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response deleteWithResponse( - String resourceGroupName, String privateCloudName, String hcxEnterpriseSiteName, Context context) { + public Response deleteWithResponse(String resourceGroupName, String privateCloudName, + String hcxEnterpriseSiteName, Context context) { return deleteWithResponseAsync(resourceGroupName, privateCloudName, hcxEnterpriseSiteName, context).block(); } /** - * Delete HCX on-premises key in a private cloud. - * + * Delete a HcxEnterpriseSite. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param hcxEnterpriseSiteName Name of the HCX Enterprise Site in the private cloud. + * @param hcxEnterpriseSiteName Name of the HCX Enterprise Site. * @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. @@ -838,14 +691,15 @@ public void delete(String resourceGroupName, String privateCloudName, String hcx /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * 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 a paged list of HCX Enterprise Sites along with {@link PagedResponse} on successful completion of {@link - * Mono}. + * @return the response of a HcxEnterpriseSite list operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink) { @@ -853,37 +707,28 @@ private Mono> listNextSinglePageAsync(Stri 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.")); + 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.listNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + return FluxUtil.withContext(context -> service.listNext(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 URL to get the next list of items - *

The nextLink parameter. + * + * 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 a paged list of HCX Enterprise Sites along with {@link PagedResponse} on successful completion of {@link - * Mono}. + * @return the response of a HcxEnterpriseSite list operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink, Context context) { @@ -891,23 +736,13 @@ private Mono> listNextSinglePageAsync(Stri 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.")); + 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 - .listNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.listNext(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/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/HcxEnterpriseSitesImpl.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/HcxEnterpriseSitesImpl.java index da02e1679aa18..5dc1ff94692e2 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/HcxEnterpriseSitesImpl.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/HcxEnterpriseSitesImpl.java @@ -21,32 +21,29 @@ public final class HcxEnterpriseSitesImpl implements HcxEnterpriseSites { private final com.azure.resourcemanager.avs.AvsManager serviceManager; - public HcxEnterpriseSitesImpl( - HcxEnterpriseSitesClient innerClient, com.azure.resourcemanager.avs.AvsManager serviceManager) { + public HcxEnterpriseSitesImpl(HcxEnterpriseSitesClient innerClient, + com.azure.resourcemanager.avs.AvsManager serviceManager) { this.innerClient = innerClient; this.serviceManager = serviceManager; } public PagedIterable list(String resourceGroupName, String privateCloudName) { PagedIterable inner = this.serviceClient().list(resourceGroupName, privateCloudName); - return Utils.mapPage(inner, inner1 -> new HcxEnterpriseSiteImpl(inner1, this.manager())); + return ResourceManagerUtils.mapPage(inner, inner1 -> new HcxEnterpriseSiteImpl(inner1, this.manager())); } public PagedIterable list(String resourceGroupName, String privateCloudName, Context context) { - PagedIterable inner = - this.serviceClient().list(resourceGroupName, privateCloudName, context); - return Utils.mapPage(inner, inner1 -> new HcxEnterpriseSiteImpl(inner1, this.manager())); + PagedIterable inner + = this.serviceClient().list(resourceGroupName, privateCloudName, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new HcxEnterpriseSiteImpl(inner1, this.manager())); } - public Response getWithResponse( - String resourceGroupName, String privateCloudName, String hcxEnterpriseSiteName, Context context) { - Response inner = - this.serviceClient().getWithResponse(resourceGroupName, privateCloudName, hcxEnterpriseSiteName, context); + public Response getWithResponse(String resourceGroupName, String privateCloudName, + String hcxEnterpriseSiteName, Context context) { + Response inner + = this.serviceClient().getWithResponse(resourceGroupName, privateCloudName, hcxEnterpriseSiteName, context); if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), new HcxEnterpriseSiteImpl(inner.getValue(), this.manager())); } else { return null; @@ -54,8 +51,8 @@ public Response getWithResponse( } public HcxEnterpriseSite get(String resourceGroupName, String privateCloudName, String hcxEnterpriseSiteName) { - HcxEnterpriseSiteInner inner = - this.serviceClient().get(resourceGroupName, privateCloudName, hcxEnterpriseSiteName); + HcxEnterpriseSiteInner inner + = this.serviceClient().get(resourceGroupName, privateCloudName, hcxEnterpriseSiteName); if (inner != null) { return new HcxEnterpriseSiteImpl(inner, this.manager()); } else { @@ -63,11 +60,10 @@ public HcxEnterpriseSite get(String resourceGroupName, String privateCloudName, } } - public Response deleteWithResponse( - String resourceGroupName, String privateCloudName, String hcxEnterpriseSiteName, Context context) { - return this - .serviceClient() - .deleteWithResponse(resourceGroupName, privateCloudName, hcxEnterpriseSiteName, context); + public Response deleteWithResponse(String resourceGroupName, String privateCloudName, + String hcxEnterpriseSiteName, Context context) { + return this.serviceClient().deleteWithResponse(resourceGroupName, privateCloudName, hcxEnterpriseSiteName, + context); } public void delete(String resourceGroupName, String privateCloudName, String hcxEnterpriseSiteName) { @@ -75,115 +71,78 @@ public void delete(String resourceGroupName, String privateCloudName, String hcx } public HcxEnterpriseSite getById(String id) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + String resourceGroupName = ResourceManagerUtils.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))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } - String privateCloudName = Utils.getValueFromIdByName(id, "privateClouds"); + String privateCloudName = ResourceManagerUtils.getValueFromIdByName(id, "privateClouds"); if (privateCloudName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'privateClouds'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'privateClouds'.", id))); } - String hcxEnterpriseSiteName = Utils.getValueFromIdByName(id, "hcxEnterpriseSites"); + String hcxEnterpriseSiteName = ResourceManagerUtils.getValueFromIdByName(id, "hcxEnterpriseSites"); if (hcxEnterpriseSiteName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format( - "The resource ID '%s' is not valid. Missing path segment 'hcxEnterpriseSites'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'hcxEnterpriseSites'.", id))); } - return this - .getWithResponse(resourceGroupName, privateCloudName, hcxEnterpriseSiteName, Context.NONE) + return this.getWithResponse(resourceGroupName, privateCloudName, hcxEnterpriseSiteName, Context.NONE) .getValue(); } public Response getByIdWithResponse(String id, Context context) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + String resourceGroupName = ResourceManagerUtils.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))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } - String privateCloudName = Utils.getValueFromIdByName(id, "privateClouds"); + String privateCloudName = ResourceManagerUtils.getValueFromIdByName(id, "privateClouds"); if (privateCloudName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'privateClouds'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'privateClouds'.", id))); } - String hcxEnterpriseSiteName = Utils.getValueFromIdByName(id, "hcxEnterpriseSites"); + String hcxEnterpriseSiteName = ResourceManagerUtils.getValueFromIdByName(id, "hcxEnterpriseSites"); if (hcxEnterpriseSiteName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format( - "The resource ID '%s' is not valid. Missing path segment 'hcxEnterpriseSites'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'hcxEnterpriseSites'.", id))); } return this.getWithResponse(resourceGroupName, privateCloudName, hcxEnterpriseSiteName, context); } public void deleteById(String id) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + String resourceGroupName = ResourceManagerUtils.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))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } - String privateCloudName = Utils.getValueFromIdByName(id, "privateClouds"); + String privateCloudName = ResourceManagerUtils.getValueFromIdByName(id, "privateClouds"); if (privateCloudName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'privateClouds'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'privateClouds'.", id))); } - String hcxEnterpriseSiteName = Utils.getValueFromIdByName(id, "hcxEnterpriseSites"); + String hcxEnterpriseSiteName = ResourceManagerUtils.getValueFromIdByName(id, "hcxEnterpriseSites"); if (hcxEnterpriseSiteName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format( - "The resource ID '%s' is not valid. Missing path segment 'hcxEnterpriseSites'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'hcxEnterpriseSites'.", id))); } this.deleteWithResponse(resourceGroupName, privateCloudName, hcxEnterpriseSiteName, Context.NONE); } public Response deleteByIdWithResponse(String id, Context context) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + String resourceGroupName = ResourceManagerUtils.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))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } - String privateCloudName = Utils.getValueFromIdByName(id, "privateClouds"); + String privateCloudName = ResourceManagerUtils.getValueFromIdByName(id, "privateClouds"); if (privateCloudName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'privateClouds'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'privateClouds'.", id))); } - String hcxEnterpriseSiteName = Utils.getValueFromIdByName(id, "hcxEnterpriseSites"); + String hcxEnterpriseSiteName = ResourceManagerUtils.getValueFromIdByName(id, "hcxEnterpriseSites"); if (hcxEnterpriseSiteName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format( - "The resource ID '%s' is not valid. Missing path segment 'hcxEnterpriseSites'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'hcxEnterpriseSites'.", id))); } return this.deleteWithResponse(resourceGroupName, privateCloudName, hcxEnterpriseSiteName, context); } diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/IscsiPathImpl.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/IscsiPathImpl.java new file mode 100644 index 0000000000000..5e900351c35b4 --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/IscsiPathImpl.java @@ -0,0 +1,53 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.avs.implementation; + +import com.azure.core.management.SystemData; +import com.azure.resourcemanager.avs.fluent.models.IscsiPathInner; +import com.azure.resourcemanager.avs.models.IscsiPath; +import com.azure.resourcemanager.avs.models.IscsiPathProvisioningState; + +public final class IscsiPathImpl implements IscsiPath { + private IscsiPathInner innerObject; + + private final com.azure.resourcemanager.avs.AvsManager serviceManager; + + IscsiPathImpl(IscsiPathInner innerObject, com.azure.resourcemanager.avs.AvsManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + } + + public String id() { + return this.innerModel().id(); + } + + public String name() { + return this.innerModel().name(); + } + + public String type() { + return this.innerModel().type(); + } + + public SystemData systemData() { + return this.innerModel().systemData(); + } + + public IscsiPathProvisioningState provisioningState() { + return this.innerModel().provisioningState(); + } + + public String networkBlock() { + return this.innerModel().networkBlock(); + } + + public IscsiPathInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.avs.AvsManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/IscsiPathsClientImpl.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/IscsiPathsClientImpl.java new file mode 100644 index 0000000000000..474171081d0e4 --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/IscsiPathsClientImpl.java @@ -0,0 +1,881 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.avs.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.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.avs.fluent.IscsiPathsClient; +import com.azure.resourcemanager.avs.fluent.models.IscsiPathInner; +import com.azure.resourcemanager.avs.models.IscsiPathListResult; +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 IscsiPathsClient. + */ +public final class IscsiPathsClientImpl implements IscsiPathsClient { + /** + * The proxy service used to perform REST calls. + */ + private final IscsiPathsService service; + + /** + * The service client containing this operation class. + */ + private final AvsClientImpl client; + + /** + * Initializes an instance of IscsiPathsClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + IscsiPathsClientImpl(AvsClientImpl client) { + this.service + = RestProxy.create(IscsiPathsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for AvsClientIscsiPaths to be used by the proxy service to perform REST + * calls. + */ + @Host("{$host}") + @ServiceInterface(name = "AvsClientIscsiPaths") + public interface IscsiPathsService { + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/iscsiPaths") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByPrivateCloud(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("privateCloudName") String privateCloudName, @HeaderParam("Accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/iscsiPaths/default") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> get(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("privateCloudName") String privateCloudName, @HeaderParam("Accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/iscsiPaths/default") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> createOrUpdate(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("privateCloudName") String privateCloudName, + @BodyParam("application/json") IscsiPathInner resource, @HeaderParam("Accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/iscsiPaths/default") + @ExpectedResponses({ 200, 202, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> delete(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("privateCloudName") String privateCloudName, @HeaderParam("Accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByPrivateCloudNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); + } + + /** + * List IscsiPath resources by PrivateCloud. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @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 of a IscsiPath list operation along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByPrivateCloudSinglePageAsync(String resourceGroupName, + String privateCloudName) { + 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 (privateCloudName == null) { + return Mono + .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listByPrivateCloud(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, 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 IscsiPath resources by PrivateCloud. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @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 of a IscsiPath list operation along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByPrivateCloudSinglePageAsync(String resourceGroupName, + String privateCloudName, 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 (privateCloudName == null) { + return Mono + .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .listByPrivateCloud(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, privateCloudName, accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } + + /** + * List IscsiPath resources by PrivateCloud. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @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 of a IscsiPath list operation as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByPrivateCloudAsync(String resourceGroupName, String privateCloudName) { + return new PagedFlux<>(() -> listByPrivateCloudSinglePageAsync(resourceGroupName, privateCloudName), + nextLink -> listByPrivateCloudNextSinglePageAsync(nextLink)); + } + + /** + * List IscsiPath resources by PrivateCloud. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @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 of a IscsiPath list operation as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByPrivateCloudAsync(String resourceGroupName, String privateCloudName, + Context context) { + return new PagedFlux<>(() -> listByPrivateCloudSinglePageAsync(resourceGroupName, privateCloudName, context), + nextLink -> listByPrivateCloudNextSinglePageAsync(nextLink, context)); + } + + /** + * List IscsiPath resources by PrivateCloud. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @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 of a IscsiPath list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByPrivateCloud(String resourceGroupName, String privateCloudName) { + return new PagedIterable<>(listByPrivateCloudAsync(resourceGroupName, privateCloudName)); + } + + /** + * List IscsiPath resources by PrivateCloud. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @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 of a IscsiPath list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByPrivateCloud(String resourceGroupName, String privateCloudName, + Context context) { + return new PagedIterable<>(listByPrivateCloudAsync(resourceGroupName, privateCloudName, context)); + } + + /** + * Get a IscsiPath. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @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 IscsiPath along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync(String resourceGroupName, String privateCloudName) { + 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 (privateCloudName == null) { + return Mono + .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get a IscsiPath. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @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 a IscsiPath along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync(String resourceGroupName, String privateCloudName, + 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 (privateCloudName == null) { + return Mono + .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.get(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, privateCloudName, accept, context); + } + + /** + * Get a IscsiPath. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @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 IscsiPath on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getAsync(String resourceGroupName, String privateCloudName) { + return getWithResponseAsync(resourceGroupName, privateCloudName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Get a IscsiPath. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @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 a IscsiPath along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse(String resourceGroupName, String privateCloudName, + Context context) { + return getWithResponseAsync(resourceGroupName, privateCloudName, context).block(); + } + + /** + * Get a IscsiPath. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @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 IscsiPath. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public IscsiPathInner get(String resourceGroupName, String privateCloudName) { + return getWithResponse(resourceGroupName, privateCloudName, Context.NONE).getValue(); + } + + /** + * Create a IscsiPath. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param resource Resource create parameters. + * @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 an iSCSI path resource along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String privateCloudName, IscsiPathInner resource) { + 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 (privateCloudName == null) { + return Mono + .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } + if (resource == null) { + return Mono.error(new IllegalArgumentException("Parameter resource is required and cannot be null.")); + } else { + resource.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, resource, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Create a IscsiPath. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param resource Resource create parameters. + * @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 an iSCSI path resource along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String privateCloudName, IscsiPathInner resource, 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 (privateCloudName == null) { + return Mono + .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } + if (resource == null) { + return Mono.error(new IllegalArgumentException("Parameter resource is required and cannot be null.")); + } else { + resource.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, resource, accept, context); + } + + /** + * Create a IscsiPath. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param resource Resource create parameters. + * @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 an iSCSI path resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, IscsiPathInner> beginCreateOrUpdateAsync(String resourceGroupName, + String privateCloudName, IscsiPathInner resource) { + Mono>> mono + = createOrUpdateWithResponseAsync(resourceGroupName, privateCloudName, resource); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + IscsiPathInner.class, IscsiPathInner.class, this.client.getContext()); + } + + /** + * Create a IscsiPath. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param resource Resource create parameters. + * @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 an iSCSI path resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, IscsiPathInner> beginCreateOrUpdateAsync(String resourceGroupName, + String privateCloudName, IscsiPathInner resource, Context context) { + context = this.client.mergeContext(context); + Mono>> mono + = createOrUpdateWithResponseAsync(resourceGroupName, privateCloudName, resource, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + IscsiPathInner.class, IscsiPathInner.class, context); + } + + /** + * Create a IscsiPath. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param resource Resource create parameters. + * @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 an iSCSI path resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, IscsiPathInner> beginCreateOrUpdate(String resourceGroupName, + String privateCloudName, IscsiPathInner resource) { + return this.beginCreateOrUpdateAsync(resourceGroupName, privateCloudName, resource).getSyncPoller(); + } + + /** + * Create a IscsiPath. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param resource Resource create parameters. + * @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 an iSCSI path resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, IscsiPathInner> beginCreateOrUpdate(String resourceGroupName, + String privateCloudName, IscsiPathInner resource, Context context) { + return this.beginCreateOrUpdateAsync(resourceGroupName, privateCloudName, resource, context).getSyncPoller(); + } + + /** + * Create a IscsiPath. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param resource Resource create parameters. + * @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 an iSCSI path resource on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync(String resourceGroupName, String privateCloudName, + IscsiPathInner resource) { + return beginCreateOrUpdateAsync(resourceGroupName, privateCloudName, resource).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Create a IscsiPath. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param resource Resource create parameters. + * @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 an iSCSI path resource on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync(String resourceGroupName, String privateCloudName, + IscsiPathInner resource, Context context) { + return beginCreateOrUpdateAsync(resourceGroupName, privateCloudName, resource, context).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Create a IscsiPath. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param resource Resource create parameters. + * @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 an iSCSI path resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public IscsiPathInner createOrUpdate(String resourceGroupName, String privateCloudName, IscsiPathInner resource) { + return createOrUpdateAsync(resourceGroupName, privateCloudName, resource).block(); + } + + /** + * Create a IscsiPath. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param resource Resource create parameters. + * @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 an iSCSI path resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public IscsiPathInner createOrUpdate(String resourceGroupName, String privateCloudName, IscsiPathInner resource, + Context context) { + return createOrUpdateAsync(resourceGroupName, privateCloudName, resource, context).block(); + } + + /** + * Delete a IscsiPath. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @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 privateCloudName) { + 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 (privateCloudName == null) { + return Mono + .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Delete a IscsiPath. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @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 privateCloudName, + 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 (privateCloudName == null) { + return Mono + .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.delete(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, privateCloudName, accept, context); + } + + /** + * Delete a IscsiPath. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @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 long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String privateCloudName) { + Mono>> mono = deleteWithResponseAsync(resourceGroupName, privateCloudName); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); + } + + /** + * Delete a IscsiPath. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @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 long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String privateCloudName, + Context context) { + context = this.client.mergeContext(context); + Mono>> mono = deleteWithResponseAsync(resourceGroupName, privateCloudName, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + context); + } + + /** + * Delete a IscsiPath. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @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 long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDelete(String resourceGroupName, String privateCloudName) { + return this.beginDeleteAsync(resourceGroupName, privateCloudName).getSyncPoller(); + } + + /** + * Delete a IscsiPath. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @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 long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDelete(String resourceGroupName, String privateCloudName, + Context context) { + return this.beginDeleteAsync(resourceGroupName, privateCloudName, context).getSyncPoller(); + } + + /** + * Delete a IscsiPath. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @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 privateCloudName) { + return beginDeleteAsync(resourceGroupName, privateCloudName).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Delete a IscsiPath. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @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 A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteAsync(String resourceGroupName, String privateCloudName, Context context) { + return beginDeleteAsync(resourceGroupName, privateCloudName, context).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Delete a IscsiPath. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @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 privateCloudName) { + deleteAsync(resourceGroupName, privateCloudName).block(); + } + + /** + * Delete a IscsiPath. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceGroupName, String privateCloudName, Context context) { + deleteAsync(resourceGroupName, privateCloudName, context).block(); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items + * + * 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 of a IscsiPath list operation along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByPrivateCloudNextSinglePageAsync(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.listByPrivateCloudNext(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 URL to get the next list of items + * + * 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 of a IscsiPath list operation along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByPrivateCloudNextSinglePageAsync(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.listByPrivateCloudNext(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/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/IscsiPathsImpl.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/IscsiPathsImpl.java new file mode 100644 index 0000000000000..08222a97bdde3 --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/IscsiPathsImpl.java @@ -0,0 +1,97 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.avs.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.avs.fluent.IscsiPathsClient; +import com.azure.resourcemanager.avs.fluent.models.IscsiPathInner; +import com.azure.resourcemanager.avs.models.IscsiPath; +import com.azure.resourcemanager.avs.models.IscsiPaths; + +public final class IscsiPathsImpl implements IscsiPaths { + private static final ClientLogger LOGGER = new ClientLogger(IscsiPathsImpl.class); + + private final IscsiPathsClient innerClient; + + private final com.azure.resourcemanager.avs.AvsManager serviceManager; + + public IscsiPathsImpl(IscsiPathsClient innerClient, com.azure.resourcemanager.avs.AvsManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public PagedIterable listByPrivateCloud(String resourceGroupName, String privateCloudName) { + PagedIterable inner + = this.serviceClient().listByPrivateCloud(resourceGroupName, privateCloudName); + return ResourceManagerUtils.mapPage(inner, inner1 -> new IscsiPathImpl(inner1, this.manager())); + } + + public PagedIterable listByPrivateCloud(String resourceGroupName, String privateCloudName, + Context context) { + PagedIterable inner + = this.serviceClient().listByPrivateCloud(resourceGroupName, privateCloudName, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new IscsiPathImpl(inner1, this.manager())); + } + + public Response getWithResponse(String resourceGroupName, String privateCloudName, Context context) { + Response inner + = this.serviceClient().getWithResponse(resourceGroupName, privateCloudName, context); + if (inner != null) { + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new IscsiPathImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public IscsiPath get(String resourceGroupName, String privateCloudName) { + IscsiPathInner inner = this.serviceClient().get(resourceGroupName, privateCloudName); + if (inner != null) { + return new IscsiPathImpl(inner, this.manager()); + } else { + return null; + } + } + + public IscsiPath createOrUpdate(String resourceGroupName, String privateCloudName, IscsiPathInner resource) { + IscsiPathInner inner = this.serviceClient().createOrUpdate(resourceGroupName, privateCloudName, resource); + if (inner != null) { + return new IscsiPathImpl(inner, this.manager()); + } else { + return null; + } + } + + public IscsiPath createOrUpdate(String resourceGroupName, String privateCloudName, IscsiPathInner resource, + Context context) { + IscsiPathInner inner + = this.serviceClient().createOrUpdate(resourceGroupName, privateCloudName, resource, context); + if (inner != null) { + return new IscsiPathImpl(inner, this.manager()); + } else { + return null; + } + } + + public void deleteByResourceGroup(String resourceGroupName, String privateCloudName) { + this.serviceClient().delete(resourceGroupName, privateCloudName); + } + + public void delete(String resourceGroupName, String privateCloudName, Context context) { + this.serviceClient().delete(resourceGroupName, privateCloudName, context); + } + + private IscsiPathsClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.avs.AvsManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/LocationsClientImpl.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/LocationsClientImpl.java index fc7a7b2aaeb0c..aba40d6e6af45 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/LocationsClientImpl.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/LocationsClientImpl.java @@ -28,22 +28,28 @@ import com.azure.resourcemanager.avs.models.Sku; import reactor.core.publisher.Mono; -/** An instance of this class provides access to all the operations defined in LocationsClient. */ +/** + * An instance of this class provides access to all the operations defined in LocationsClient. + */ public final class LocationsClientImpl implements LocationsClient { - /** The proxy service used to perform REST calls. */ + /** + * The proxy service used to perform REST calls. + */ private final LocationsService service; - /** The service client containing this operation class. */ + /** + * The service client containing this operation class. + */ private final AvsClientImpl client; /** * Initializes an instance of LocationsClientImpl. - * + * * @param client the instance of the service client containing this operation class. */ LocationsClientImpl(AvsClientImpl client) { - this.service = - RestProxy.create(LocationsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.service + = RestProxy.create(LocationsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } @@ -54,289 +60,235 @@ public final class LocationsClientImpl implements LocationsClient { @Host("{$host}") @ServiceInterface(name = "AvsClientLocations") public interface LocationsService { - @Headers({"Content-Type: application/json"}) - @Post("/subscriptions/{subscriptionId}/providers/Microsoft.AVS/locations/{location}/checkTrialAvailability") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/providers/Microsoft.AVS/locations/{location}/checkQuotaAvailability") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> checkTrialAvailability( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("location") String location, - @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") Sku sku, - @HeaderParam("Accept") String accept, - Context context); + Mono> checkQuotaAvailability(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("location") String location, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Post("/subscriptions/{subscriptionId}/providers/Microsoft.AVS/locations/{location}/checkQuotaAvailability") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/providers/Microsoft.AVS/locations/{location}/checkTrialAvailability") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> checkQuotaAvailability( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("location") String location, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + Mono> checkTrialAvailability(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("location") String location, @BodyParam("application/json") Sku sku, + @HeaderParam("Accept") String accept, Context context); } /** - * Return trial status for subscription by region. - * - * @param location Azure region. - * @param sku The sku to check for trial availability. + * Return quota for subscription by region. + * + * @param location The name of the Azure region. * @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 subscription trial availability along with {@link Response} on successful completion of {@link Mono}. + * @return subscription quotas along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> checkTrialAvailabilityWithResponseAsync(String location, Sku sku) { + private Mono> checkQuotaAvailabilityWithResponseAsync(String location) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (location == null) { return Mono.error(new IllegalArgumentException("Parameter location is required and cannot be null.")); } - if (sku != null) { - sku.validate(); - } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .checkTrialAvailability( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - location, - this.client.getApiVersion(), - sku, - accept, - context)) + .withContext(context -> service.checkQuotaAvailability(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), location, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Return trial status for subscription by region. - * - * @param location Azure region. - * @param sku The sku to check for trial availability. + * Return quota for subscription by region. + * + * @param location The name of the Azure region. * @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 subscription trial availability along with {@link Response} on successful completion of {@link Mono}. + * @return subscription quotas along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> checkTrialAvailabilityWithResponseAsync( - String location, Sku sku, Context context) { + private Mono> checkQuotaAvailabilityWithResponseAsync(String location, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (location == null) { return Mono.error(new IllegalArgumentException("Parameter location is required and cannot be null.")); } - if (sku != null) { - sku.validate(); - } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .checkTrialAvailability( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - location, - this.client.getApiVersion(), - sku, - accept, - context); + return service.checkQuotaAvailability(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), location, accept, context); } /** - * Return trial status for subscription by region. - * - * @param location Azure region. + * Return quota for subscription by region. + * + * @param location The name of the Azure region. * @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 subscription trial availability on successful completion of {@link Mono}. + * @return subscription quotas on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono checkTrialAvailabilityAsync(String location) { - final Sku sku = null; - return checkTrialAvailabilityWithResponseAsync(location, sku).flatMap(res -> Mono.justOrEmpty(res.getValue())); + private Mono checkQuotaAvailabilityAsync(String location) { + return checkQuotaAvailabilityWithResponseAsync(location).flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** - * Return trial status for subscription by region. - * - * @param location Azure region. - * @param sku The sku to check for trial availability. + * Return quota for subscription by region. + * + * @param location The name of the Azure region. * @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 subscription trial availability along with {@link Response}. + * @return subscription quotas along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response checkTrialAvailabilityWithResponse(String location, Sku sku, Context context) { - return checkTrialAvailabilityWithResponseAsync(location, sku, context).block(); + public Response checkQuotaAvailabilityWithResponse(String location, Context context) { + return checkQuotaAvailabilityWithResponseAsync(location, context).block(); } /** - * Return trial status for subscription by region. - * - * @param location Azure region. + * Return quota for subscription by region. + * + * @param location The name of the Azure region. * @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 subscription trial availability. + * @return subscription quotas. */ @ServiceMethod(returns = ReturnType.SINGLE) - public TrialInner checkTrialAvailability(String location) { - final Sku sku = null; - return checkTrialAvailabilityWithResponse(location, sku, Context.NONE).getValue(); + public QuotaInner checkQuotaAvailability(String location) { + return checkQuotaAvailabilityWithResponse(location, Context.NONE).getValue(); } /** - * Return quota for subscription by region. - * - * @param location Azure region. + * Return trial status for subscription by region. + * + * @param location The name of the Azure region. + * @param sku Optionally, check for a specific SKU. * @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 subscription quotas along with {@link Response} on successful completion of {@link Mono}. + * @return subscription trial availability along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> checkQuotaAvailabilityWithResponseAsync(String location) { + private Mono> checkTrialAvailabilityWithResponseAsync(String location, Sku sku) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (location == null) { return Mono.error(new IllegalArgumentException("Parameter location is required and cannot be null.")); } + if (sku != null) { + sku.validate(); + } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .checkQuotaAvailability( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - location, - this.client.getApiVersion(), - accept, - context)) + .withContext(context -> service.checkTrialAvailability(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), location, sku, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Return quota for subscription by region. - * - * @param location Azure region. + * Return trial status for subscription by region. + * + * @param location The name of the Azure region. + * @param sku Optionally, check for a specific SKU. * @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 subscription quotas along with {@link Response} on successful completion of {@link Mono}. + * @return subscription trial availability along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> checkQuotaAvailabilityWithResponseAsync(String location, Context context) { + private Mono> checkTrialAvailabilityWithResponseAsync(String location, Sku sku, + Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (location == null) { return Mono.error(new IllegalArgumentException("Parameter location is required and cannot be null.")); } + if (sku != null) { + sku.validate(); + } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .checkQuotaAvailability( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - location, - this.client.getApiVersion(), - accept, - context); + return service.checkTrialAvailability(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), location, sku, accept, context); } /** - * Return quota for subscription by region. - * - * @param location Azure region. + * Return trial status for subscription by region. + * + * @param location The name of the Azure region. * @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 subscription quotas on successful completion of {@link Mono}. + * @return subscription trial availability on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono checkQuotaAvailabilityAsync(String location) { - return checkQuotaAvailabilityWithResponseAsync(location).flatMap(res -> Mono.justOrEmpty(res.getValue())); + private Mono checkTrialAvailabilityAsync(String location) { + final Sku sku = null; + return checkTrialAvailabilityWithResponseAsync(location, sku).flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** - * Return quota for subscription by region. - * - * @param location Azure region. + * Return trial status for subscription by region. + * + * @param location The name of the Azure region. + * @param sku Optionally, check for a specific SKU. * @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 subscription quotas along with {@link Response}. + * @return subscription trial availability along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response checkQuotaAvailabilityWithResponse(String location, Context context) { - return checkQuotaAvailabilityWithResponseAsync(location, context).block(); + public Response checkTrialAvailabilityWithResponse(String location, Sku sku, Context context) { + return checkTrialAvailabilityWithResponseAsync(location, sku, context).block(); } /** - * Return quota for subscription by region. - * - * @param location Azure region. + * Return trial status for subscription by region. + * + * @param location The name of the Azure region. * @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 subscription quotas. + * @return subscription trial availability. */ @ServiceMethod(returns = ReturnType.SINGLE) - public QuotaInner checkQuotaAvailability(String location) { - return checkQuotaAvailabilityWithResponse(location, Context.NONE).getValue(); + public TrialInner checkTrialAvailability(String location) { + final Sku sku = null; + return checkTrialAvailabilityWithResponse(location, sku, Context.NONE).getValue(); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/LocationsImpl.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/LocationsImpl.java index d9493b69c4003..74c26507054d5 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/LocationsImpl.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/LocationsImpl.java @@ -28,45 +28,39 @@ public LocationsImpl(LocationsClient innerClient, com.azure.resourcemanager.avs. this.serviceManager = serviceManager; } - public Response checkTrialAvailabilityWithResponse(String location, Sku sku, Context context) { - Response inner = this.serviceClient().checkTrialAvailabilityWithResponse(location, sku, context); + public Response checkQuotaAvailabilityWithResponse(String location, Context context) { + Response inner = this.serviceClient().checkQuotaAvailabilityWithResponse(location, context); if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), - new TrialImpl(inner.getValue(), this.manager())); + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new QuotaImpl(inner.getValue(), this.manager())); } else { return null; } } - public Trial checkTrialAvailability(String location) { - TrialInner inner = this.serviceClient().checkTrialAvailability(location); + public Quota checkQuotaAvailability(String location) { + QuotaInner inner = this.serviceClient().checkQuotaAvailability(location); if (inner != null) { - return new TrialImpl(inner, this.manager()); + return new QuotaImpl(inner, this.manager()); } else { return null; } } - public Response checkQuotaAvailabilityWithResponse(String location, Context context) { - Response inner = this.serviceClient().checkQuotaAvailabilityWithResponse(location, context); + public Response checkTrialAvailabilityWithResponse(String location, Sku sku, Context context) { + Response inner = this.serviceClient().checkTrialAvailabilityWithResponse(location, sku, context); if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), - new QuotaImpl(inner.getValue(), this.manager())); + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new TrialImpl(inner.getValue(), this.manager())); } else { return null; } } - public Quota checkQuotaAvailability(String location) { - QuotaInner inner = this.serviceClient().checkQuotaAvailability(location); + public Trial checkTrialAvailability(String location) { + TrialInner inner = this.serviceClient().checkTrialAvailability(location); if (inner != null) { - return new QuotaImpl(inner, this.manager()); + return new TrialImpl(inner, this.manager()); } else { return null; } diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/OperationImpl.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/OperationImpl.java index bcb062454f2cf..71b1ec5903a16 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/OperationImpl.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/OperationImpl.java @@ -5,9 +5,10 @@ package com.azure.resourcemanager.avs.implementation; import com.azure.resourcemanager.avs.fluent.models.OperationInner; +import com.azure.resourcemanager.avs.models.ActionType; import com.azure.resourcemanager.avs.models.Operation; import com.azure.resourcemanager.avs.models.OperationDisplay; -import com.azure.resourcemanager.avs.models.OperationProperties; +import com.azure.resourcemanager.avs.models.Origin; public final class OperationImpl implements Operation { private OperationInner innerObject; @@ -23,20 +24,20 @@ public String name() { return this.innerModel().name(); } - public OperationDisplay display() { - return this.innerModel().display(); - } - public Boolean isDataAction() { return this.innerModel().isDataAction(); } - public String origin() { + public OperationDisplay display() { + return this.innerModel().display(); + } + + public Origin origin() { return this.innerModel().origin(); } - public OperationProperties properties() { - return this.innerModel().properties(); + public ActionType actionType() { + return this.innerModel().actionType(); } public OperationInner innerModel() { diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/OperationsClientImpl.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/OperationsClientImpl.java index 81693e027cbf2..48e2e97b83808 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/OperationsClientImpl.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/OperationsClientImpl.java @@ -27,25 +27,31 @@ import com.azure.core.util.FluxUtil; import com.azure.resourcemanager.avs.fluent.OperationsClient; import com.azure.resourcemanager.avs.fluent.models.OperationInner; -import com.azure.resourcemanager.avs.models.OperationList; +import com.azure.resourcemanager.avs.models.OperationListResult; import reactor.core.publisher.Mono; -/** An instance of this class provides access to all the operations defined in OperationsClient. */ +/** + * An instance of this class provides access to all the operations defined in OperationsClient. + */ public final class OperationsClientImpl implements OperationsClient { - /** The proxy service used to perform REST calls. */ + /** + * The proxy service used to perform REST calls. + */ private final OperationsService service; - /** The service client containing this operation class. */ + /** + * The service client containing this operation class. + */ private final AvsClientImpl client; /** * Initializes an instance of OperationsClientImpl. - * + * * @param client the instance of the service client containing this operation class. */ OperationsClientImpl(AvsClientImpl client) { - this.service = - RestProxy.create(OperationsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.service + = RestProxy.create(OperationsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } @@ -56,96 +62,74 @@ public final class OperationsClientImpl implements OperationsClient { @Host("{$host}") @ServiceInterface(name = "AvsClientOperations") public interface OperationsService { - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("/providers/Microsoft.AVS/operations") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + Mono> list(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + Mono> listNext(@PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); } /** - * Lists all of the available operations. - * + * List the operations for the provider. + * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return pageable list of operations along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return a list of REST API operations supported by an Azure Resource Provider 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.")); + 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.list(this.client.getEndpoint(), this.client.getApiVersion(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .>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 of the available operations. - * + * List the operations for the provider. + * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return pageable list of operations along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return a list of REST API operations supported by an Azure Resource Provider 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.")); + 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 - .list(this.client.getEndpoint(), this.client.getApiVersion(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.list(this.client.getEndpoint(), this.client.getApiVersion(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** - * Lists all of the available operations. - * + * List the operations for the provider. + * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return pageable list of operations as paginated response with {@link PagedFlux}. + * @return a list of REST API operations supported by an Azure Resource Provider as paginated response with + * {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync() { @@ -153,26 +137,28 @@ private PagedFlux listAsync() { } /** - * Lists all of the available operations. - * + * List the operations for the provider. + * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return pageable list of operations as paginated response with {@link PagedFlux}. + * @return a list of REST API operations supported by an Azure Resource Provider as paginated response with + * {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(Context context) { - return new PagedFlux<>( - () -> listSinglePageAsync(context), nextLink -> listNextSinglePageAsync(nextLink, context)); + return new PagedFlux<>(() -> listSinglePageAsync(context), + nextLink -> listNextSinglePageAsync(nextLink, context)); } /** - * Lists all of the available operations. - * + * List the operations for the provider. + * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return pageable list of operations as paginated response with {@link PagedIterable}. + * @return a list of REST API operations supported by an Azure Resource Provider as paginated response with + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list() { @@ -180,13 +166,14 @@ public PagedIterable list() { } /** - * Lists all of the available operations. - * + * List the operations for the provider. + * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return pageable list of operations as paginated response with {@link PagedIterable}. + * @return a list of REST API operations supported by an Azure Resource Provider as paginated response with + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(Context context) { @@ -195,13 +182,15 @@ public PagedIterable list(Context context) { /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * The nextLink parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return pageable list of operations along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return a list of REST API operations supported by an Azure Resource Provider along with {@link PagedResponse} on + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink) { @@ -209,36 +198,28 @@ private Mono> listNextSinglePageAsync(String nextL 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.")); + 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.listNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + return FluxUtil.withContext(context -> service.listNext(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 URL to get the next list of items - *

The nextLink parameter. + * + * The nextLink parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return pageable list of operations along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return a list of REST API operations supported by an Azure Resource Provider along with {@link PagedResponse} on + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink, Context context) { @@ -246,23 +227,13 @@ private Mono> listNextSinglePageAsync(String nextL 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.")); + 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 - .listNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.listNext(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/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/OperationsImpl.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/OperationsImpl.java index 32a039b0a9714..18874dc0aeff4 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/OperationsImpl.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/OperationsImpl.java @@ -26,12 +26,12 @@ public OperationsImpl(OperationsClient innerClient, com.azure.resourcemanager.av public PagedIterable list() { PagedIterable inner = this.serviceClient().list(); - return Utils.mapPage(inner, inner1 -> new OperationImpl(inner1, this.manager())); + return ResourceManagerUtils.mapPage(inner, inner1 -> new OperationImpl(inner1, this.manager())); } public PagedIterable list(Context context) { PagedIterable inner = this.serviceClient().list(context); - return Utils.mapPage(inner, inner1 -> new OperationImpl(inner1, this.manager())); + return ResourceManagerUtils.mapPage(inner, inner1 -> new OperationImpl(inner1, this.manager())); } private OperationsClient serviceClient() { diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/PlacementPoliciesClientImpl.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/PlacementPoliciesClientImpl.java index e06ac04af7b41..30b46583c3e3d 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/PlacementPoliciesClientImpl.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/PlacementPoliciesClientImpl.java @@ -34,156 +34,131 @@ import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.avs.fluent.PlacementPoliciesClient; import com.azure.resourcemanager.avs.fluent.models.PlacementPolicyInner; -import com.azure.resourcemanager.avs.models.PlacementPoliciesList; +import com.azure.resourcemanager.avs.models.PlacementPolicyListResult; import com.azure.resourcemanager.avs.models.PlacementPolicyUpdate; 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 PlacementPoliciesClient. */ +/** + * An instance of this class provides access to all the operations defined in PlacementPoliciesClient. + */ public final class PlacementPoliciesClientImpl implements PlacementPoliciesClient { - /** The proxy service used to perform REST calls. */ + /** + * The proxy service used to perform REST calls. + */ private final PlacementPoliciesService service; - /** The service client containing this operation class. */ + /** + * The service client containing this operation class. + */ private final AvsClientImpl client; /** * Initializes an instance of PlacementPoliciesClientImpl. - * + * * @param client the instance of the service client containing this operation class. */ PlacementPoliciesClientImpl(AvsClientImpl client) { - this.service = - RestProxy.create(PlacementPoliciesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.service + = RestProxy.create(PlacementPoliciesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for AvsClientPlacementPolicies to be used by the proxy service to perform - * REST calls. + * The interface defining all the services for AvsClientPlacementPolicies to be used by the proxy service to + * perform REST calls. */ @Host("{$host}") @ServiceInterface(name = "AvsClientPlacementPo") public interface PlacementPoliciesService { - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters/{clusterName}/placementPolicies") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters/{clusterName}/placementPolicies") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono> list(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("privateCloudName") String privateCloudName, - @PathParam("clusterName") String clusterName, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + @PathParam("privateCloudName") String privateCloudName, @PathParam("clusterName") String clusterName, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters/{clusterName}/placementPolicies/{placementPolicyName}") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters/{clusterName}/placementPolicies/{placementPolicyName}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono> get(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("privateCloudName") String privateCloudName, - @PathParam("clusterName") String clusterName, - @PathParam("placementPolicyName") String placementPolicyName, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, + @PathParam("privateCloudName") String privateCloudName, @PathParam("clusterName") String clusterName, + @PathParam("placementPolicyName") String placementPolicyName, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters/{clusterName}/placementPolicies/{placementPolicyName}") - @ExpectedResponses({200, 201}) + @Headers({ "Content-Type: application/json" }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters/{clusterName}/placementPolicies/{placementPolicyName}") + @ExpectedResponses({ 200, 201 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createOrUpdate( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono>> createOrUpdate(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("privateCloudName") String privateCloudName, - @PathParam("clusterName") String clusterName, + @PathParam("privateCloudName") String privateCloudName, @PathParam("clusterName") String clusterName, @PathParam("placementPolicyName") String placementPolicyName, - @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") PlacementPolicyInner placementPolicy, - @HeaderParam("Accept") String accept, + @BodyParam("application/json") PlacementPolicyInner placementPolicy, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Patch( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters/{clusterName}/placementPolicies/{placementPolicyName}") - @ExpectedResponses({200, 202}) + @Headers({ "Content-Type: application/json" }) + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters/{clusterName}/placementPolicies/{placementPolicyName}") + @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> update( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono>> update(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("privateCloudName") String privateCloudName, - @PathParam("clusterName") String clusterName, + @PathParam("privateCloudName") String privateCloudName, @PathParam("clusterName") String clusterName, @PathParam("placementPolicyName") String placementPolicyName, - @QueryParam("api-version") String apiVersion, @BodyParam("application/json") PlacementPolicyUpdate placementPolicyUpdate, - @HeaderParam("Accept") String accept, - Context context); + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Delete( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters/{clusterName}/placementPolicies/{placementPolicyName}") - @ExpectedResponses({200, 202, 204}) + @Headers({ "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters/{clusterName}/placementPolicies/{placementPolicyName}") + @ExpectedResponses({ 200, 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono>> delete(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("privateCloudName") String privateCloudName, - @PathParam("clusterName") String clusterName, - @PathParam("placementPolicyName") String placementPolicyName, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, + @PathParam("privateCloudName") String privateCloudName, @PathParam("clusterName") String clusterName, + @PathParam("placementPolicyName") String placementPolicyName, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + Mono> listNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); } /** - * List placement policies in a private cloud cluster. - * + * List PlacementPolicy resources by Cluster. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param clusterName Name of the cluster in the private cloud. + * @param clusterName Name of the cluster. * @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 represents list of placement policies along with {@link PagedResponse} on successful completion of {@link - * Mono}. + * @return the response of a PlacementPolicy list operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync( - String resourceGroupName, String privateCloudName, String clusterName) { + private Mono> listSinglePageAsync(String resourceGroupName, + String privateCloudName, String clusterName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -198,57 +173,36 @@ private Mono> listSinglePageAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .list( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - privateCloudName, - clusterName, - this.client.getApiVersion(), - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, clusterName, 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 placement policies in a private cloud cluster. - * + * List PlacementPolicy resources by Cluster. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param clusterName Name of the cluster in the private cloud. + * @param clusterName Name of the cluster. * @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 represents list of placement policies along with {@link PagedResponse} on successful completion of {@link - * Mono}. + * @return the response of a PlacementPolicy list operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync( - String resourceGroupName, String privateCloudName, String clusterName, Context context) { + private Mono> listSinglePageAsync(String resourceGroupName, + String privateCloudName, String clusterName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -264,127 +218,106 @@ private Mono> listSinglePageAsync( final String accept = "application/json"; context = this.client.mergeContext(context); return service - .list( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - privateCloudName, - clusterName, - this.client.getApiVersion(), - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + .list(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, privateCloudName, clusterName, accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** - * List placement policies in a private cloud cluster. - * + * List PlacementPolicy resources by Cluster. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param clusterName Name of the cluster in the private cloud. + * @param clusterName Name of the cluster. * @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 represents list of placement policies as paginated response with {@link PagedFlux}. + * @return the response of a PlacementPolicy list operation as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync( - String resourceGroupName, String privateCloudName, String clusterName) { - return new PagedFlux<>( - () -> listSinglePageAsync(resourceGroupName, privateCloudName, clusterName), + private PagedFlux listAsync(String resourceGroupName, String privateCloudName, + String clusterName) { + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, privateCloudName, clusterName), nextLink -> listNextSinglePageAsync(nextLink)); } /** - * List placement policies in a private cloud cluster. - * + * List PlacementPolicy resources by Cluster. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param clusterName Name of the cluster in the private cloud. + * @param clusterName Name of the cluster. * @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 represents list of placement policies as paginated response with {@link PagedFlux}. + * @return the response of a PlacementPolicy list operation as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync( - String resourceGroupName, String privateCloudName, String clusterName, Context context) { - return new PagedFlux<>( - () -> listSinglePageAsync(resourceGroupName, privateCloudName, clusterName, context), + private PagedFlux listAsync(String resourceGroupName, String privateCloudName, + String clusterName, Context context) { + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, privateCloudName, clusterName, context), nextLink -> listNextSinglePageAsync(nextLink, context)); } /** - * List placement policies in a private cloud cluster. - * + * List PlacementPolicy resources by Cluster. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param clusterName Name of the cluster in the private cloud. + * @param clusterName Name of the cluster. * @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 represents list of placement policies as paginated response with {@link PagedIterable}. + * @return the response of a PlacementPolicy list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list( - String resourceGroupName, String privateCloudName, String clusterName) { + public PagedIterable list(String resourceGroupName, String privateCloudName, + String clusterName) { return new PagedIterable<>(listAsync(resourceGroupName, privateCloudName, clusterName)); } /** - * List placement policies in a private cloud cluster. - * + * List PlacementPolicy resources by Cluster. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param clusterName Name of the cluster in the private cloud. + * @param clusterName Name of the cluster. * @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 represents list of placement policies as paginated response with {@link PagedIterable}. + * @return the response of a PlacementPolicy list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list( - String resourceGroupName, String privateCloudName, String clusterName, Context context) { + public PagedIterable list(String resourceGroupName, String privateCloudName, + String clusterName, Context context) { return new PagedIterable<>(listAsync(resourceGroupName, privateCloudName, clusterName, context)); } /** - * Get a placement policy by name in a private cloud cluster. - * + * Get a PlacementPolicy. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param clusterName Name of the cluster in the private cloud. - * @param placementPolicyName Name of the VMware vSphere Distributed Resource Scheduler (DRS) placement policy. + * @param clusterName Name of the cluster. + * @param placementPolicyName Name of the placement policy. * @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 placement policy by name in a private cloud cluster along with {@link Response} on successful - * completion of {@link Mono}. + * @return a PlacementPolicy along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String privateCloudName, String clusterName, String placementPolicyName) { + private Mono> getWithResponseAsync(String resourceGroupName, String privateCloudName, + String clusterName, String placementPolicyName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -403,54 +336,35 @@ private Mono> getWithResponseAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .get( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - privateCloudName, - clusterName, - placementPolicyName, - this.client.getApiVersion(), - accept, - context)) + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, clusterName, placementPolicyName, + accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Get a placement policy by name in a private cloud cluster. - * + * Get a PlacementPolicy. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param clusterName Name of the cluster in the private cloud. - * @param placementPolicyName Name of the VMware vSphere Distributed Resource Scheduler (DRS) placement policy. + * @param clusterName Name of the cluster. + * @param placementPolicyName Name of the placement policy. * @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 a placement policy by name in a private cloud cluster along with {@link Response} on successful - * completion of {@link Mono}. + * @return a PlacementPolicy along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, - String privateCloudName, - String clusterName, - String placementPolicyName, - Context context) { + private Mono> getWithResponseAsync(String resourceGroupName, String privateCloudName, + String clusterName, String placementPolicyName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -469,113 +383,92 @@ private Mono> getWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .get( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - privateCloudName, - clusterName, - placementPolicyName, - this.client.getApiVersion(), - accept, - context); + return service.get(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, privateCloudName, clusterName, placementPolicyName, accept, context); } /** - * Get a placement policy by name in a private cloud cluster. - * + * Get a PlacementPolicy. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param clusterName Name of the cluster in the private cloud. - * @param placementPolicyName Name of the VMware vSphere Distributed Resource Scheduler (DRS) placement policy. + * @param clusterName Name of the cluster. + * @param placementPolicyName Name of the placement policy. * @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 placement policy by name in a private cloud cluster on successful completion of {@link Mono}. + * @return a PlacementPolicy on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync( - String resourceGroupName, String privateCloudName, String clusterName, String placementPolicyName) { + private Mono getAsync(String resourceGroupName, String privateCloudName, String clusterName, + String placementPolicyName) { return getWithResponseAsync(resourceGroupName, privateCloudName, clusterName, placementPolicyName) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** - * Get a placement policy by name in a private cloud cluster. - * + * Get a PlacementPolicy. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param clusterName Name of the cluster in the private cloud. - * @param placementPolicyName Name of the VMware vSphere Distributed Resource Scheduler (DRS) placement policy. + * @param clusterName Name of the cluster. + * @param placementPolicyName Name of the placement policy. * @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 a placement policy by name in a private cloud cluster along with {@link Response}. + * @return a PlacementPolicy along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, - String privateCloudName, - String clusterName, - String placementPolicyName, - Context context) { + public Response getWithResponse(String resourceGroupName, String privateCloudName, + String clusterName, String placementPolicyName, Context context) { return getWithResponseAsync(resourceGroupName, privateCloudName, clusterName, placementPolicyName, context) .block(); } /** - * Get a placement policy by name in a private cloud cluster. - * + * Get a PlacementPolicy. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param clusterName Name of the cluster in the private cloud. - * @param placementPolicyName Name of the VMware vSphere Distributed Resource Scheduler (DRS) placement policy. + * @param clusterName Name of the cluster. + * @param placementPolicyName Name of the placement policy. * @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 placement policy by name in a private cloud cluster. + * @return a PlacementPolicy. */ @ServiceMethod(returns = ReturnType.SINGLE) - public PlacementPolicyInner get( - String resourceGroupName, String privateCloudName, String clusterName, String placementPolicyName) { + public PlacementPolicyInner get(String resourceGroupName, String privateCloudName, String clusterName, + String placementPolicyName) { return getWithResponse(resourceGroupName, privateCloudName, clusterName, placementPolicyName, Context.NONE) .getValue(); } /** - * Create or update a placement policy in a private cloud cluster. - * + * Create a PlacementPolicy. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param clusterName Name of the cluster in the private cloud. - * @param placementPolicyName Name of the VMware vSphere Distributed Resource Scheduler (DRS) placement policy. - * @param placementPolicy A placement policy in the private cloud cluster. + * @param clusterName Name of the cluster. + * @param placementPolicyName Name of the placement policy. + * @param placementPolicy Resource create parameters. * @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 vSphere Distributed Resource Scheduler (DRS) placement policy along with {@link Response} on successful - * completion of {@link Mono}. + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync( - String resourceGroupName, - String privateCloudName, - String clusterName, - String placementPolicyName, - PlacementPolicyInner placementPolicy) { + private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String privateCloudName, String clusterName, String placementPolicyName, PlacementPolicyInner placementPolicy) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -600,57 +493,38 @@ private Mono>> createOrUpdateWithResponseAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .createOrUpdate( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - privateCloudName, - clusterName, - placementPolicyName, - this.client.getApiVersion(), - placementPolicy, - accept, - context)) + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, clusterName, placementPolicyName, + placementPolicy, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Create or update a placement policy in a private cloud cluster. - * + * Create a PlacementPolicy. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param clusterName Name of the cluster in the private cloud. - * @param placementPolicyName Name of the VMware vSphere Distributed Resource Scheduler (DRS) placement policy. - * @param placementPolicy A placement policy in the private cloud cluster. + * @param clusterName Name of the cluster. + * @param placementPolicyName Name of the placement policy. + * @param placementPolicy Resource create parameters. * @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 a vSphere Distributed Resource Scheduler (DRS) placement policy along with {@link Response} on successful - * completion of {@link Mono}. + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync( - String resourceGroupName, - String privateCloudName, - String clusterName, - String placementPolicyName, - PlacementPolicyInner placementPolicy, + private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String privateCloudName, String clusterName, String placementPolicyName, PlacementPolicyInner placementPolicy, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -675,28 +549,19 @@ private Mono>> createOrUpdateWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .createOrUpdate( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - privateCloudName, - clusterName, - placementPolicyName, - this.client.getApiVersion(), - placementPolicy, - accept, - context); + return service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, clusterName, placementPolicyName, + placementPolicy, accept, context); } /** - * Create or update a placement policy in a private cloud cluster. - * + * Create a PlacementPolicy. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param clusterName Name of the cluster in the private cloud. - * @param placementPolicyName Name of the VMware vSphere Distributed Resource Scheduler (DRS) placement policy. - * @param placementPolicy A placement policy in the private cloud cluster. + * @param clusterName Name of the cluster. + * @param placementPolicyName Name of the placement policy. + * @param placementPolicy Resource create parameters. * @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. @@ -704,32 +569,22 @@ private Mono>> createOrUpdateWithResponseAsync( */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, PlacementPolicyInner> beginCreateOrUpdateAsync( - String resourceGroupName, - String privateCloudName, - String clusterName, - String placementPolicyName, + String resourceGroupName, String privateCloudName, String clusterName, String placementPolicyName, PlacementPolicyInner placementPolicy) { - Mono>> mono = - createOrUpdateWithResponseAsync( - resourceGroupName, privateCloudName, clusterName, placementPolicyName, placementPolicy); - return this - .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - PlacementPolicyInner.class, - PlacementPolicyInner.class, - this.client.getContext()); + Mono>> mono = createOrUpdateWithResponseAsync(resourceGroupName, privateCloudName, + clusterName, placementPolicyName, placementPolicy); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + PlacementPolicyInner.class, PlacementPolicyInner.class, this.client.getContext()); } /** - * Create or update a placement policy in a private cloud cluster. - * + * Create a PlacementPolicy. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param clusterName Name of the cluster in the private cloud. - * @param placementPolicyName Name of the VMware vSphere Distributed Resource Scheduler (DRS) placement policy. - * @param placementPolicy A placement policy in the private cloud cluster. + * @param clusterName Name of the cluster. + * @param placementPolicyName Name of the placement policy. + * @param placementPolicy Resource create parameters. * @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. @@ -738,30 +593,23 @@ private PollerFlux, PlacementPolicyInner> begin */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, PlacementPolicyInner> beginCreateOrUpdateAsync( - String resourceGroupName, - String privateCloudName, - String clusterName, - String placementPolicyName, - PlacementPolicyInner placementPolicy, - Context context) { + String resourceGroupName, String privateCloudName, String clusterName, String placementPolicyName, + PlacementPolicyInner placementPolicy, Context context) { context = this.client.mergeContext(context); - Mono>> mono = - createOrUpdateWithResponseAsync( - resourceGroupName, privateCloudName, clusterName, placementPolicyName, placementPolicy, context); - return this - .client - .getLroResult( - mono, this.client.getHttpPipeline(), PlacementPolicyInner.class, PlacementPolicyInner.class, context); + Mono>> mono = createOrUpdateWithResponseAsync(resourceGroupName, privateCloudName, + clusterName, placementPolicyName, placementPolicy, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + PlacementPolicyInner.class, PlacementPolicyInner.class, context); } /** - * Create or update a placement policy in a private cloud cluster. - * + * Create a PlacementPolicy. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param clusterName Name of the cluster in the private cloud. - * @param placementPolicyName Name of the VMware vSphere Distributed Resource Scheduler (DRS) placement policy. - * @param placementPolicy A placement policy in the private cloud cluster. + * @param clusterName Name of the cluster. + * @param placementPolicyName Name of the placement policy. + * @param placementPolicy Resource create parameters. * @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. @@ -769,25 +617,20 @@ private PollerFlux, PlacementPolicyInner> begin */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, PlacementPolicyInner> beginCreateOrUpdate( - String resourceGroupName, - String privateCloudName, - String clusterName, - String placementPolicyName, + String resourceGroupName, String privateCloudName, String clusterName, String placementPolicyName, PlacementPolicyInner placementPolicy) { - return this - .beginCreateOrUpdateAsync( - resourceGroupName, privateCloudName, clusterName, placementPolicyName, placementPolicy) - .getSyncPoller(); + return this.beginCreateOrUpdateAsync(resourceGroupName, privateCloudName, clusterName, placementPolicyName, + placementPolicy).getSyncPoller(); } /** - * Create or update a placement policy in a private cloud cluster. - * + * Create a PlacementPolicy. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param clusterName Name of the cluster in the private cloud. - * @param placementPolicyName Name of the VMware vSphere Distributed Resource Scheduler (DRS) placement policy. - * @param placementPolicy A placement policy in the private cloud cluster. + * @param clusterName Name of the cluster. + * @param placementPolicyName Name of the placement policy. + * @param placementPolicy Resource create parameters. * @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. @@ -796,52 +639,40 @@ public SyncPoller, PlacementPolicyInner> beginC */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, PlacementPolicyInner> beginCreateOrUpdate( - String resourceGroupName, - String privateCloudName, - String clusterName, - String placementPolicyName, - PlacementPolicyInner placementPolicy, - Context context) { - return this - .beginCreateOrUpdateAsync( - resourceGroupName, privateCloudName, clusterName, placementPolicyName, placementPolicy, context) - .getSyncPoller(); + String resourceGroupName, String privateCloudName, String clusterName, String placementPolicyName, + PlacementPolicyInner placementPolicy, Context context) { + return this.beginCreateOrUpdateAsync(resourceGroupName, privateCloudName, clusterName, placementPolicyName, + placementPolicy, context).getSyncPoller(); } /** - * Create or update a placement policy in a private cloud cluster. - * + * Create a PlacementPolicy. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param clusterName Name of the cluster in the private cloud. - * @param placementPolicyName Name of the VMware vSphere Distributed Resource Scheduler (DRS) placement policy. - * @param placementPolicy A placement policy in the private cloud cluster. + * @param clusterName Name of the cluster. + * @param placementPolicyName Name of the placement policy. + * @param placementPolicy Resource create parameters. * @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 vSphere Distributed Resource Scheduler (DRS) placement policy on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync( - String resourceGroupName, - String privateCloudName, - String clusterName, - String placementPolicyName, - PlacementPolicyInner placementPolicy) { - return beginCreateOrUpdateAsync( - resourceGroupName, privateCloudName, clusterName, placementPolicyName, placementPolicy) - .last() - .flatMap(this.client::getLroFinalResultOrError); + private Mono createOrUpdateAsync(String resourceGroupName, String privateCloudName, + String clusterName, String placementPolicyName, PlacementPolicyInner placementPolicy) { + return beginCreateOrUpdateAsync(resourceGroupName, privateCloudName, clusterName, placementPolicyName, + placementPolicy).last().flatMap(this.client::getLroFinalResultOrError); } /** - * Create or update a placement policy in a private cloud cluster. - * + * Create a PlacementPolicy. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param clusterName Name of the cluster in the private cloud. - * @param placementPolicyName Name of the VMware vSphere Distributed Resource Scheduler (DRS) placement policy. - * @param placementPolicy A placement policy in the private cloud cluster. + * @param clusterName Name of the cluster. + * @param placementPolicyName Name of the placement policy. + * @param placementPolicy Resource create parameters. * @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. @@ -849,52 +680,40 @@ private Mono createOrUpdateAsync( * @return a vSphere Distributed Resource Scheduler (DRS) placement policy on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync( - String resourceGroupName, - String privateCloudName, - String clusterName, - String placementPolicyName, - PlacementPolicyInner placementPolicy, - Context context) { - return beginCreateOrUpdateAsync( - resourceGroupName, privateCloudName, clusterName, placementPolicyName, placementPolicy, context) - .last() - .flatMap(this.client::getLroFinalResultOrError); + private Mono createOrUpdateAsync(String resourceGroupName, String privateCloudName, + String clusterName, String placementPolicyName, PlacementPolicyInner placementPolicy, Context context) { + return beginCreateOrUpdateAsync(resourceGroupName, privateCloudName, clusterName, placementPolicyName, + placementPolicy, context).last().flatMap(this.client::getLroFinalResultOrError); } /** - * Create or update a placement policy in a private cloud cluster. - * + * Create a PlacementPolicy. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param clusterName Name of the cluster in the private cloud. - * @param placementPolicyName Name of the VMware vSphere Distributed Resource Scheduler (DRS) placement policy. - * @param placementPolicy A placement policy in the private cloud cluster. + * @param clusterName Name of the cluster. + * @param placementPolicyName Name of the placement policy. + * @param placementPolicy Resource create parameters. * @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 vSphere Distributed Resource Scheduler (DRS) placement policy. */ @ServiceMethod(returns = ReturnType.SINGLE) - public PlacementPolicyInner createOrUpdate( - String resourceGroupName, - String privateCloudName, - String clusterName, - String placementPolicyName, - PlacementPolicyInner placementPolicy) { - return createOrUpdateAsync( - resourceGroupName, privateCloudName, clusterName, placementPolicyName, placementPolicy) - .block(); + public PlacementPolicyInner createOrUpdate(String resourceGroupName, String privateCloudName, String clusterName, + String placementPolicyName, PlacementPolicyInner placementPolicy) { + return createOrUpdateAsync(resourceGroupName, privateCloudName, clusterName, placementPolicyName, + placementPolicy).block(); } /** - * Create or update a placement policy in a private cloud cluster. - * + * Create a PlacementPolicy. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param clusterName Name of the cluster in the private cloud. - * @param placementPolicyName Name of the VMware vSphere Distributed Resource Scheduler (DRS) placement policy. - * @param placementPolicy A placement policy in the private cloud cluster. + * @param clusterName Name of the cluster. + * @param placementPolicyName Name of the placement policy. + * @param placementPolicy Resource create parameters. * @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. @@ -902,50 +721,36 @@ public PlacementPolicyInner createOrUpdate( * @return a vSphere Distributed Resource Scheduler (DRS) placement policy. */ @ServiceMethod(returns = ReturnType.SINGLE) - public PlacementPolicyInner createOrUpdate( - String resourceGroupName, - String privateCloudName, - String clusterName, - String placementPolicyName, - PlacementPolicyInner placementPolicy, - Context context) { - return createOrUpdateAsync( - resourceGroupName, privateCloudName, clusterName, placementPolicyName, placementPolicy, context) - .block(); + public PlacementPolicyInner createOrUpdate(String resourceGroupName, String privateCloudName, String clusterName, + String placementPolicyName, PlacementPolicyInner placementPolicy, Context context) { + return createOrUpdateAsync(resourceGroupName, privateCloudName, clusterName, placementPolicyName, + placementPolicy, context).block(); } /** - * Update a placement policy in a private cloud cluster. - * + * Update a PlacementPolicy. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param clusterName Name of the cluster in the private cloud. - * @param placementPolicyName Name of the VMware vSphere Distributed Resource Scheduler (DRS) placement policy. - * @param placementPolicyUpdate The placement policy properties that may be updated. + * @param clusterName Name of the cluster. + * @param placementPolicyName Name of the placement policy. + * @param placementPolicyUpdate The placement policy properties to be updated. * @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 vSphere Distributed Resource Scheduler (DRS) placement policy along with {@link Response} on successful - * completion of {@link Mono}. + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateWithResponseAsync( - String resourceGroupName, - String privateCloudName, - String clusterName, - String placementPolicyName, - PlacementPolicyUpdate placementPolicyUpdate) { + private Mono>> updateWithResponseAsync(String resourceGroupName, String privateCloudName, + String clusterName, String placementPolicyName, PlacementPolicyUpdate placementPolicyUpdate) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -970,57 +775,37 @@ private Mono>> updateWithResponseAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .update( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - privateCloudName, - clusterName, - placementPolicyName, - this.client.getApiVersion(), - placementPolicyUpdate, - accept, - context)) + .withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, clusterName, placementPolicyName, + placementPolicyUpdate, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Update a placement policy in a private cloud cluster. - * + * Update a PlacementPolicy. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param clusterName Name of the cluster in the private cloud. - * @param placementPolicyName Name of the VMware vSphere Distributed Resource Scheduler (DRS) placement policy. - * @param placementPolicyUpdate The placement policy properties that may be updated. + * @param clusterName Name of the cluster. + * @param placementPolicyName Name of the placement policy. + * @param placementPolicyUpdate The placement policy properties to be updated. * @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 a vSphere Distributed Resource Scheduler (DRS) placement policy along with {@link Response} on successful - * completion of {@link Mono}. + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateWithResponseAsync( - String resourceGroupName, - String privateCloudName, - String clusterName, - String placementPolicyName, - PlacementPolicyUpdate placementPolicyUpdate, - Context context) { + private Mono>> updateWithResponseAsync(String resourceGroupName, String privateCloudName, + String clusterName, String placementPolicyName, PlacementPolicyUpdate placementPolicyUpdate, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1045,28 +830,19 @@ private Mono>> updateWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .update( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - privateCloudName, - clusterName, - placementPolicyName, - this.client.getApiVersion(), - placementPolicyUpdate, - accept, - context); + return service.update(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, privateCloudName, clusterName, placementPolicyName, placementPolicyUpdate, accept, + context); } /** - * Update a placement policy in a private cloud cluster. - * + * Update a PlacementPolicy. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param clusterName Name of the cluster in the private cloud. - * @param placementPolicyName Name of the VMware vSphere Distributed Resource Scheduler (DRS) placement policy. - * @param placementPolicyUpdate The placement policy properties that may be updated. + * @param clusterName Name of the cluster. + * @param placementPolicyName Name of the placement policy. + * @param placementPolicyUpdate The placement policy properties to be updated. * @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. @@ -1074,32 +850,22 @@ private Mono>> updateWithResponseAsync( */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, PlacementPolicyInner> beginUpdateAsync( - String resourceGroupName, - String privateCloudName, - String clusterName, - String placementPolicyName, + String resourceGroupName, String privateCloudName, String clusterName, String placementPolicyName, PlacementPolicyUpdate placementPolicyUpdate) { - Mono>> mono = - updateWithResponseAsync( - resourceGroupName, privateCloudName, clusterName, placementPolicyName, placementPolicyUpdate); - return this - .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - PlacementPolicyInner.class, - PlacementPolicyInner.class, - this.client.getContext()); + Mono>> mono = updateWithResponseAsync(resourceGroupName, privateCloudName, + clusterName, placementPolicyName, placementPolicyUpdate); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + PlacementPolicyInner.class, PlacementPolicyInner.class, this.client.getContext()); } /** - * Update a placement policy in a private cloud cluster. - * + * Update a PlacementPolicy. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param clusterName Name of the cluster in the private cloud. - * @param placementPolicyName Name of the VMware vSphere Distributed Resource Scheduler (DRS) placement policy. - * @param placementPolicyUpdate The placement policy properties that may be updated. + * @param clusterName Name of the cluster. + * @param placementPolicyName Name of the placement policy. + * @param placementPolicyUpdate The placement policy properties to be updated. * @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. @@ -1108,56 +874,44 @@ private PollerFlux, PlacementPolicyInner> begin */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, PlacementPolicyInner> beginUpdateAsync( - String resourceGroupName, - String privateCloudName, - String clusterName, - String placementPolicyName, - PlacementPolicyUpdate placementPolicyUpdate, - Context context) { + String resourceGroupName, String privateCloudName, String clusterName, String placementPolicyName, + PlacementPolicyUpdate placementPolicyUpdate, Context context) { context = this.client.mergeContext(context); - Mono>> mono = - updateWithResponseAsync( - resourceGroupName, privateCloudName, clusterName, placementPolicyName, placementPolicyUpdate, context); - return this - .client - .getLroResult( - mono, this.client.getHttpPipeline(), PlacementPolicyInner.class, PlacementPolicyInner.class, context); + Mono>> mono = updateWithResponseAsync(resourceGroupName, privateCloudName, + clusterName, placementPolicyName, placementPolicyUpdate, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + PlacementPolicyInner.class, PlacementPolicyInner.class, context); } /** - * Update a placement policy in a private cloud cluster. - * + * Update a PlacementPolicy. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param clusterName Name of the cluster in the private cloud. - * @param placementPolicyName Name of the VMware vSphere Distributed Resource Scheduler (DRS) placement policy. - * @param placementPolicyUpdate The placement policy properties that may be updated. + * @param clusterName Name of the cluster. + * @param placementPolicyName Name of the placement policy. + * @param placementPolicyUpdate The placement policy properties to be updated. * @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 a vSphere Distributed Resource Scheduler (DRS) placement policy. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, PlacementPolicyInner> beginUpdate( - String resourceGroupName, - String privateCloudName, - String clusterName, - String placementPolicyName, + public SyncPoller, PlacementPolicyInner> beginUpdate(String resourceGroupName, + String privateCloudName, String clusterName, String placementPolicyName, PlacementPolicyUpdate placementPolicyUpdate) { - return this - .beginUpdateAsync( - resourceGroupName, privateCloudName, clusterName, placementPolicyName, placementPolicyUpdate) - .getSyncPoller(); + return this.beginUpdateAsync(resourceGroupName, privateCloudName, clusterName, placementPolicyName, + placementPolicyUpdate).getSyncPoller(); } /** - * Update a placement policy in a private cloud cluster. - * + * Update a PlacementPolicy. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param clusterName Name of the cluster in the private cloud. - * @param placementPolicyName Name of the VMware vSphere Distributed Resource Scheduler (DRS) placement policy. - * @param placementPolicyUpdate The placement policy properties that may be updated. + * @param clusterName Name of the cluster. + * @param placementPolicyName Name of the placement policy. + * @param placementPolicyUpdate The placement policy properties to be updated. * @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. @@ -1165,53 +919,41 @@ public SyncPoller, PlacementPolicyInner> beginU * @return the {@link SyncPoller} for polling of a vSphere Distributed Resource Scheduler (DRS) placement policy. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, PlacementPolicyInner> beginUpdate( - String resourceGroupName, - String privateCloudName, - String clusterName, - String placementPolicyName, - PlacementPolicyUpdate placementPolicyUpdate, - Context context) { - return this - .beginUpdateAsync( - resourceGroupName, privateCloudName, clusterName, placementPolicyName, placementPolicyUpdate, context) - .getSyncPoller(); + public SyncPoller, PlacementPolicyInner> beginUpdate(String resourceGroupName, + String privateCloudName, String clusterName, String placementPolicyName, + PlacementPolicyUpdate placementPolicyUpdate, Context context) { + return this.beginUpdateAsync(resourceGroupName, privateCloudName, clusterName, placementPolicyName, + placementPolicyUpdate, context).getSyncPoller(); } /** - * Update a placement policy in a private cloud cluster. - * + * Update a PlacementPolicy. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param clusterName Name of the cluster in the private cloud. - * @param placementPolicyName Name of the VMware vSphere Distributed Resource Scheduler (DRS) placement policy. - * @param placementPolicyUpdate The placement policy properties that may be updated. + * @param clusterName Name of the cluster. + * @param placementPolicyName Name of the placement policy. + * @param placementPolicyUpdate The placement policy properties to be updated. * @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 vSphere Distributed Resource Scheduler (DRS) placement policy on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync( - String resourceGroupName, - String privateCloudName, - String clusterName, - String placementPolicyName, - PlacementPolicyUpdate placementPolicyUpdate) { - return beginUpdateAsync( - resourceGroupName, privateCloudName, clusterName, placementPolicyName, placementPolicyUpdate) - .last() - .flatMap(this.client::getLroFinalResultOrError); + private Mono updateAsync(String resourceGroupName, String privateCloudName, + String clusterName, String placementPolicyName, PlacementPolicyUpdate placementPolicyUpdate) { + return beginUpdateAsync(resourceGroupName, privateCloudName, clusterName, placementPolicyName, + placementPolicyUpdate).last().flatMap(this.client::getLroFinalResultOrError); } /** - * Update a placement policy in a private cloud cluster. - * + * Update a PlacementPolicy. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param clusterName Name of the cluster in the private cloud. - * @param placementPolicyName Name of the VMware vSphere Distributed Resource Scheduler (DRS) placement policy. - * @param placementPolicyUpdate The placement policy properties that may be updated. + * @param clusterName Name of the cluster. + * @param placementPolicyName Name of the placement policy. + * @param placementPolicyUpdate The placement policy properties to be updated. * @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. @@ -1219,51 +961,40 @@ private Mono updateAsync( * @return a vSphere Distributed Resource Scheduler (DRS) placement policy on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync( - String resourceGroupName, - String privateCloudName, - String clusterName, - String placementPolicyName, - PlacementPolicyUpdate placementPolicyUpdate, - Context context) { - return beginUpdateAsync( - resourceGroupName, privateCloudName, clusterName, placementPolicyName, placementPolicyUpdate, context) - .last() - .flatMap(this.client::getLroFinalResultOrError); + private Mono updateAsync(String resourceGroupName, String privateCloudName, + String clusterName, String placementPolicyName, PlacementPolicyUpdate placementPolicyUpdate, Context context) { + return beginUpdateAsync(resourceGroupName, privateCloudName, clusterName, placementPolicyName, + placementPolicyUpdate, context).last().flatMap(this.client::getLroFinalResultOrError); } /** - * Update a placement policy in a private cloud cluster. - * + * Update a PlacementPolicy. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param clusterName Name of the cluster in the private cloud. - * @param placementPolicyName Name of the VMware vSphere Distributed Resource Scheduler (DRS) placement policy. - * @param placementPolicyUpdate The placement policy properties that may be updated. + * @param clusterName Name of the cluster. + * @param placementPolicyName Name of the placement policy. + * @param placementPolicyUpdate The placement policy properties to be updated. * @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 vSphere Distributed Resource Scheduler (DRS) placement policy. */ @ServiceMethod(returns = ReturnType.SINGLE) - public PlacementPolicyInner update( - String resourceGroupName, - String privateCloudName, - String clusterName, - String placementPolicyName, - PlacementPolicyUpdate placementPolicyUpdate) { + public PlacementPolicyInner update(String resourceGroupName, String privateCloudName, String clusterName, + String placementPolicyName, PlacementPolicyUpdate placementPolicyUpdate) { return updateAsync(resourceGroupName, privateCloudName, clusterName, placementPolicyName, placementPolicyUpdate) .block(); } /** - * Update a placement policy in a private cloud cluster. - * + * Update a PlacementPolicy. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param clusterName Name of the cluster in the private cloud. - * @param placementPolicyName Name of the VMware vSphere Distributed Resource Scheduler (DRS) placement policy. - * @param placementPolicyUpdate The placement policy properties that may be updated. + * @param clusterName Name of the cluster. + * @param placementPolicyName Name of the placement policy. + * @param placementPolicyUpdate The placement policy properties to be updated. * @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. @@ -1271,44 +1002,34 @@ public PlacementPolicyInner update( * @return a vSphere Distributed Resource Scheduler (DRS) placement policy. */ @ServiceMethod(returns = ReturnType.SINGLE) - public PlacementPolicyInner update( - String resourceGroupName, - String privateCloudName, - String clusterName, - String placementPolicyName, - PlacementPolicyUpdate placementPolicyUpdate, - Context context) { - return updateAsync( - resourceGroupName, privateCloudName, clusterName, placementPolicyName, placementPolicyUpdate, context) - .block(); + public PlacementPolicyInner update(String resourceGroupName, String privateCloudName, String clusterName, + String placementPolicyName, PlacementPolicyUpdate placementPolicyUpdate, Context context) { + return updateAsync(resourceGroupName, privateCloudName, clusterName, placementPolicyName, placementPolicyUpdate, + context).block(); } /** - * Delete a placement policy in a private cloud cluster. - * + * Delete a PlacementPolicy. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param clusterName Name of the cluster in the private cloud. - * @param placementPolicyName Name of the VMware vSphere Distributed Resource Scheduler (DRS) placement policy. + * @param clusterName Name of the cluster. + * @param placementPolicyName Name of the placement policy. * @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 privateCloudName, String clusterName, String placementPolicyName) { + private Mono>> deleteWithResponseAsync(String resourceGroupName, String privateCloudName, + String clusterName, String placementPolicyName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1327,29 +1048,19 @@ private Mono>> deleteWithResponseAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .delete( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - privateCloudName, - clusterName, - placementPolicyName, - this.client.getApiVersion(), - accept, - context)) + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, clusterName, placementPolicyName, + accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Delete a placement policy in a private cloud cluster. - * + * Delete a PlacementPolicy. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param clusterName Name of the cluster in the private cloud. - * @param placementPolicyName Name of the VMware vSphere Distributed Resource Scheduler (DRS) placement policy. + * @param clusterName Name of the cluster. + * @param placementPolicyName Name of the placement policy. * @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. @@ -1357,23 +1068,15 @@ private Mono>> deleteWithResponseAsync( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync( - String resourceGroupName, - String privateCloudName, - String clusterName, - String placementPolicyName, - Context context) { + private Mono>> deleteWithResponseAsync(String resourceGroupName, String privateCloudName, + String clusterName, String placementPolicyName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1392,49 +1095,38 @@ private Mono>> deleteWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .delete( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - privateCloudName, - clusterName, - placementPolicyName, - this.client.getApiVersion(), - accept, - context); + return service.delete(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, privateCloudName, clusterName, placementPolicyName, accept, context); } /** - * Delete a placement policy in a private cloud cluster. - * + * Delete a PlacementPolicy. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param clusterName Name of the cluster in the private cloud. - * @param placementPolicyName Name of the VMware vSphere Distributed Resource Scheduler (DRS) placement policy. + * @param clusterName Name of the cluster. + * @param placementPolicyName Name of the placement policy. * @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 long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync( - String resourceGroupName, String privateCloudName, String clusterName, String placementPolicyName) { - Mono>> mono = - deleteWithResponseAsync(resourceGroupName, privateCloudName, clusterName, placementPolicyName); - return this - .client - .getLroResult( - mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String privateCloudName, + String clusterName, String placementPolicyName) { + Mono>> mono + = deleteWithResponseAsync(resourceGroupName, privateCloudName, clusterName, placementPolicyName); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); } /** - * Delete a placement policy in a private cloud cluster. - * + * Delete a PlacementPolicy. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param clusterName Name of the cluster in the private cloud. - * @param placementPolicyName Name of the VMware vSphere Distributed Resource Scheduler (DRS) placement policy. + * @param clusterName Name of the cluster. + * @param placementPolicyName Name of the placement policy. * @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. @@ -1442,47 +1134,41 @@ private PollerFlux, Void> beginDeleteAsync( * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync( - String resourceGroupName, - String privateCloudName, - String clusterName, - String placementPolicyName, - Context context) { + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String privateCloudName, + String clusterName, String placementPolicyName, Context context) { context = this.client.mergeContext(context); - Mono>> mono = - deleteWithResponseAsync(resourceGroupName, privateCloudName, clusterName, placementPolicyName, context); - return this - .client - .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); + Mono>> mono + = deleteWithResponseAsync(resourceGroupName, privateCloudName, clusterName, placementPolicyName, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + context); } /** - * Delete a placement policy in a private cloud cluster. - * + * Delete a PlacementPolicy. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param clusterName Name of the cluster in the private cloud. - * @param placementPolicyName Name of the VMware vSphere Distributed Resource Scheduler (DRS) placement policy. + * @param clusterName Name of the cluster. + * @param placementPolicyName Name of the placement policy. * @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 long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete( - String resourceGroupName, String privateCloudName, String clusterName, String placementPolicyName) { - return this - .beginDeleteAsync(resourceGroupName, privateCloudName, clusterName, placementPolicyName) + public SyncPoller, Void> beginDelete(String resourceGroupName, String privateCloudName, + String clusterName, String placementPolicyName) { + return this.beginDeleteAsync(resourceGroupName, privateCloudName, clusterName, placementPolicyName) .getSyncPoller(); } /** - * Delete a placement policy in a private cloud cluster. - * + * Delete a PlacementPolicy. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param clusterName Name of the cluster in the private cloud. - * @param placementPolicyName Name of the VMware vSphere Distributed Resource Scheduler (DRS) placement policy. + * @param clusterName Name of the cluster. + * @param placementPolicyName Name of the placement policy. * @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. @@ -1490,44 +1176,38 @@ public SyncPoller, Void> beginDelete( * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete( - String resourceGroupName, - String privateCloudName, - String clusterName, - String placementPolicyName, - Context context) { - return this - .beginDeleteAsync(resourceGroupName, privateCloudName, clusterName, placementPolicyName, context) + public SyncPoller, Void> beginDelete(String resourceGroupName, String privateCloudName, + String clusterName, String placementPolicyName, Context context) { + return this.beginDeleteAsync(resourceGroupName, privateCloudName, clusterName, placementPolicyName, context) .getSyncPoller(); } /** - * Delete a placement policy in a private cloud cluster. - * + * Delete a PlacementPolicy. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param clusterName Name of the cluster in the private cloud. - * @param placementPolicyName Name of the VMware vSphere Distributed Resource Scheduler (DRS) placement policy. + * @param clusterName Name of the cluster. + * @param placementPolicyName Name of the placement policy. * @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 privateCloudName, String clusterName, String placementPolicyName) { - return beginDeleteAsync(resourceGroupName, privateCloudName, clusterName, placementPolicyName) - .last() + private Mono deleteAsync(String resourceGroupName, String privateCloudName, String clusterName, + String placementPolicyName) { + return beginDeleteAsync(resourceGroupName, privateCloudName, clusterName, placementPolicyName).last() .flatMap(this.client::getLroFinalResultOrError); } /** - * Delete a placement policy in a private cloud cluster. - * + * Delete a PlacementPolicy. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param clusterName Name of the cluster in the private cloud. - * @param placementPolicyName Name of the VMware vSphere Distributed Resource Scheduler (DRS) placement policy. + * @param clusterName Name of the cluster. + * @param placementPolicyName Name of the placement policy. * @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. @@ -1535,66 +1215,58 @@ private Mono deleteAsync( * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync( - String resourceGroupName, - String privateCloudName, - String clusterName, - String placementPolicyName, - Context context) { - return beginDeleteAsync(resourceGroupName, privateCloudName, clusterName, placementPolicyName, context) - .last() + private Mono deleteAsync(String resourceGroupName, String privateCloudName, String clusterName, + String placementPolicyName, Context context) { + return beginDeleteAsync(resourceGroupName, privateCloudName, clusterName, placementPolicyName, context).last() .flatMap(this.client::getLroFinalResultOrError); } /** - * Delete a placement policy in a private cloud cluster. - * + * Delete a PlacementPolicy. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param clusterName Name of the cluster in the private cloud. - * @param placementPolicyName Name of the VMware vSphere Distributed Resource Scheduler (DRS) placement policy. + * @param clusterName Name of the cluster. + * @param placementPolicyName Name of the placement policy. * @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 privateCloudName, String clusterName, String placementPolicyName) { + public void delete(String resourceGroupName, String privateCloudName, String clusterName, + String placementPolicyName) { deleteAsync(resourceGroupName, privateCloudName, clusterName, placementPolicyName).block(); } /** - * Delete a placement policy in a private cloud cluster. - * + * Delete a PlacementPolicy. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param clusterName Name of the cluster in the private cloud. - * @param placementPolicyName Name of the VMware vSphere Distributed Resource Scheduler (DRS) placement policy. + * @param clusterName Name of the cluster. + * @param placementPolicyName Name of the placement policy. * @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. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void delete( - String resourceGroupName, - String privateCloudName, - String clusterName, - String placementPolicyName, - Context context) { + public void delete(String resourceGroupName, String privateCloudName, String clusterName, + String placementPolicyName, Context context) { deleteAsync(resourceGroupName, privateCloudName, clusterName, placementPolicyName, context).block(); } /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * 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 represents list of placement policies along with {@link PagedResponse} on successful completion of {@link - * Mono}. + * @return the response of a PlacementPolicy list operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink) { @@ -1602,37 +1274,28 @@ private Mono> listNextSinglePageAsync(String 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.")); + 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.listNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + return FluxUtil.withContext(context -> service.listNext(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 URL to get the next list of items - *

The nextLink parameter. + * + * 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 represents list of placement policies along with {@link PagedResponse} on successful completion of {@link - * Mono}. + * @return the response of a PlacementPolicy list operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink, Context context) { @@ -1640,23 +1303,13 @@ private Mono> listNextSinglePageAsync(String 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.")); + 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 - .listNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.listNext(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/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/PlacementPoliciesImpl.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/PlacementPoliciesImpl.java index 4f297c00528de..bd316f6565876 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/PlacementPoliciesImpl.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/PlacementPoliciesImpl.java @@ -21,50 +21,41 @@ public final class PlacementPoliciesImpl implements PlacementPolicies { private final com.azure.resourcemanager.avs.AvsManager serviceManager; - public PlacementPoliciesImpl( - PlacementPoliciesClient innerClient, com.azure.resourcemanager.avs.AvsManager serviceManager) { + public PlacementPoliciesImpl(PlacementPoliciesClient innerClient, + com.azure.resourcemanager.avs.AvsManager serviceManager) { this.innerClient = innerClient; this.serviceManager = serviceManager; } public PagedIterable list(String resourceGroupName, String privateCloudName, String clusterName) { - PagedIterable inner = - this.serviceClient().list(resourceGroupName, privateCloudName, clusterName); - return Utils.mapPage(inner, inner1 -> new PlacementPolicyImpl(inner1, this.manager())); + PagedIterable inner + = this.serviceClient().list(resourceGroupName, privateCloudName, clusterName); + return ResourceManagerUtils.mapPage(inner, inner1 -> new PlacementPolicyImpl(inner1, this.manager())); } - public PagedIterable list( - String resourceGroupName, String privateCloudName, String clusterName, Context context) { - PagedIterable inner = - this.serviceClient().list(resourceGroupName, privateCloudName, clusterName, context); - return Utils.mapPage(inner, inner1 -> new PlacementPolicyImpl(inner1, this.manager())); + public PagedIterable list(String resourceGroupName, String privateCloudName, String clusterName, + Context context) { + PagedIterable inner + = this.serviceClient().list(resourceGroupName, privateCloudName, clusterName, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new PlacementPolicyImpl(inner1, this.manager())); } - public Response getWithResponse( - String resourceGroupName, - String privateCloudName, - String clusterName, - String placementPolicyName, - Context context) { - Response inner = - this - .serviceClient() - .getWithResponse(resourceGroupName, privateCloudName, clusterName, placementPolicyName, context); + public Response getWithResponse(String resourceGroupName, String privateCloudName, + String clusterName, String placementPolicyName, Context context) { + Response inner = this.serviceClient().getWithResponse(resourceGroupName, privateCloudName, + clusterName, placementPolicyName, context); if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), new PlacementPolicyImpl(inner.getValue(), this.manager())); } else { return null; } } - public PlacementPolicy get( - String resourceGroupName, String privateCloudName, String clusterName, String placementPolicyName) { - PlacementPolicyInner inner = - this.serviceClient().get(resourceGroupName, privateCloudName, clusterName, placementPolicyName); + public PlacementPolicy get(String resourceGroupName, String privateCloudName, String clusterName, + String placementPolicyName) { + PlacementPolicyInner inner + = this.serviceClient().get(resourceGroupName, privateCloudName, clusterName, placementPolicyName); if (inner != null) { return new PlacementPolicyImpl(inner, this.manager()); } else { @@ -72,158 +63,109 @@ public PlacementPolicy get( } } - public void delete( - String resourceGroupName, String privateCloudName, String clusterName, String placementPolicyName) { + public void delete(String resourceGroupName, String privateCloudName, String clusterName, + String placementPolicyName) { this.serviceClient().delete(resourceGroupName, privateCloudName, clusterName, placementPolicyName); } - public void delete( - String resourceGroupName, - String privateCloudName, - String clusterName, - String placementPolicyName, - Context context) { + public void delete(String resourceGroupName, String privateCloudName, String clusterName, + String placementPolicyName, Context context) { this.serviceClient().delete(resourceGroupName, privateCloudName, clusterName, placementPolicyName, context); } public PlacementPolicy getById(String id) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + String resourceGroupName = ResourceManagerUtils.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))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } - String privateCloudName = Utils.getValueFromIdByName(id, "privateClouds"); + String privateCloudName = ResourceManagerUtils.getValueFromIdByName(id, "privateClouds"); if (privateCloudName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'privateClouds'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'privateClouds'.", id))); } - String clusterName = Utils.getValueFromIdByName(id, "clusters"); + String clusterName = ResourceManagerUtils.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))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'clusters'.", id))); } - String placementPolicyName = Utils.getValueFromIdByName(id, "placementPolicies"); + String placementPolicyName = ResourceManagerUtils.getValueFromIdByName(id, "placementPolicies"); if (placementPolicyName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format( - "The resource ID '%s' is not valid. Missing path segment 'placementPolicies'.", id))); - } - return this - .getWithResponse(resourceGroupName, privateCloudName, clusterName, placementPolicyName, Context.NONE) + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'placementPolicies'.", id))); + } + return this.getWithResponse(resourceGroupName, privateCloudName, clusterName, placementPolicyName, Context.NONE) .getValue(); } public Response getByIdWithResponse(String id, Context context) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + String resourceGroupName = ResourceManagerUtils.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))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } - String privateCloudName = Utils.getValueFromIdByName(id, "privateClouds"); + String privateCloudName = ResourceManagerUtils.getValueFromIdByName(id, "privateClouds"); if (privateCloudName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'privateClouds'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'privateClouds'.", id))); } - String clusterName = Utils.getValueFromIdByName(id, "clusters"); + String clusterName = ResourceManagerUtils.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))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'clusters'.", id))); } - String placementPolicyName = Utils.getValueFromIdByName(id, "placementPolicies"); + String placementPolicyName = ResourceManagerUtils.getValueFromIdByName(id, "placementPolicies"); if (placementPolicyName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format( - "The resource ID '%s' is not valid. Missing path segment 'placementPolicies'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'placementPolicies'.", id))); } return this.getWithResponse(resourceGroupName, privateCloudName, clusterName, placementPolicyName, context); } public void deleteById(String id) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + String resourceGroupName = ResourceManagerUtils.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))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } - String privateCloudName = Utils.getValueFromIdByName(id, "privateClouds"); + String privateCloudName = ResourceManagerUtils.getValueFromIdByName(id, "privateClouds"); if (privateCloudName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'privateClouds'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'privateClouds'.", id))); } - String clusterName = Utils.getValueFromIdByName(id, "clusters"); + String clusterName = ResourceManagerUtils.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))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'clusters'.", id))); } - String placementPolicyName = Utils.getValueFromIdByName(id, "placementPolicies"); + String placementPolicyName = ResourceManagerUtils.getValueFromIdByName(id, "placementPolicies"); if (placementPolicyName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format( - "The resource ID '%s' is not valid. Missing path segment 'placementPolicies'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'placementPolicies'.", id))); } this.delete(resourceGroupName, privateCloudName, clusterName, placementPolicyName, Context.NONE); } public void deleteByIdWithResponse(String id, Context context) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + String resourceGroupName = ResourceManagerUtils.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))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } - String privateCloudName = Utils.getValueFromIdByName(id, "privateClouds"); + String privateCloudName = ResourceManagerUtils.getValueFromIdByName(id, "privateClouds"); if (privateCloudName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'privateClouds'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'privateClouds'.", id))); } - String clusterName = Utils.getValueFromIdByName(id, "clusters"); + String clusterName = ResourceManagerUtils.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))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'clusters'.", id))); } - String placementPolicyName = Utils.getValueFromIdByName(id, "placementPolicies"); + String placementPolicyName = ResourceManagerUtils.getValueFromIdByName(id, "placementPolicies"); if (placementPolicyName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format( - "The resource ID '%s' is not valid. Missing path segment 'placementPolicies'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'placementPolicies'.", id))); } this.delete(resourceGroupName, privateCloudName, clusterName, placementPolicyName, context); } diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/PlacementPolicyImpl.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/PlacementPolicyImpl.java index c5186ea13b292..a74910b3469d4 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/PlacementPolicyImpl.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/PlacementPolicyImpl.java @@ -4,6 +4,7 @@ package com.azure.resourcemanager.avs.implementation; +import com.azure.core.management.SystemData; import com.azure.core.util.Context; import com.azure.resourcemanager.avs.fluent.models.PlacementPolicyInner; import com.azure.resourcemanager.avs.models.AffinityStrength; @@ -35,6 +36,10 @@ public PlacementPolicyProperties properties() { return this.innerModel().properties(); } + public SystemData systemData() { + return this.innerModel().systemData(); + } + public String resourceGroupName() { return resourceGroupName; } @@ -57,8 +62,8 @@ private com.azure.resourcemanager.avs.AvsManager manager() { private PlacementPolicyUpdate updatePlacementPolicyUpdate; - public PlacementPolicyImpl withExistingCluster( - String resourceGroupName, String privateCloudName, String clusterName) { + public PlacementPolicyImpl withExistingCluster(String resourceGroupName, String privateCloudName, + String clusterName) { this.resourceGroupName = resourceGroupName; this.privateCloudName = privateCloudName; this.clusterName = clusterName; @@ -66,27 +71,14 @@ public PlacementPolicyImpl withExistingCluster( } public PlacementPolicy create() { - this.innerObject = - serviceManager - .serviceClient() - .getPlacementPolicies() - .createOrUpdate( - resourceGroupName, - privateCloudName, - clusterName, - placementPolicyName, - this.innerModel(), - Context.NONE); + this.innerObject = serviceManager.serviceClient().getPlacementPolicies().createOrUpdate(resourceGroupName, + privateCloudName, clusterName, placementPolicyName, this.innerModel(), Context.NONE); return this; } public PlacementPolicy create(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getPlacementPolicies() - .createOrUpdate( - resourceGroupName, privateCloudName, clusterName, placementPolicyName, this.innerModel(), context); + this.innerObject = serviceManager.serviceClient().getPlacementPolicies().createOrUpdate(resourceGroupName, + privateCloudName, clusterName, placementPolicyName, this.innerModel(), context); return this; } @@ -102,61 +94,36 @@ public PlacementPolicyImpl update() { } public PlacementPolicy apply() { - this.innerObject = - serviceManager - .serviceClient() - .getPlacementPolicies() - .update( - resourceGroupName, - privateCloudName, - clusterName, - placementPolicyName, - updatePlacementPolicyUpdate, - Context.NONE); + this.innerObject = serviceManager.serviceClient().getPlacementPolicies().update(resourceGroupName, + privateCloudName, clusterName, placementPolicyName, updatePlacementPolicyUpdate, Context.NONE); return this; } public PlacementPolicy apply(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getPlacementPolicies() - .update( - resourceGroupName, - privateCloudName, - clusterName, - placementPolicyName, - updatePlacementPolicyUpdate, - context); + this.innerObject = serviceManager.serviceClient().getPlacementPolicies().update(resourceGroupName, + privateCloudName, clusterName, placementPolicyName, updatePlacementPolicyUpdate, context); return this; } PlacementPolicyImpl(PlacementPolicyInner innerObject, com.azure.resourcemanager.avs.AvsManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; - this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups"); - this.privateCloudName = Utils.getValueFromIdByName(innerObject.id(), "privateClouds"); - this.clusterName = Utils.getValueFromIdByName(innerObject.id(), "clusters"); - this.placementPolicyName = Utils.getValueFromIdByName(innerObject.id(), "placementPolicies"); + this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); + this.privateCloudName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "privateClouds"); + this.clusterName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "clusters"); + this.placementPolicyName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "placementPolicies"); } public PlacementPolicy refresh() { - this.innerObject = - serviceManager - .serviceClient() - .getPlacementPolicies() - .getWithResponse(resourceGroupName, privateCloudName, clusterName, placementPolicyName, Context.NONE) - .getValue(); + this.innerObject = serviceManager.serviceClient().getPlacementPolicies() + .getWithResponse(resourceGroupName, privateCloudName, clusterName, placementPolicyName, Context.NONE) + .getValue(); return this; } public PlacementPolicy refresh(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getPlacementPolicies() - .getWithResponse(resourceGroupName, privateCloudName, clusterName, placementPolicyName, context) - .getValue(); + this.innerObject = serviceManager.serviceClient().getPlacementPolicies() + .getWithResponse(resourceGroupName, privateCloudName, clusterName, placementPolicyName, context).getValue(); return this; } diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/PrivateCloudImpl.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/PrivateCloudImpl.java index ef3e29e56f542..4765e592d74a5 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/PrivateCloudImpl.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/PrivateCloudImpl.java @@ -6,11 +6,13 @@ import com.azure.core.http.rest.Response; import com.azure.core.management.Region; +import com.azure.core.management.SystemData; import com.azure.core.util.Context; import com.azure.resourcemanager.avs.fluent.models.PrivateCloudInner; import com.azure.resourcemanager.avs.models.AdminCredentials; import com.azure.resourcemanager.avs.models.AvailabilityProperties; import com.azure.resourcemanager.avs.models.Circuit; +import com.azure.resourcemanager.avs.models.DnsZoneType; import com.azure.resourcemanager.avs.models.Encryption; import com.azure.resourcemanager.avs.models.Endpoints; import com.azure.resourcemanager.avs.models.IdentitySource; @@ -18,10 +20,10 @@ import com.azure.resourcemanager.avs.models.ManagementCluster; import com.azure.resourcemanager.avs.models.NsxPublicIpQuotaRaisedEnum; import com.azure.resourcemanager.avs.models.PrivateCloud; -import com.azure.resourcemanager.avs.models.PrivateCloudIdentity; import com.azure.resourcemanager.avs.models.PrivateCloudProvisioningState; import com.azure.resourcemanager.avs.models.PrivateCloudUpdate; import com.azure.resourcemanager.avs.models.Sku; +import com.azure.resourcemanager.avs.models.SystemAssignedServiceIdentity; import java.util.Collections; import java.util.List; import java.util.Map; @@ -60,10 +62,48 @@ public Sku sku() { return this.innerModel().sku(); } - public PrivateCloudIdentity identity() { + public SystemAssignedServiceIdentity identity() { return this.innerModel().identity(); } + public SystemData systemData() { + return this.innerModel().systemData(); + } + + public ManagementCluster managementCluster() { + return this.innerModel().managementCluster(); + } + + public InternetEnum internet() { + return this.innerModel().internet(); + } + + public List identitySources() { + List inner = this.innerModel().identitySources(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + public AvailabilityProperties availability() { + return this.innerModel().availability(); + } + + public Encryption encryption() { + return this.innerModel().encryption(); + } + + public List extendedNetworkBlocks() { + List inner = this.innerModel().extendedNetworkBlocks(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + public PrivateCloudProvisioningState provisioningState() { return this.innerModel().provisioningState(); } @@ -125,38 +165,12 @@ public NsxPublicIpQuotaRaisedEnum nsxPublicIpQuotaRaised() { return this.innerModel().nsxPublicIpQuotaRaised(); } - public ManagementCluster managementCluster() { - return this.innerModel().managementCluster(); - } - - public InternetEnum internet() { - return this.innerModel().internet(); - } - - public List identitySources() { - List inner = this.innerModel().identitySources(); - if (inner != null) { - return Collections.unmodifiableList(inner); - } else { - return Collections.emptyList(); - } - } - - public AvailabilityProperties availability() { - return this.innerModel().availability(); + public String virtualNetworkId() { + return this.innerModel().virtualNetworkId(); } - public Encryption encryption() { - return this.innerModel().encryption(); - } - - public List extendedNetworkBlocks() { - List inner = this.innerModel().extendedNetworkBlocks(); - if (inner != null) { - return Collections.unmodifiableList(inner); - } else { - return Collections.emptyList(); - } + public DnsZoneType dnsZoneType() { + return this.innerModel().dnsZoneType(); } public Region region() { @@ -191,20 +205,14 @@ public PrivateCloudImpl withExistingResourceGroup(String resourceGroupName) { } public PrivateCloud create() { - this.innerObject = - serviceManager - .serviceClient() - .getPrivateClouds() - .createOrUpdate(resourceGroupName, privateCloudName, this.innerModel(), Context.NONE); + this.innerObject = serviceManager.serviceClient().getPrivateClouds().createOrUpdate(resourceGroupName, + privateCloudName, this.innerModel(), Context.NONE); return this; } public PrivateCloud create(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getPrivateClouds() - .createOrUpdate(resourceGroupName, privateCloudName, this.innerModel(), context); + this.innerObject = serviceManager.serviceClient().getPrivateClouds().createOrUpdate(resourceGroupName, + privateCloudName, this.innerModel(), context); return this; } @@ -220,56 +228,43 @@ public PrivateCloudImpl update() { } public PrivateCloud apply() { - this.innerObject = - serviceManager - .serviceClient() - .getPrivateClouds() - .update(resourceGroupName, privateCloudName, updatePrivateCloudUpdate, Context.NONE); + this.innerObject = serviceManager.serviceClient().getPrivateClouds().update(resourceGroupName, privateCloudName, + updatePrivateCloudUpdate, Context.NONE); return this; } public PrivateCloud apply(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getPrivateClouds() - .update(resourceGroupName, privateCloudName, updatePrivateCloudUpdate, context); + this.innerObject = serviceManager.serviceClient().getPrivateClouds().update(resourceGroupName, privateCloudName, + updatePrivateCloudUpdate, context); return this; } PrivateCloudImpl(PrivateCloudInner innerObject, com.azure.resourcemanager.avs.AvsManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; - this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups"); - this.privateCloudName = Utils.getValueFromIdByName(innerObject.id(), "privateClouds"); + this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); + this.privateCloudName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "privateClouds"); } public PrivateCloud refresh() { - this.innerObject = - serviceManager - .serviceClient() - .getPrivateClouds() - .getByResourceGroupWithResponse(resourceGroupName, privateCloudName, Context.NONE) - .getValue(); + this.innerObject = serviceManager.serviceClient().getPrivateClouds() + .getByResourceGroupWithResponse(resourceGroupName, privateCloudName, Context.NONE).getValue(); return this; } public PrivateCloud refresh(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getPrivateClouds() - .getByResourceGroupWithResponse(resourceGroupName, privateCloudName, context) - .getValue(); + this.innerObject = serviceManager.serviceClient().getPrivateClouds() + .getByResourceGroupWithResponse(resourceGroupName, privateCloudName, context).getValue(); return this; } - public void rotateVcenterPassword() { - serviceManager.privateClouds().rotateVcenterPassword(resourceGroupName, privateCloudName); + public Response listAdminCredentialsWithResponse(Context context) { + return serviceManager.privateClouds().listAdminCredentialsWithResponse(resourceGroupName, privateCloudName, + context); } - public void rotateVcenterPassword(Context context) { - serviceManager.privateClouds().rotateVcenterPassword(resourceGroupName, privateCloudName, context); + public AdminCredentials listAdminCredentials() { + return serviceManager.privateClouds().listAdminCredentials(resourceGroupName, privateCloudName); } public void rotateNsxtPassword() { @@ -280,14 +275,12 @@ public void rotateNsxtPassword(Context context) { serviceManager.privateClouds().rotateNsxtPassword(resourceGroupName, privateCloudName, context); } - public Response listAdminCredentialsWithResponse(Context context) { - return serviceManager - .privateClouds() - .listAdminCredentialsWithResponse(resourceGroupName, privateCloudName, context); + public void rotateVcenterPassword() { + serviceManager.privateClouds().rotateVcenterPassword(resourceGroupName, privateCloudName); } - public AdminCredentials listAdminCredentials() { - return serviceManager.privateClouds().listAdminCredentials(resourceGroupName, privateCloudName); + public void rotateVcenterPassword(Context context) { + serviceManager.privateClouds().rotateVcenterPassword(resourceGroupName, privateCloudName, context); } public PrivateCloudImpl withRegion(Region location) { @@ -301,8 +294,13 @@ public PrivateCloudImpl withRegion(String location) { } public PrivateCloudImpl withSku(Sku sku) { - this.innerModel().withSku(sku); - return this; + if (isInCreateMode()) { + this.innerModel().withSku(sku); + return this; + } else { + this.updatePrivateCloudUpdate.withSku(sku); + return this; + } } public PrivateCloudImpl withTags(Map tags) { @@ -315,7 +313,7 @@ public PrivateCloudImpl withTags(Map tags) { } } - public PrivateCloudImpl withIdentity(PrivateCloudIdentity identity) { + public PrivateCloudImpl withIdentity(SystemAssignedServiceIdentity identity) { if (isInCreateMode()) { this.innerModel().withIdentity(identity); return this; @@ -325,31 +323,6 @@ public PrivateCloudImpl withIdentity(PrivateCloudIdentity identity) { } } - public PrivateCloudImpl withCircuit(Circuit circuit) { - this.innerModel().withCircuit(circuit); - return this; - } - - public PrivateCloudImpl withNetworkBlock(String networkBlock) { - this.innerModel().withNetworkBlock(networkBlock); - return this; - } - - public PrivateCloudImpl withVcenterPassword(String vcenterPassword) { - this.innerModel().withVcenterPassword(vcenterPassword); - return this; - } - - public PrivateCloudImpl withNsxtPassword(String nsxtPassword) { - this.innerModel().withNsxtPassword(nsxtPassword); - return this; - } - - public PrivateCloudImpl withSecondaryCircuit(Circuit secondaryCircuit) { - this.innerModel().withSecondaryCircuit(secondaryCircuit); - return this; - } - public PrivateCloudImpl withManagementCluster(ManagementCluster managementCluster) { if (isInCreateMode()) { this.innerModel().withManagementCluster(managementCluster); @@ -405,6 +378,46 @@ public PrivateCloudImpl withExtendedNetworkBlocks(List extendedNetworkBl } } + public PrivateCloudImpl withCircuit(Circuit circuit) { + this.innerModel().withCircuit(circuit); + return this; + } + + public PrivateCloudImpl withNetworkBlock(String networkBlock) { + this.innerModel().withNetworkBlock(networkBlock); + return this; + } + + public PrivateCloudImpl withVcenterPassword(String vcenterPassword) { + this.innerModel().withVcenterPassword(vcenterPassword); + return this; + } + + public PrivateCloudImpl withNsxtPassword(String nsxtPassword) { + this.innerModel().withNsxtPassword(nsxtPassword); + return this; + } + + public PrivateCloudImpl withSecondaryCircuit(Circuit secondaryCircuit) { + this.innerModel().withSecondaryCircuit(secondaryCircuit); + return this; + } + + public PrivateCloudImpl withVirtualNetworkId(String virtualNetworkId) { + this.innerModel().withVirtualNetworkId(virtualNetworkId); + return this; + } + + public PrivateCloudImpl withDnsZoneType(DnsZoneType dnsZoneType) { + if (isInCreateMode()) { + this.innerModel().withDnsZoneType(dnsZoneType); + return this; + } else { + this.updatePrivateCloudUpdate.withDnsZoneType(dnsZoneType); + return this; + } + } + private boolean isInCreateMode() { return this.innerModel().id() == null; } diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/PrivateCloudsClientImpl.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/PrivateCloudsClientImpl.java index b25d1cece6d73..17cb442021329 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/PrivateCloudsClientImpl.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/PrivateCloudsClientImpl.java @@ -36,28 +36,34 @@ import com.azure.resourcemanager.avs.fluent.PrivateCloudsClient; import com.azure.resourcemanager.avs.fluent.models.AdminCredentialsInner; import com.azure.resourcemanager.avs.fluent.models.PrivateCloudInner; -import com.azure.resourcemanager.avs.models.PrivateCloudList; +import com.azure.resourcemanager.avs.models.PrivateCloudListResult; import com.azure.resourcemanager.avs.models.PrivateCloudUpdate; 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 PrivateCloudsClient. */ +/** + * An instance of this class provides access to all the operations defined in PrivateCloudsClient. + */ public final class PrivateCloudsClientImpl implements PrivateCloudsClient { - /** The proxy service used to perform REST calls. */ + /** + * The proxy service used to perform REST calls. + */ private final PrivateCloudsService service; - /** The service client containing this operation class. */ + /** + * The service client containing this operation class. + */ private final AvsClientImpl client; /** * Initializes an instance of PrivateCloudsClientImpl. - * + * * @param client the instance of the service client containing this operation class. */ PrivateCloudsClientImpl(AvsClientImpl client) { - this.service = - RestProxy.create(PrivateCloudsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.service + = RestProxy.create(PrivateCloudsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } @@ -68,477 +74,369 @@ public final class PrivateCloudsClientImpl implements PrivateCloudsClient { @Host("{$host}") @ServiceInterface(name = "AvsClientPrivateClou") public interface PrivateCloudsService { - @Headers({"Content-Type: application/json"}) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.AVS/privateClouds") + @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); + Mono> list(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Get("/subscriptions/{subscriptionId}/providers/Microsoft.AVS/privateClouds") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, + Mono> listByResourceGroup(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> getByResourceGroup( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono> getByResourceGroup(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("privateCloudName") String privateCloudName, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, + @PathParam("privateCloudName") String privateCloudName, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}") - @ExpectedResponses({200, 201}) + @Headers({ "Content-Type: application/json" }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}") + @ExpectedResponses({ 200, 201 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createOrUpdate( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono>> createOrUpdate(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("privateCloudName") String privateCloudName, - @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") PrivateCloudInner privateCloud, - @HeaderParam("Accept") String accept, + @BodyParam("application/json") PrivateCloudInner privateCloud, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Patch( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}") - @ExpectedResponses({200, 201}) + @Headers({ "Content-Type: application/json" }) + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}") + @ExpectedResponses({ 200, 201 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> update( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono>> update(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("privateCloudName") String privateCloudName, - @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") PrivateCloudUpdate privateCloudUpdate, - @HeaderParam("Accept") String accept, + @BodyParam("application/json") PrivateCloudUpdate privateCloudUpdate, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Delete( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}") - @ExpectedResponses({200, 202, 204}) + @Headers({ "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}") + @ExpectedResponses({ 200, 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono>> delete(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("privateCloudName") String privateCloudName, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, + @PathParam("privateCloudName") String privateCloudName, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/rotateVcenterPassword") - @ExpectedResponses({202, 204}) + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/listAdminCredentials") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> rotateVcenterPassword( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono> listAdminCredentials(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("privateCloudName") String privateCloudName, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, + @PathParam("privateCloudName") String privateCloudName, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/rotateNsxtPassword") - @ExpectedResponses({202, 204}) + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/rotateNsxtPassword") + @ExpectedResponses({ 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> rotateNsxtPassword( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono>> rotateNsxtPassword(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("privateCloudName") String privateCloudName, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, + @PathParam("privateCloudName") String privateCloudName, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/listAdminCredentials") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/rotateVcenterPassword") + @ExpectedResponses({ 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listAdminCredentials( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono>> rotateVcenterPassword(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("privateCloudName") String privateCloudName, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, + @PathParam("privateCloudName") String privateCloudName, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + Mono> listInSubscriptionNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listInSubscriptionNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + Mono> listNext(@PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); } /** - * List private clouds in a resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. + * List PrivateCloud resources by subscription ID. + * * @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 paged list of private clouds along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return the response of a PrivateCloud list operation along with {@link PagedResponse} on successful completion + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName) { + private Mono> listSinglePageAsync() { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + 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 - .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)) + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), 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 private clouds in a resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * List PrivateCloud resources by subscription ID. + * * @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 a paged list of private clouds along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return the response of a PrivateCloud list operation along with {@link PagedResponse} on successful completion + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupSinglePageAsync( - String resourceGroupName, Context context) { + 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.")); + 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.")); + 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 - .listByResourceGroup( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - this.client.getApiVersion(), - accept, + .list(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** - * List private clouds in a resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. + * List PrivateCloud resources by subscription ID. + * * @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 paged list of private clouds as paginated response with {@link PagedFlux}. + * @return the response of a PrivateCloud list operation as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByResourceGroupAsync(String resourceGroupName) { - return new PagedFlux<>( - () -> listByResourceGroupSinglePageAsync(resourceGroupName), nextLink -> listNextSinglePageAsync(nextLink)); + private PagedFlux listAsync() { + return new PagedFlux<>(() -> listSinglePageAsync(), + nextLink -> listInSubscriptionNextSinglePageAsync(nextLink)); } /** - * List private clouds in a resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * List PrivateCloud resources by subscription ID. + * * @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 a paged list of private clouds as paginated response with {@link PagedFlux}. + * @return the response of a PrivateCloud list operation as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByResourceGroupAsync(String resourceGroupName, Context context) { - return new PagedFlux<>( - () -> listByResourceGroupSinglePageAsync(resourceGroupName, context), - nextLink -> listNextSinglePageAsync(nextLink, context)); + private PagedFlux listAsync(Context context) { + return new PagedFlux<>(() -> listSinglePageAsync(context), + nextLink -> listInSubscriptionNextSinglePageAsync(nextLink, context)); } /** - * List private clouds in a resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. + * List PrivateCloud resources by subscription ID. + * * @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 paged list of private clouds as paginated response with {@link PagedIterable}. + * @return the response of a PrivateCloud list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByResourceGroup(String resourceGroupName) { - return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName)); + public PagedIterable list() { + return new PagedIterable<>(listAsync()); } /** - * List private clouds in a resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * List PrivateCloud resources by subscription ID. + * * @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 a paged list of private clouds as paginated response with {@link PagedIterable}. + * @return the response of a PrivateCloud list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { - return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName, context)); + public PagedIterable list(Context context) { + return new PagedIterable<>(listAsync(context)); } /** - * List private clouds in a subscription. - * + * List PrivateCloud resources by 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 a paged list of private clouds along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return the response of a PrivateCloud list operation along with {@link PagedResponse} on successful completion + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync() { + 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.")); + 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 this.client.getSubscriptionId() is required and cannot be null.")); + .error(new IllegalArgumentException("Parameter resourceGroupName 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)) + .withContext(context -> service.listByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, 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 private clouds in a subscription. - * + * List PrivateCloud resources by 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 a paged list of private clouds along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return the response of a PrivateCloud list operation along with {@link PagedResponse} on successful completion + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(Context context) { + 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.")); + 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 this.client.getSubscriptionId() is required and cannot be null.")); + .error(new IllegalArgumentException("Parameter resourceGroupName 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)); + .listByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** - * List private clouds in a subscription. - * + * List PrivateCloud resources by 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 a paged list of private clouds as paginated response with {@link PagedFlux}. + * @return the response of a PrivateCloud list operation as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync() { - return new PagedFlux<>( - () -> listSinglePageAsync(), nextLink -> listInSubscriptionNextSinglePageAsync(nextLink)); + private PagedFlux listByResourceGroupAsync(String resourceGroupName) { + return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName), + nextLink -> listNextSinglePageAsync(nextLink)); } /** - * List private clouds in a subscription. - * + * List PrivateCloud resources by 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 a paged list of private clouds as paginated response with {@link PagedFlux}. + * @return the response of a PrivateCloud list operation as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(Context context) { - return new PagedFlux<>( - () -> listSinglePageAsync(context), nextLink -> listInSubscriptionNextSinglePageAsync(nextLink, context)); + private PagedFlux listByResourceGroupAsync(String resourceGroupName, Context context) { + return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName, context), + nextLink -> listNextSinglePageAsync(nextLink, context)); } /** - * List private clouds in a subscription. - * + * List PrivateCloud resources by 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 a paged list of private clouds as paginated response with {@link PagedIterable}. + * @return the response of a PrivateCloud list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list() { - return new PagedIterable<>(listAsync()); + public PagedIterable listByResourceGroup(String resourceGroupName) { + return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName)); } /** - * List private clouds in a subscription. - * + * List PrivateCloud resources by 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 a paged list of private clouds as paginated response with {@link PagedIterable}. + * @return the response of a PrivateCloud list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(Context context) { - return new PagedIterable<>(listAsync(context)); + public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { + return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName, context)); } /** - * Get a private cloud. - * + * Get a PrivateCloud. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. * @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 private cloud along with {@link Response} on successful completion of {@link Mono}. + * @return a PrivateCloud along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getByResourceGroupWithResponseAsync( - String resourceGroupName, String privateCloudName) { + private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, + String privateCloudName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -550,45 +448,32 @@ private Mono> getByResourceGroupWithResponseAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .getByResourceGroup( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - privateCloudName, - this.client.getApiVersion(), - accept, - context)) + .withContext(context -> service.getByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Get a private cloud. - * + * Get a PrivateCloud. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. * @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 a private cloud along with {@link Response} on successful completion of {@link Mono}. + * @return a PrivateCloud along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getByResourceGroupWithResponseAsync( - String resourceGroupName, String privateCloudName, Context context) { + private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, + String privateCloudName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -600,26 +485,19 @@ private Mono> getByResourceGroupWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .getByResourceGroup( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - privateCloudName, - this.client.getApiVersion(), - accept, - context); + return service.getByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, accept, context); } /** - * Get a private cloud. - * + * Get a PrivateCloud. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. * @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 private cloud on successful completion of {@link Mono}. + * @return a PrivateCloud on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono getByResourceGroupAsync(String resourceGroupName, String privateCloudName) { @@ -628,31 +506,31 @@ private Mono getByResourceGroupAsync(String resourceGroupName } /** - * Get a private cloud. - * + * Get a PrivateCloud. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. * @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 a private cloud along with {@link Response}. + * @return a PrivateCloud along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getByResourceGroupWithResponse( - String resourceGroupName, String privateCloudName, Context context) { + public Response getByResourceGroupWithResponse(String resourceGroupName, String privateCloudName, + Context context) { return getByResourceGroupWithResponseAsync(resourceGroupName, privateCloudName, context).block(); } /** - * Get a private cloud. - * + * Get a PrivateCloud. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. * @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 private cloud. + * @return a PrivateCloud. */ @ServiceMethod(returns = ReturnType.SINGLE) public PrivateCloudInner getByResourceGroup(String resourceGroupName, String privateCloudName) { @@ -660,30 +538,26 @@ public PrivateCloudInner getByResourceGroup(String resourceGroupName, String pri } /** - * Create or update a private cloud. - * + * Create a PrivateCloud. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param privateCloud The private cloud. + * @param privateCloud Resource create parameters. * @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 private cloud resource along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync( - String resourceGroupName, String privateCloudName, PrivateCloudInner privateCloud) { + private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String privateCloudName, PrivateCloudInner privateCloud) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -700,27 +574,17 @@ private Mono>> createOrUpdateWithResponseAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .createOrUpdate( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - privateCloudName, - this.client.getApiVersion(), - privateCloud, - accept, - context)) + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, privateCloud, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Create or update a private cloud. - * + * Create a PrivateCloud. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param privateCloud The private cloud. + * @param privateCloud Resource create parameters. * @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. @@ -728,19 +592,15 @@ private Mono>> createOrUpdateWithResponseAsync( * @return a private cloud resource along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync( - String resourceGroupName, String privateCloudName, PrivateCloudInner privateCloud, Context context) { + private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String privateCloudName, PrivateCloudInner privateCloud, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -757,50 +617,36 @@ private Mono>> createOrUpdateWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .createOrUpdate( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - privateCloudName, - this.client.getApiVersion(), - privateCloud, - accept, - context); + return service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, privateCloud, accept, context); } /** - * Create or update a private cloud. - * + * Create a PrivateCloud. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param privateCloud The private cloud. + * @param privateCloud Resource create parameters. * @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 a private cloud resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, PrivateCloudInner> beginCreateOrUpdateAsync( - String resourceGroupName, String privateCloudName, PrivateCloudInner privateCloud) { - Mono>> mono = - createOrUpdateWithResponseAsync(resourceGroupName, privateCloudName, privateCloud); - return this - .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - PrivateCloudInner.class, - PrivateCloudInner.class, - this.client.getContext()); + private PollerFlux, PrivateCloudInner> + beginCreateOrUpdateAsync(String resourceGroupName, String privateCloudName, PrivateCloudInner privateCloud) { + Mono>> mono + = createOrUpdateWithResponseAsync(resourceGroupName, privateCloudName, privateCloud); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + PrivateCloudInner.class, PrivateCloudInner.class, this.client.getContext()); } /** - * Create or update a private cloud. - * + * Create a PrivateCloud. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param privateCloud The private cloud. + * @param privateCloud Resource create parameters. * @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. @@ -811,37 +657,35 @@ private PollerFlux, PrivateCloudInner> beginCreate private PollerFlux, PrivateCloudInner> beginCreateOrUpdateAsync( String resourceGroupName, String privateCloudName, PrivateCloudInner privateCloud, Context context) { context = this.client.mergeContext(context); - Mono>> mono = - createOrUpdateWithResponseAsync(resourceGroupName, privateCloudName, privateCloud, context); - return this - .client - .getLroResult( - mono, this.client.getHttpPipeline(), PrivateCloudInner.class, PrivateCloudInner.class, context); + Mono>> mono + = createOrUpdateWithResponseAsync(resourceGroupName, privateCloudName, privateCloud, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + PrivateCloudInner.class, PrivateCloudInner.class, context); } /** - * Create or update a private cloud. - * + * Create a PrivateCloud. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param privateCloud The private cloud. + * @param privateCloud Resource create parameters. * @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 a private cloud resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, PrivateCloudInner> beginCreateOrUpdate( - String resourceGroupName, String privateCloudName, PrivateCloudInner privateCloud) { + public SyncPoller, PrivateCloudInner> beginCreateOrUpdate(String resourceGroupName, + String privateCloudName, PrivateCloudInner privateCloud) { return this.beginCreateOrUpdateAsync(resourceGroupName, privateCloudName, privateCloud).getSyncPoller(); } /** - * Create or update a private cloud. - * + * Create a PrivateCloud. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param privateCloud The private cloud. + * @param privateCloud Resource create parameters. * @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. @@ -849,38 +693,36 @@ public SyncPoller, PrivateCloudInner> beginCreateO * @return the {@link SyncPoller} for polling of a private cloud resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, PrivateCloudInner> beginCreateOrUpdate( - String resourceGroupName, String privateCloudName, PrivateCloudInner privateCloud, Context context) { - return this - .beginCreateOrUpdateAsync(resourceGroupName, privateCloudName, privateCloud, context) + public SyncPoller, PrivateCloudInner> beginCreateOrUpdate(String resourceGroupName, + String privateCloudName, PrivateCloudInner privateCloud, Context context) { + return this.beginCreateOrUpdateAsync(resourceGroupName, privateCloudName, privateCloud, context) .getSyncPoller(); } /** - * Create or update a private cloud. - * + * Create a PrivateCloud. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param privateCloud The private cloud. + * @param privateCloud Resource create parameters. * @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 private cloud resource on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync( - String resourceGroupName, String privateCloudName, PrivateCloudInner privateCloud) { - return beginCreateOrUpdateAsync(resourceGroupName, privateCloudName, privateCloud) - .last() + private Mono createOrUpdateAsync(String resourceGroupName, String privateCloudName, + PrivateCloudInner privateCloud) { + return beginCreateOrUpdateAsync(resourceGroupName, privateCloudName, privateCloud).last() .flatMap(this.client::getLroFinalResultOrError); } /** - * Create or update a private cloud. - * + * Create a PrivateCloud. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param privateCloud The private cloud. + * @param privateCloud Resource create parameters. * @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. @@ -888,36 +730,35 @@ private Mono createOrUpdateAsync( * @return a private cloud resource on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync( - String resourceGroupName, String privateCloudName, PrivateCloudInner privateCloud, Context context) { - return beginCreateOrUpdateAsync(resourceGroupName, privateCloudName, privateCloud, context) - .last() + private Mono createOrUpdateAsync(String resourceGroupName, String privateCloudName, + PrivateCloudInner privateCloud, Context context) { + return beginCreateOrUpdateAsync(resourceGroupName, privateCloudName, privateCloud, context).last() .flatMap(this.client::getLroFinalResultOrError); } /** - * Create or update a private cloud. - * + * Create a PrivateCloud. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param privateCloud The private cloud. + * @param privateCloud Resource create parameters. * @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 private cloud resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - public PrivateCloudInner createOrUpdate( - String resourceGroupName, String privateCloudName, PrivateCloudInner privateCloud) { + public PrivateCloudInner createOrUpdate(String resourceGroupName, String privateCloudName, + PrivateCloudInner privateCloud) { return createOrUpdateAsync(resourceGroupName, privateCloudName, privateCloud).block(); } /** - * Create or update a private cloud. - * + * Create a PrivateCloud. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param privateCloud The private cloud. + * @param privateCloud Resource create parameters. * @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. @@ -925,14 +766,14 @@ public PrivateCloudInner createOrUpdate( * @return a private cloud resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - public PrivateCloudInner createOrUpdate( - String resourceGroupName, String privateCloudName, PrivateCloudInner privateCloud, Context context) { + public PrivateCloudInner createOrUpdate(String resourceGroupName, String privateCloudName, + PrivateCloudInner privateCloud, Context context) { return createOrUpdateAsync(resourceGroupName, privateCloudName, privateCloud, context).block(); } /** - * Update a private cloud. - * + * Update a PrivateCloud. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. * @param privateCloudUpdate The private cloud properties to be updated. @@ -942,19 +783,15 @@ public PrivateCloudInner createOrUpdate( * @return a private cloud resource along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateWithResponseAsync( - String resourceGroupName, String privateCloudName, PrivateCloudUpdate privateCloudUpdate) { + private Mono>> updateWithResponseAsync(String resourceGroupName, String privateCloudName, + PrivateCloudUpdate privateCloudUpdate) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -971,25 +808,14 @@ private Mono>> updateWithResponseAsync( privateCloudUpdate.validate(); } final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .update( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - privateCloudName, - this.client.getApiVersion(), - privateCloudUpdate, - accept, - context)) + return FluxUtil.withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, privateCloudUpdate, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Update a private cloud. - * + * Update a PrivateCloud. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. * @param privateCloudUpdate The private cloud properties to be updated. @@ -1000,19 +826,15 @@ private Mono>> updateWithResponseAsync( * @return a private cloud resource along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateWithResponseAsync( - String resourceGroupName, String privateCloudName, PrivateCloudUpdate privateCloudUpdate, Context context) { + private Mono>> updateWithResponseAsync(String resourceGroupName, String privateCloudName, + PrivateCloudUpdate privateCloudUpdate, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1030,21 +852,13 @@ private Mono>> updateWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .update( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - privateCloudName, - this.client.getApiVersion(), - privateCloudUpdate, - accept, - context); + return service.update(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, privateCloudName, privateCloudUpdate, accept, context); } /** - * Update a private cloud. - * + * Update a PrivateCloud. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. * @param privateCloudUpdate The private cloud properties to be updated. @@ -1054,23 +868,17 @@ private Mono>> updateWithResponseAsync( * @return the {@link PollerFlux} for polling of a private cloud resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, PrivateCloudInner> beginUpdateAsync( - String resourceGroupName, String privateCloudName, PrivateCloudUpdate privateCloudUpdate) { - Mono>> mono = - updateWithResponseAsync(resourceGroupName, privateCloudName, privateCloudUpdate); - return this - .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - PrivateCloudInner.class, - PrivateCloudInner.class, - this.client.getContext()); + private PollerFlux, PrivateCloudInner> beginUpdateAsync(String resourceGroupName, + String privateCloudName, PrivateCloudUpdate privateCloudUpdate) { + Mono>> mono + = updateWithResponseAsync(resourceGroupName, privateCloudName, privateCloudUpdate); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + PrivateCloudInner.class, PrivateCloudInner.class, this.client.getContext()); } /** - * Update a private cloud. - * + * Update a PrivateCloud. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. * @param privateCloudUpdate The private cloud properties to be updated. @@ -1081,20 +889,18 @@ private PollerFlux, PrivateCloudInner> beginUpdate * @return the {@link PollerFlux} for polling of a private cloud resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, PrivateCloudInner> beginUpdateAsync( - String resourceGroupName, String privateCloudName, PrivateCloudUpdate privateCloudUpdate, Context context) { + private PollerFlux, PrivateCloudInner> beginUpdateAsync(String resourceGroupName, + String privateCloudName, PrivateCloudUpdate privateCloudUpdate, Context context) { context = this.client.mergeContext(context); - Mono>> mono = - updateWithResponseAsync(resourceGroupName, privateCloudName, privateCloudUpdate, context); - return this - .client - .getLroResult( - mono, this.client.getHttpPipeline(), PrivateCloudInner.class, PrivateCloudInner.class, context); + Mono>> mono + = updateWithResponseAsync(resourceGroupName, privateCloudName, privateCloudUpdate, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + PrivateCloudInner.class, PrivateCloudInner.class, context); } /** - * Update a private cloud. - * + * Update a PrivateCloud. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. * @param privateCloudUpdate The private cloud properties to be updated. @@ -1104,14 +910,14 @@ private PollerFlux, PrivateCloudInner> beginUpdate * @return the {@link SyncPoller} for polling of a private cloud resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, PrivateCloudInner> beginUpdate( - String resourceGroupName, String privateCloudName, PrivateCloudUpdate privateCloudUpdate) { + public SyncPoller, PrivateCloudInner> beginUpdate(String resourceGroupName, + String privateCloudName, PrivateCloudUpdate privateCloudUpdate) { return this.beginUpdateAsync(resourceGroupName, privateCloudName, privateCloudUpdate).getSyncPoller(); } /** - * Update a private cloud. - * + * Update a PrivateCloud. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. * @param privateCloudUpdate The private cloud properties to be updated. @@ -1122,14 +928,14 @@ public SyncPoller, PrivateCloudInner> beginUpdate( * @return the {@link SyncPoller} for polling of a private cloud resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, PrivateCloudInner> beginUpdate( - String resourceGroupName, String privateCloudName, PrivateCloudUpdate privateCloudUpdate, Context context) { + public SyncPoller, PrivateCloudInner> beginUpdate(String resourceGroupName, + String privateCloudName, PrivateCloudUpdate privateCloudUpdate, Context context) { return this.beginUpdateAsync(resourceGroupName, privateCloudName, privateCloudUpdate, context).getSyncPoller(); } /** - * Update a private cloud. - * + * Update a PrivateCloud. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. * @param privateCloudUpdate The private cloud properties to be updated. @@ -1139,16 +945,15 @@ public SyncPoller, PrivateCloudInner> beginUpdate( * @return a private cloud resource on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync( - String resourceGroupName, String privateCloudName, PrivateCloudUpdate privateCloudUpdate) { - return beginUpdateAsync(resourceGroupName, privateCloudName, privateCloudUpdate) - .last() + private Mono updateAsync(String resourceGroupName, String privateCloudName, + PrivateCloudUpdate privateCloudUpdate) { + return beginUpdateAsync(resourceGroupName, privateCloudName, privateCloudUpdate).last() .flatMap(this.client::getLroFinalResultOrError); } /** - * Update a private cloud. - * + * Update a PrivateCloud. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. * @param privateCloudUpdate The private cloud properties to be updated. @@ -1159,16 +964,15 @@ private Mono updateAsync( * @return a private cloud resource on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync( - String resourceGroupName, String privateCloudName, PrivateCloudUpdate privateCloudUpdate, Context context) { - return beginUpdateAsync(resourceGroupName, privateCloudName, privateCloudUpdate, context) - .last() + private Mono updateAsync(String resourceGroupName, String privateCloudName, + PrivateCloudUpdate privateCloudUpdate, Context context) { + return beginUpdateAsync(resourceGroupName, privateCloudName, privateCloudUpdate, context).last() .flatMap(this.client::getLroFinalResultOrError); } /** - * Update a private cloud. - * + * Update a PrivateCloud. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. * @param privateCloudUpdate The private cloud properties to be updated. @@ -1178,14 +982,14 @@ private Mono updateAsync( * @return a private cloud resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - public PrivateCloudInner update( - String resourceGroupName, String privateCloudName, PrivateCloudUpdate privateCloudUpdate) { + public PrivateCloudInner update(String resourceGroupName, String privateCloudName, + PrivateCloudUpdate privateCloudUpdate) { return updateAsync(resourceGroupName, privateCloudName, privateCloudUpdate).block(); } /** - * Update a private cloud. - * + * Update a PrivateCloud. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. * @param privateCloudUpdate The private cloud properties to be updated. @@ -1196,14 +1000,14 @@ public PrivateCloudInner update( * @return a private cloud resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - public PrivateCloudInner update( - String resourceGroupName, String privateCloudName, PrivateCloudUpdate privateCloudUpdate, Context context) { + public PrivateCloudInner update(String resourceGroupName, String privateCloudName, + PrivateCloudUpdate privateCloudUpdate, Context context) { return updateAsync(resourceGroupName, privateCloudName, privateCloudUpdate, context).block(); } /** - * Delete a private cloud. - * + * Delete a PrivateCloud. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1212,19 +1016,15 @@ public PrivateCloudInner update( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync( - String resourceGroupName, String privateCloudName) { + private Mono>> deleteWithResponseAsync(String resourceGroupName, + String privateCloudName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1236,23 +1036,14 @@ private Mono>> deleteWithResponseAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .delete( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - privateCloudName, - this.client.getApiVersion(), - accept, - context)) + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Delete a private cloud. - * + * Delete a PrivateCloud. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. * @param context The context to associate with this operation. @@ -1262,19 +1053,15 @@ private Mono>> deleteWithResponseAsync( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync( - String resourceGroupName, String privateCloudName, Context context) { + private Mono>> deleteWithResponseAsync(String resourceGroupName, String privateCloudName, + Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1286,20 +1073,13 @@ private Mono>> deleteWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .delete( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - privateCloudName, - this.client.getApiVersion(), - accept, - context); + return service.delete(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, privateCloudName, accept, context); } /** - * Delete a private cloud. - * + * Delete a PrivateCloud. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1310,15 +1090,13 @@ private Mono>> deleteWithResponseAsync( @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String privateCloudName) { Mono>> mono = deleteWithResponseAsync(resourceGroupName, privateCloudName); - return this - .client - .getLroResult( - mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); } /** - * Delete a private cloud. - * + * Delete a PrivateCloud. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. * @param context The context to associate with this operation. @@ -1328,18 +1106,17 @@ private PollerFlux, Void> beginDeleteAsync(String resourceGroup * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync( - String resourceGroupName, String privateCloudName, Context context) { + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String privateCloudName, + Context context) { context = this.client.mergeContext(context); Mono>> mono = deleteWithResponseAsync(resourceGroupName, privateCloudName, context); - return this - .client - .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + context); } /** - * Delete a private cloud. - * + * Delete a PrivateCloud. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1353,8 +1130,8 @@ public SyncPoller, Void> beginDelete(String resourceGroupName, } /** - * Delete a private cloud. - * + * Delete a PrivateCloud. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. * @param context The context to associate with this operation. @@ -1364,14 +1141,14 @@ public SyncPoller, Void> beginDelete(String resourceGroupName, * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete( - String resourceGroupName, String privateCloudName, Context context) { + public SyncPoller, Void> beginDelete(String resourceGroupName, String privateCloudName, + Context context) { return this.beginDeleteAsync(resourceGroupName, privateCloudName, context).getSyncPoller(); } /** - * Delete a private cloud. - * + * Delete a PrivateCloud. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1381,14 +1158,13 @@ public SyncPoller, Void> beginDelete( */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono deleteAsync(String resourceGroupName, String privateCloudName) { - return beginDeleteAsync(resourceGroupName, privateCloudName) - .last() + return beginDeleteAsync(resourceGroupName, privateCloudName).last() .flatMap(this.client::getLroFinalResultOrError); } /** - * Delete a private cloud. - * + * Delete a PrivateCloud. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. * @param context The context to associate with this operation. @@ -1399,14 +1175,13 @@ private Mono deleteAsync(String resourceGroupName, String privateCloudName */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono deleteAsync(String resourceGroupName, String privateCloudName, Context context) { - return beginDeleteAsync(resourceGroupName, privateCloudName, context) - .last() + return beginDeleteAsync(resourceGroupName, privateCloudName, context).last() .flatMap(this.client::getLroFinalResultOrError); } /** - * Delete a private cloud. - * + * Delete a PrivateCloud. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1419,8 +1194,8 @@ public void delete(String resourceGroupName, String privateCloudName) { } /** - * Delete a private cloud. - * + * Delete a PrivateCloud. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. * @param context The context to associate with this operation. @@ -1434,29 +1209,26 @@ public void delete(String resourceGroupName, String privateCloudName, Context co } /** - * Rotate the vCenter password. - * + * List the admin credentials for the private cloud. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. * @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}. + * @return administrative credentials for accessing vCenter and NSX-T along with {@link Response} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> rotateVcenterPasswordWithResponseAsync( - String resourceGroupName, String privateCloudName) { + private Mono> listAdminCredentialsWithResponseAsync(String resourceGroupName, + String privateCloudName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1468,45 +1240,33 @@ private Mono>> rotateVcenterPasswordWithResponseAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .rotateVcenterPassword( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - privateCloudName, - this.client.getApiVersion(), - accept, - context)) + .withContext(context -> service.listAdminCredentials(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Rotate the vCenter password. - * + * List the admin credentials for the private cloud. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. * @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}. + * @return administrative credentials for accessing vCenter and NSX-T along with {@link Response} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> rotateVcenterPasswordWithResponseAsync( - String resourceGroupName, String privateCloudName, Context context) { + private Mono> listAdminCredentialsWithResponseAsync(String resourceGroupName, + String privateCloudName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1518,160 +1278,61 @@ private Mono>> rotateVcenterPasswordWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .rotateVcenterPassword( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - privateCloudName, - this.client.getApiVersion(), - accept, - context); - } - - /** - * Rotate the vCenter password. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @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 long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginRotateVcenterPasswordAsync( - String resourceGroupName, String privateCloudName) { - Mono>> mono = - rotateVcenterPasswordWithResponseAsync(resourceGroupName, privateCloudName); - return this - .client - .getLroResult( - mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); - } - - /** - * Rotate the vCenter password. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @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 long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginRotateVcenterPasswordAsync( - String resourceGroupName, String privateCloudName, Context context) { - context = this.client.mergeContext(context); - Mono>> mono = - rotateVcenterPasswordWithResponseAsync(resourceGroupName, privateCloudName, context); - return this - .client - .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); - } - - /** - * Rotate the vCenter password. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @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 long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginRotateVcenterPassword( - String resourceGroupName, String privateCloudName) { - return this.beginRotateVcenterPasswordAsync(resourceGroupName, privateCloudName).getSyncPoller(); - } - - /** - * Rotate the vCenter password. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @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 long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginRotateVcenterPassword( - String resourceGroupName, String privateCloudName, Context context) { - return this.beginRotateVcenterPasswordAsync(resourceGroupName, privateCloudName, context).getSyncPoller(); + return service.listAdminCredentials(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, accept, context); } /** - * Rotate the vCenter password. - * + * List the admin credentials for the private cloud. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. * @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. + * @return administrative credentials for accessing vCenter and NSX-T on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono rotateVcenterPasswordAsync(String resourceGroupName, String privateCloudName) { - return beginRotateVcenterPasswordAsync(resourceGroupName, privateCloudName) - .last() - .flatMap(this.client::getLroFinalResultOrError); + private Mono listAdminCredentialsAsync(String resourceGroupName, String privateCloudName) { + return listAdminCredentialsWithResponseAsync(resourceGroupName, privateCloudName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** - * Rotate the vCenter password. - * + * List the admin credentials for the private cloud. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. * @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 A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono rotateVcenterPasswordAsync(String resourceGroupName, String privateCloudName, Context context) { - return beginRotateVcenterPasswordAsync(resourceGroupName, privateCloudName, context) - .last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Rotate the vCenter password. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @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 administrative credentials for accessing vCenter and NSX-T along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void rotateVcenterPassword(String resourceGroupName, String privateCloudName) { - rotateVcenterPasswordAsync(resourceGroupName, privateCloudName).block(); + public Response listAdminCredentialsWithResponse(String resourceGroupName, + String privateCloudName, Context context) { + return listAdminCredentialsWithResponseAsync(resourceGroupName, privateCloudName, context).block(); } /** - * Rotate the vCenter password. - * + * List the admin credentials for the private cloud. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @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 administrative credentials for accessing vCenter and NSX-T. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void rotateVcenterPassword(String resourceGroupName, String privateCloudName, Context context) { - rotateVcenterPasswordAsync(resourceGroupName, privateCloudName, context).block(); + public AdminCredentialsInner listAdminCredentials(String resourceGroupName, String privateCloudName) { + return listAdminCredentialsWithResponse(resourceGroupName, privateCloudName, Context.NONE).getValue(); } /** * Rotate the NSX-T Manager password. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1680,19 +1341,15 @@ public void rotateVcenterPassword(String resourceGroupName, String privateCloudN * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> rotateNsxtPasswordWithResponseAsync( - String resourceGroupName, String privateCloudName) { + private Mono>> rotateNsxtPasswordWithResponseAsync(String resourceGroupName, + String privateCloudName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1704,23 +1361,14 @@ private Mono>> rotateNsxtPasswordWithResponseAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .rotateNsxtPassword( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - privateCloudName, - this.client.getApiVersion(), - accept, - context)) + .withContext(context -> service.rotateNsxtPassword(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Rotate the NSX-T Manager password. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. * @param context The context to associate with this operation. @@ -1730,19 +1378,15 @@ private Mono>> rotateNsxtPasswordWithResponseAsync( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> rotateNsxtPasswordWithResponseAsync( - String resourceGroupName, String privateCloudName, Context context) { + private Mono>> rotateNsxtPasswordWithResponseAsync(String resourceGroupName, + String privateCloudName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1754,20 +1398,13 @@ private Mono>> rotateNsxtPasswordWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .rotateNsxtPassword( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - privateCloudName, - this.client.getApiVersion(), - accept, - context); + return service.rotateNsxtPassword(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, accept, context); } /** * Rotate the NSX-T Manager password. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1776,19 +1413,17 @@ private Mono>> rotateNsxtPasswordWithResponseAsync( * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginRotateNsxtPasswordAsync( - String resourceGroupName, String privateCloudName) { - Mono>> mono = - rotateNsxtPasswordWithResponseAsync(resourceGroupName, privateCloudName); - return this - .client - .getLroResult( - mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); + private PollerFlux, Void> beginRotateNsxtPasswordAsync(String resourceGroupName, + String privateCloudName) { + Mono>> mono + = rotateNsxtPasswordWithResponseAsync(resourceGroupName, privateCloudName); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); } /** * Rotate the NSX-T Manager password. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. * @param context The context to associate with this operation. @@ -1798,19 +1433,18 @@ private PollerFlux, Void> beginRotateNsxtPasswordAsync( * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginRotateNsxtPasswordAsync( - String resourceGroupName, String privateCloudName, Context context) { + private PollerFlux, Void> beginRotateNsxtPasswordAsync(String resourceGroupName, + String privateCloudName, Context context) { context = this.client.mergeContext(context); - Mono>> mono = - rotateNsxtPasswordWithResponseAsync(resourceGroupName, privateCloudName, context); - return this - .client - .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); + Mono>> mono + = rotateNsxtPasswordWithResponseAsync(resourceGroupName, privateCloudName, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + context); } /** * Rotate the NSX-T Manager password. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1819,14 +1453,14 @@ private PollerFlux, Void> beginRotateNsxtPasswordAsync( * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginRotateNsxtPassword( - String resourceGroupName, String privateCloudName) { + public SyncPoller, Void> beginRotateNsxtPassword(String resourceGroupName, + String privateCloudName) { return this.beginRotateNsxtPasswordAsync(resourceGroupName, privateCloudName).getSyncPoller(); } /** * Rotate the NSX-T Manager password. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. * @param context The context to associate with this operation. @@ -1836,14 +1470,14 @@ public SyncPoller, Void> beginRotateNsxtPassword( * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginRotateNsxtPassword( - String resourceGroupName, String privateCloudName, Context context) { + public SyncPoller, Void> beginRotateNsxtPassword(String resourceGroupName, String privateCloudName, + Context context) { return this.beginRotateNsxtPasswordAsync(resourceGroupName, privateCloudName, context).getSyncPoller(); } /** * Rotate the NSX-T Manager password. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1853,14 +1487,13 @@ public SyncPoller, Void> beginRotateNsxtPassword( */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono rotateNsxtPasswordAsync(String resourceGroupName, String privateCloudName) { - return beginRotateNsxtPasswordAsync(resourceGroupName, privateCloudName) - .last() + return beginRotateNsxtPasswordAsync(resourceGroupName, privateCloudName).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Rotate the NSX-T Manager password. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. * @param context The context to associate with this operation. @@ -1871,14 +1504,13 @@ private Mono rotateNsxtPasswordAsync(String resourceGroupName, String priv */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono rotateNsxtPasswordAsync(String resourceGroupName, String privateCloudName, Context context) { - return beginRotateNsxtPasswordAsync(resourceGroupName, privateCloudName, context) - .last() + return beginRotateNsxtPasswordAsync(resourceGroupName, privateCloudName, context).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Rotate the NSX-T Manager password. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1892,7 +1524,7 @@ public void rotateNsxtPassword(String resourceGroupName, String privateCloudName /** * Rotate the NSX-T Manager password. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. * @param context The context to associate with this operation. @@ -1906,30 +1538,25 @@ public void rotateNsxtPassword(String resourceGroupName, String privateCloudName } /** - * List the admin credentials for the private cloud. - * + * Rotate the vCenter password. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. * @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 administrative credentials for accessing vCenter and NSX-T along with {@link Response} on successful - * completion of {@link Mono}. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listAdminCredentialsWithResponseAsync( - String resourceGroupName, String privateCloudName) { + private Mono>> rotateVcenterPasswordWithResponseAsync(String resourceGroupName, + String privateCloudName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1942,45 +1569,32 @@ private Mono> listAdminCredentialsWithResponseAs final String accept = "application/json"; return FluxUtil .withContext( - context -> - service - .listAdminCredentials( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - privateCloudName, - this.client.getApiVersion(), - accept, - context)) + context -> service.rotateVcenterPassword(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * List the admin credentials for the private cloud. - * + * Rotate the vCenter password. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. * @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 administrative credentials for accessing vCenter and NSX-T along with {@link Response} on successful - * completion of {@link Mono}. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listAdminCredentialsWithResponseAsync( - String resourceGroupName, String privateCloudName, Context context) { + private Mono>> rotateVcenterPasswordWithResponseAsync(String resourceGroupName, + String privateCloudName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1992,210 +1606,259 @@ private Mono> listAdminCredentialsWithResponseAs } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .listAdminCredentials( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - privateCloudName, - this.client.getApiVersion(), - accept, - context); + return service.rotateVcenterPassword(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, accept, context); } /** - * List the admin credentials for the private cloud. - * + * Rotate the vCenter password. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. * @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 administrative credentials for accessing vCenter and NSX-T on successful completion of {@link Mono}. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginRotateVcenterPasswordAsync(String resourceGroupName, + String privateCloudName) { + Mono>> mono + = rotateVcenterPasswordWithResponseAsync(resourceGroupName, privateCloudName); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); + } + + /** + * Rotate the vCenter password. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @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 long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginRotateVcenterPasswordAsync(String resourceGroupName, + String privateCloudName, Context context) { + context = this.client.mergeContext(context); + Mono>> mono + = rotateVcenterPasswordWithResponseAsync(resourceGroupName, privateCloudName, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + context); + } + + /** + * Rotate the vCenter password. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @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 long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginRotateVcenterPassword(String resourceGroupName, + String privateCloudName) { + return this.beginRotateVcenterPasswordAsync(resourceGroupName, privateCloudName).getSyncPoller(); + } + + /** + * Rotate the vCenter password. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @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 long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginRotateVcenterPassword(String resourceGroupName, + String privateCloudName, Context context) { + return this.beginRotateVcenterPasswordAsync(resourceGroupName, privateCloudName, context).getSyncPoller(); + } + + /** + * Rotate the vCenter password. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @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 listAdminCredentialsAsync(String resourceGroupName, String privateCloudName) { - return listAdminCredentialsWithResponseAsync(resourceGroupName, privateCloudName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); + private Mono rotateVcenterPasswordAsync(String resourceGroupName, String privateCloudName) { + return beginRotateVcenterPasswordAsync(resourceGroupName, privateCloudName).last() + .flatMap(this.client::getLroFinalResultOrError); } /** - * List the admin credentials for the private cloud. - * + * Rotate the vCenter password. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. * @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 administrative credentials for accessing vCenter and NSX-T along with {@link Response}. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response listAdminCredentialsWithResponse( - String resourceGroupName, String privateCloudName, Context context) { - return listAdminCredentialsWithResponseAsync(resourceGroupName, privateCloudName, context).block(); + private Mono rotateVcenterPasswordAsync(String resourceGroupName, String privateCloudName, Context context) { + return beginRotateVcenterPasswordAsync(resourceGroupName, privateCloudName, context).last() + .flatMap(this.client::getLroFinalResultOrError); } /** - * List the admin credentials for the private cloud. - * + * Rotate the vCenter password. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. * @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 administrative credentials for accessing vCenter and NSX-T. */ @ServiceMethod(returns = ReturnType.SINGLE) - public AdminCredentialsInner listAdminCredentials(String resourceGroupName, String privateCloudName) { - return listAdminCredentialsWithResponse(resourceGroupName, privateCloudName, Context.NONE).getValue(); + public void rotateVcenterPassword(String resourceGroupName, String privateCloudName) { + rotateVcenterPasswordAsync(resourceGroupName, privateCloudName).block(); + } + + /** + * Rotate the vCenter password. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void rotateVcenterPassword(String resourceGroupName, String privateCloudName, Context context) { + rotateVcenterPasswordAsync(resourceGroupName, privateCloudName, context).block(); } /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * 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 a paged list of private clouds along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return the response of a PrivateCloud list operation along with {@link PagedResponse} on successful completion + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink) { + private Mono> listInSubscriptionNextSinglePageAsync(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.")); + 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.listNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .withContext( + context -> service.listInSubscriptionNext(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 URL to get the next list of items - *

The nextLink parameter. + * + * 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 a paged list of private clouds along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return the response of a PrivateCloud list operation along with {@link PagedResponse} on successful completion + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink, Context context) { + private Mono> listInSubscriptionNextSinglePageAsync(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.")); + 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 - .listNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.listInSubscriptionNext(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 URL to get the next list of items - *

The nextLink parameter. + * + * 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 a paged list of private clouds along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return the response of a PrivateCloud list operation along with {@link PagedResponse} on successful completion + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listInSubscriptionNextSinglePageAsync(String nextLink) { + private Mono> listNextSinglePageAsync(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.")); + 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.listInSubscriptionNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + return FluxUtil.withContext(context -> service.listNext(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 URL to get the next list of items - *

The nextLink parameter. + * + * 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 a paged list of private clouds along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return the response of a PrivateCloud list operation along with {@link PagedResponse} on successful completion + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listInSubscriptionNextSinglePageAsync( - String nextLink, Context context) { + private Mono> listNextSinglePageAsync(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.")); + 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 - .listInSubscriptionNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.listNext(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/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/PrivateCloudsImpl.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/PrivateCloudsImpl.java index cfdafa4a10226..26069246d2967 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/PrivateCloudsImpl.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/PrivateCloudsImpl.java @@ -28,35 +28,32 @@ public PrivateCloudsImpl(PrivateCloudsClient innerClient, com.azure.resourcemana this.serviceManager = serviceManager; } - public PagedIterable listByResourceGroup(String resourceGroupName) { - PagedIterable inner = this.serviceClient().listByResourceGroup(resourceGroupName); - return Utils.mapPage(inner, inner1 -> new PrivateCloudImpl(inner1, this.manager())); - } - - public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { - PagedIterable inner = this.serviceClient().listByResourceGroup(resourceGroupName, context); - return Utils.mapPage(inner, inner1 -> new PrivateCloudImpl(inner1, this.manager())); - } - public PagedIterable list() { PagedIterable inner = this.serviceClient().list(); - return Utils.mapPage(inner, inner1 -> new PrivateCloudImpl(inner1, this.manager())); + return ResourceManagerUtils.mapPage(inner, inner1 -> new PrivateCloudImpl(inner1, this.manager())); } public PagedIterable list(Context context) { PagedIterable inner = this.serviceClient().list(context); - return Utils.mapPage(inner, inner1 -> new PrivateCloudImpl(inner1, this.manager())); + return ResourceManagerUtils.mapPage(inner, inner1 -> new PrivateCloudImpl(inner1, this.manager())); + } + + public PagedIterable listByResourceGroup(String resourceGroupName) { + PagedIterable inner = this.serviceClient().listByResourceGroup(resourceGroupName); + return ResourceManagerUtils.mapPage(inner, inner1 -> new PrivateCloudImpl(inner1, this.manager())); } - public Response getByResourceGroupWithResponse( - String resourceGroupName, String privateCloudName, Context context) { - Response inner = - this.serviceClient().getByResourceGroupWithResponse(resourceGroupName, privateCloudName, context); + public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { + PagedIterable inner = this.serviceClient().listByResourceGroup(resourceGroupName, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new PrivateCloudImpl(inner1, this.manager())); + } + + public Response getByResourceGroupWithResponse(String resourceGroupName, String privateCloudName, + Context context) { + Response inner + = this.serviceClient().getByResourceGroupWithResponse(resourceGroupName, privateCloudName, context); if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), new PrivateCloudImpl(inner.getValue(), this.manager())); } else { return null; @@ -80,31 +77,12 @@ public void delete(String resourceGroupName, String privateCloudName, Context co this.serviceClient().delete(resourceGroupName, privateCloudName, context); } - public void rotateVcenterPassword(String resourceGroupName, String privateCloudName) { - this.serviceClient().rotateVcenterPassword(resourceGroupName, privateCloudName); - } - - public void rotateVcenterPassword(String resourceGroupName, String privateCloudName, Context context) { - this.serviceClient().rotateVcenterPassword(resourceGroupName, privateCloudName, context); - } - - public void rotateNsxtPassword(String resourceGroupName, String privateCloudName) { - this.serviceClient().rotateNsxtPassword(resourceGroupName, privateCloudName); - } - - public void rotateNsxtPassword(String resourceGroupName, String privateCloudName, Context context) { - this.serviceClient().rotateNsxtPassword(resourceGroupName, privateCloudName, context); - } - - public Response listAdminCredentialsWithResponse( - String resourceGroupName, String privateCloudName, Context context) { - Response inner = - this.serviceClient().listAdminCredentialsWithResponse(resourceGroupName, privateCloudName, context); + public Response listAdminCredentialsWithResponse(String resourceGroupName, + String privateCloudName, Context context) { + Response inner + = this.serviceClient().listAdminCredentialsWithResponse(resourceGroupName, privateCloudName, context); if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), new AdminCredentialsImpl(inner.getValue(), this.manager())); } else { return null; @@ -120,78 +98,74 @@ public AdminCredentials listAdminCredentials(String resourceGroupName, String pr } } + public void rotateNsxtPassword(String resourceGroupName, String privateCloudName) { + this.serviceClient().rotateNsxtPassword(resourceGroupName, privateCloudName); + } + + public void rotateNsxtPassword(String resourceGroupName, String privateCloudName, Context context) { + this.serviceClient().rotateNsxtPassword(resourceGroupName, privateCloudName, context); + } + + public void rotateVcenterPassword(String resourceGroupName, String privateCloudName) { + this.serviceClient().rotateVcenterPassword(resourceGroupName, privateCloudName); + } + + public void rotateVcenterPassword(String resourceGroupName, String privateCloudName, Context context) { + this.serviceClient().rotateVcenterPassword(resourceGroupName, privateCloudName, context); + } + public PrivateCloud getById(String id) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + String resourceGroupName = ResourceManagerUtils.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))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } - String privateCloudName = Utils.getValueFromIdByName(id, "privateClouds"); + String privateCloudName = ResourceManagerUtils.getValueFromIdByName(id, "privateClouds"); if (privateCloudName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'privateClouds'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'privateClouds'.", id))); } return this.getByResourceGroupWithResponse(resourceGroupName, privateCloudName, Context.NONE).getValue(); } public Response getByIdWithResponse(String id, Context context) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + String resourceGroupName = ResourceManagerUtils.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))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } - String privateCloudName = Utils.getValueFromIdByName(id, "privateClouds"); + String privateCloudName = ResourceManagerUtils.getValueFromIdByName(id, "privateClouds"); if (privateCloudName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'privateClouds'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'privateClouds'.", id))); } return this.getByResourceGroupWithResponse(resourceGroupName, privateCloudName, context); } public void deleteById(String id) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + String resourceGroupName = ResourceManagerUtils.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))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } - String privateCloudName = Utils.getValueFromIdByName(id, "privateClouds"); + String privateCloudName = ResourceManagerUtils.getValueFromIdByName(id, "privateClouds"); if (privateCloudName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'privateClouds'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'privateClouds'.", id))); } this.delete(resourceGroupName, privateCloudName, Context.NONE); } public void deleteByIdWithResponse(String id, Context context) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + String resourceGroupName = ResourceManagerUtils.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))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } - String privateCloudName = Utils.getValueFromIdByName(id, "privateClouds"); + String privateCloudName = ResourceManagerUtils.getValueFromIdByName(id, "privateClouds"); if (privateCloudName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'privateClouds'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'privateClouds'.", id))); } this.delete(resourceGroupName, privateCloudName, context); } diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/Utils.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/ResourceManagerUtils.java similarity index 79% rename from sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/Utils.java rename to sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/ResourceManagerUtils.java index 7c747736c7afc..16d07137dae76 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/Utils.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/ResourceManagerUtils.java @@ -19,7 +19,10 @@ import java.util.stream.Stream; import reactor.core.publisher.Flux; -final class Utils { +final class ResourceManagerUtils { + private ResourceManagerUtils() { + } + static String getValueFromIdByName(String id, String name) { if (id == null) { return null; @@ -38,6 +41,7 @@ static String getValueFromIdByName(String id, String name) { } } return null; + } static String getValueFromIdByParameterName(String id, String pathTemplate, String parameterName) { @@ -60,7 +64,7 @@ static String getValueFromIdByParameterName(String id, String pathTemplate, Stri segments.add(idSegment); idItrReverted.forEachRemaining(segments::add); Collections.reverse(segments); - if (segments.size() > 0 && segments.get(0).isEmpty()) { + if (!segments.isEmpty() && segments.get(0).isEmpty()) { segments.remove(0); } return String.join("/", segments); @@ -71,10 +75,11 @@ static String getValueFromIdByParameterName(String id, String pathTemplate, Stri } } return null; + } static PagedIterable mapPage(PagedIterable pageIterable, Function mapper) { - return new PagedIterableImpl(pageIterable, mapper); + return new PagedIterableImpl<>(pageIterable, mapper); } private static final class PagedIterableImpl extends PagedIterable { @@ -84,26 +89,17 @@ private static final class PagedIterableImpl extends PagedIterable { private final Function, PagedResponse> pageMapper; private PagedIterableImpl(PagedIterable pagedIterable, Function mapper) { - super( - PagedFlux - .create( - () -> - (continuationToken, pageSize) -> - Flux.fromStream(pagedIterable.streamByPage().map(getPageMapper(mapper))))); + super(PagedFlux.create(() -> (continuationToken, pageSize) -> Flux + .fromStream(pagedIterable.streamByPage().map(getPageMapper(mapper))))); this.pagedIterable = pagedIterable; this.mapper = mapper; this.pageMapper = getPageMapper(mapper); } private static Function, PagedResponse> getPageMapper(Function mapper) { - return page -> - new PagedResponseBase( - page.getRequest(), - page.getStatusCode(), - page.getHeaders(), - page.getElements().stream().map(mapper).collect(Collectors.toList()), - page.getContinuationToken(), - null); + return page -> new PagedResponseBase(page.getRequest(), page.getStatusCode(), page.getHeaders(), + page.getElements().stream().map(mapper).collect(Collectors.toList()), page.getContinuationToken(), + null); } @Override @@ -133,30 +129,27 @@ public Stream> streamByPage(String continuationToken, int prefe @Override public Iterator iterator() { - return new IteratorImpl(pagedIterable.iterator(), mapper); + return new IteratorImpl<>(pagedIterable.iterator(), mapper); } @Override public Iterable> iterableByPage() { - return new IterableImpl, PagedResponse>(pagedIterable.iterableByPage(), pageMapper); + return new IterableImpl<>(pagedIterable.iterableByPage(), pageMapper); } @Override public Iterable> iterableByPage(String continuationToken) { - return new IterableImpl, PagedResponse>( - pagedIterable.iterableByPage(continuationToken), pageMapper); + return new IterableImpl<>(pagedIterable.iterableByPage(continuationToken), pageMapper); } @Override public Iterable> iterableByPage(int preferredPageSize) { - return new IterableImpl, PagedResponse>( - pagedIterable.iterableByPage(preferredPageSize), pageMapper); + return new IterableImpl<>(pagedIterable.iterableByPage(preferredPageSize), pageMapper); } @Override public Iterable> iterableByPage(String continuationToken, int preferredPageSize) { - return new IterableImpl, PagedResponse>( - pagedIterable.iterableByPage(continuationToken, preferredPageSize), pageMapper); + return new IterableImpl<>(pagedIterable.iterableByPage(continuationToken, preferredPageSize), pageMapper); } } @@ -198,7 +191,7 @@ private IterableImpl(Iterable iterable, Function mapper) { @Override public Iterator iterator() { - return new IteratorImpl(iterable.iterator(), mapper); + return new IteratorImpl<>(iterable.iterator(), mapper); } } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/ScriptCmdletImpl.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/ScriptCmdletImpl.java index f43ea792a3e81..5f05cd19ffd68 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/ScriptCmdletImpl.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/ScriptCmdletImpl.java @@ -4,8 +4,11 @@ package com.azure.resourcemanager.avs.implementation; +import com.azure.core.management.SystemData; import com.azure.resourcemanager.avs.fluent.models.ScriptCmdletInner; import com.azure.resourcemanager.avs.models.ScriptCmdlet; +import com.azure.resourcemanager.avs.models.ScriptCmdletAudience; +import com.azure.resourcemanager.avs.models.ScriptCmdletProvisioningState; import com.azure.resourcemanager.avs.models.ScriptParameter; import java.util.Collections; import java.util.List; @@ -32,6 +35,14 @@ public String type() { return this.innerModel().type(); } + public SystemData systemData() { + return this.innerModel().systemData(); + } + + public ScriptCmdletProvisioningState provisioningState() { + return this.innerModel().provisioningState(); + } + public String description() { return this.innerModel().description(); } @@ -40,6 +51,10 @@ public String timeout() { return this.innerModel().timeout(); } + public ScriptCmdletAudience audience() { + return this.innerModel().audience(); + } + public List parameters() { List inner = this.innerModel().parameters(); if (inner != null) { diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/ScriptCmdletsClientImpl.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/ScriptCmdletsClientImpl.java index 81f3817baf279..34c5ad616f7b9 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/ScriptCmdletsClientImpl.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/ScriptCmdletsClientImpl.java @@ -27,25 +27,31 @@ import com.azure.core.util.FluxUtil; import com.azure.resourcemanager.avs.fluent.ScriptCmdletsClient; import com.azure.resourcemanager.avs.fluent.models.ScriptCmdletInner; -import com.azure.resourcemanager.avs.models.ScriptCmdletsList; +import com.azure.resourcemanager.avs.models.ScriptCmdletListResult; import reactor.core.publisher.Mono; -/** An instance of this class provides access to all the operations defined in ScriptCmdletsClient. */ +/** + * An instance of this class provides access to all the operations defined in ScriptCmdletsClient. + */ public final class ScriptCmdletsClientImpl implements ScriptCmdletsClient { - /** The proxy service used to perform REST calls. */ + /** + * The proxy service used to perform REST calls. + */ private final ScriptCmdletsService service; - /** The service client containing this operation class. */ + /** + * The service client containing this operation class. + */ private final AvsClientImpl client; /** * Initializes an instance of ScriptCmdletsClientImpl. - * + * * @param client the instance of the service client containing this operation class. */ ScriptCmdletsClientImpl(AvsClientImpl client) { - this.service = - RestProxy.create(ScriptCmdletsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.service + = RestProxy.create(ScriptCmdletsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } @@ -56,75 +62,59 @@ public final class ScriptCmdletsClientImpl implements ScriptCmdletsClient { @Host("{$host}") @ServiceInterface(name = "AvsClientScriptCmdle") public interface ScriptCmdletsService { - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/scriptPackages/{scriptPackageName}/scriptCmdlets") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/scriptPackages/{scriptPackageName}/scriptCmdlets") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono> list(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("privateCloudName") String privateCloudName, - @QueryParam("api-version") String apiVersion, - @PathParam("scriptPackageName") String scriptPackageName, - @HeaderParam("Accept") String accept, + @PathParam("scriptPackageName") String scriptPackageName, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/scriptPackages/{scriptPackageName}/scriptCmdlets/{scriptCmdletName}") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/scriptPackages/{scriptPackageName}/scriptCmdlets/{scriptCmdletName}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono> get(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("privateCloudName") String privateCloudName, @PathParam("scriptPackageName") String scriptPackageName, - @PathParam("scriptCmdletName") String scriptCmdletName, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, + @PathParam("scriptCmdletName") String scriptCmdletName, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + Mono> listNext(@PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); } /** - * List script cmdlet resources available for a private cloud to create a script execution resource on a private - * cloud. - * + * List ScriptCmdlet resources by ScriptPackage. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param scriptPackageName Name of the script package in the private cloud. + * @param scriptPackageName Name of the script package. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return pageable list of scripts/cmdlets along with {@link PagedResponse} on successful completion of {@link - * Mono}. + * @return the response of a ScriptCmdlet list operation along with {@link PagedResponse} on successful completion + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync( - String resourceGroupName, String privateCloudName, String scriptPackageName) { + private Mono> listSinglePageAsync(String resourceGroupName, + String privateCloudName, String scriptPackageName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -139,59 +129,36 @@ private Mono> listSinglePageAsync( .error(new IllegalArgumentException("Parameter scriptPackageName is required and cannot be null.")); } final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .list( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - privateCloudName, - this.client.getApiVersion(), - scriptPackageName, - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + return FluxUtil.withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, scriptPackageName, 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 script cmdlet resources available for a private cloud to create a script execution resource on a private - * cloud. - * + * List ScriptCmdlet resources by ScriptPackage. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param scriptPackageName Name of the script package in the private cloud. + * @param scriptPackageName Name of the script package. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return pageable list of scripts/cmdlets along with {@link PagedResponse} on successful completion of {@link - * Mono}. + * @return the response of a ScriptCmdlet list operation along with {@link PagedResponse} on successful completion + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync( - String resourceGroupName, String privateCloudName, String scriptPackageName, Context context) { + private Mono> listSinglePageAsync(String resourceGroupName, + String privateCloudName, String scriptPackageName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -208,131 +175,107 @@ private Mono> listSinglePageAsync( final String accept = "application/json"; context = this.client.mergeContext(context); return service - .list( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - privateCloudName, - this.client.getApiVersion(), - scriptPackageName, - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + .list(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, privateCloudName, scriptPackageName, accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** - * List script cmdlet resources available for a private cloud to create a script execution resource on a private - * cloud. - * + * List ScriptCmdlet resources by ScriptPackage. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param scriptPackageName Name of the script package in the private cloud. + * @param scriptPackageName Name of the script package. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return pageable list of scripts/cmdlets as paginated response with {@link PagedFlux}. + * @return the response of a ScriptCmdlet list operation as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync( - String resourceGroupName, String privateCloudName, String scriptPackageName) { - return new PagedFlux<>( - () -> listSinglePageAsync(resourceGroupName, privateCloudName, scriptPackageName), + private PagedFlux listAsync(String resourceGroupName, String privateCloudName, + String scriptPackageName) { + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, privateCloudName, scriptPackageName), nextLink -> listNextSinglePageAsync(nextLink)); } /** - * List script cmdlet resources available for a private cloud to create a script execution resource on a private - * cloud. - * + * List ScriptCmdlet resources by ScriptPackage. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param scriptPackageName Name of the script package in the private cloud. + * @param scriptPackageName Name of the script package. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return pageable list of scripts/cmdlets as paginated response with {@link PagedFlux}. + * @return the response of a ScriptCmdlet list operation as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync( - String resourceGroupName, String privateCloudName, String scriptPackageName, Context context) { + private PagedFlux listAsync(String resourceGroupName, String privateCloudName, + String scriptPackageName, Context context) { return new PagedFlux<>( () -> listSinglePageAsync(resourceGroupName, privateCloudName, scriptPackageName, context), nextLink -> listNextSinglePageAsync(nextLink, context)); } /** - * List script cmdlet resources available for a private cloud to create a script execution resource on a private - * cloud. - * + * List ScriptCmdlet resources by ScriptPackage. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param scriptPackageName Name of the script package in the private cloud. + * @param scriptPackageName Name of the script package. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return pageable list of scripts/cmdlets as paginated response with {@link PagedIterable}. + * @return the response of a ScriptCmdlet list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list( - String resourceGroupName, String privateCloudName, String scriptPackageName) { + public PagedIterable list(String resourceGroupName, String privateCloudName, + String scriptPackageName) { return new PagedIterable<>(listAsync(resourceGroupName, privateCloudName, scriptPackageName)); } /** - * List script cmdlet resources available for a private cloud to create a script execution resource on a private - * cloud. - * + * List ScriptCmdlet resources by ScriptPackage. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param scriptPackageName Name of the script package in the private cloud. + * @param scriptPackageName Name of the script package. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return pageable list of scripts/cmdlets as paginated response with {@link PagedIterable}. + * @return the response of a ScriptCmdlet list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list( - String resourceGroupName, String privateCloudName, String scriptPackageName, Context context) { + public PagedIterable list(String resourceGroupName, String privateCloudName, + String scriptPackageName, Context context) { return new PagedIterable<>(listAsync(resourceGroupName, privateCloudName, scriptPackageName, context)); } /** - * Return information about a script cmdlet resource in a specific package on a private cloud. - * + * Get a ScriptCmdlet. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param scriptPackageName Name of the script package in the private cloud. - * @param scriptCmdletName Name of the script cmdlet resource in the script package in the private cloud. + * @param scriptPackageName Name of the script package. + * @param scriptCmdletName Name of the script cmdlet. * @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 cmdlet available for script execution along with {@link Response} on successful completion of {@link - * Mono}. + * @return a ScriptCmdlet along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String privateCloudName, String scriptPackageName, String scriptCmdletName) { + private Mono> getWithResponseAsync(String resourceGroupName, String privateCloudName, + String scriptPackageName, String scriptCmdletName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -352,54 +295,35 @@ private Mono> getWithResponseAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .get( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - privateCloudName, - scriptPackageName, - scriptCmdletName, - this.client.getApiVersion(), - accept, - context)) + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, scriptPackageName, + scriptCmdletName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Return information about a script cmdlet resource in a specific package on a private cloud. - * + * Get a ScriptCmdlet. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param scriptPackageName Name of the script package in the private cloud. - * @param scriptCmdletName Name of the script cmdlet resource in the script package in the private cloud. + * @param scriptPackageName Name of the script package. + * @param scriptCmdletName Name of the script cmdlet. * @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 a cmdlet available for script execution along with {@link Response} on successful completion of {@link - * Mono}. + * @return a ScriptCmdlet along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, - String privateCloudName, - String scriptPackageName, - String scriptCmdletName, - Context context) { + private Mono> getWithResponseAsync(String resourceGroupName, String privateCloudName, + String scriptPackageName, String scriptCmdletName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -419,91 +343,79 @@ private Mono> getWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .get( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - privateCloudName, - scriptPackageName, - scriptCmdletName, - this.client.getApiVersion(), - accept, - context); + return service.get(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, privateCloudName, scriptPackageName, scriptCmdletName, accept, context); } /** - * Return information about a script cmdlet resource in a specific package on a private cloud. - * + * Get a ScriptCmdlet. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param scriptPackageName Name of the script package in the private cloud. - * @param scriptCmdletName Name of the script cmdlet resource in the script package in the private cloud. + * @param scriptPackageName Name of the script package. + * @param scriptCmdletName Name of the script cmdlet. * @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 cmdlet available for script execution on successful completion of {@link Mono}. + * @return a ScriptCmdlet on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync( - String resourceGroupName, String privateCloudName, String scriptPackageName, String scriptCmdletName) { + private Mono getAsync(String resourceGroupName, String privateCloudName, + String scriptPackageName, String scriptCmdletName) { return getWithResponseAsync(resourceGroupName, privateCloudName, scriptPackageName, scriptCmdletName) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** - * Return information about a script cmdlet resource in a specific package on a private cloud. - * + * Get a ScriptCmdlet. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param scriptPackageName Name of the script package in the private cloud. - * @param scriptCmdletName Name of the script cmdlet resource in the script package in the private cloud. + * @param scriptPackageName Name of the script package. + * @param scriptCmdletName Name of the script cmdlet. * @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 a cmdlet available for script execution along with {@link Response}. + * @return a ScriptCmdlet along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, - String privateCloudName, - String scriptPackageName, - String scriptCmdletName, - Context context) { + public Response getWithResponse(String resourceGroupName, String privateCloudName, + String scriptPackageName, String scriptCmdletName, Context context) { return getWithResponseAsync(resourceGroupName, privateCloudName, scriptPackageName, scriptCmdletName, context) .block(); } /** - * Return information about a script cmdlet resource in a specific package on a private cloud. - * + * Get a ScriptCmdlet. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param scriptPackageName Name of the script package in the private cloud. - * @param scriptCmdletName Name of the script cmdlet resource in the script package in the private cloud. + * @param scriptPackageName Name of the script package. + * @param scriptCmdletName Name of the script cmdlet. * @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 cmdlet available for script execution. + * @return a ScriptCmdlet. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ScriptCmdletInner get( - String resourceGroupName, String privateCloudName, String scriptPackageName, String scriptCmdletName) { + public ScriptCmdletInner get(String resourceGroupName, String privateCloudName, String scriptPackageName, + String scriptCmdletName) { return getWithResponse(resourceGroupName, privateCloudName, scriptPackageName, scriptCmdletName, Context.NONE) .getValue(); } /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * The nextLink parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return pageable list of scripts/cmdlets along with {@link PagedResponse} on successful completion of {@link - * Mono}. + * @return the response of a ScriptCmdlet list operation along with {@link PagedResponse} on successful completion + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink) { @@ -511,37 +423,28 @@ private Mono> listNextSinglePageAsync(String ne 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.")); + 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.listNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + return FluxUtil.withContext(context -> service.listNext(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 URL to get the next list of items - *

The nextLink parameter. + * + * The nextLink parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return pageable list of scripts/cmdlets along with {@link PagedResponse} on successful completion of {@link - * Mono}. + * @return the response of a ScriptCmdlet list operation along with {@link PagedResponse} on successful completion + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink, Context context) { @@ -549,23 +452,13 @@ private Mono> listNextSinglePageAsync(String ne 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.")); + 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 - .listNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.listNext(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/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/ScriptCmdletsImpl.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/ScriptCmdletsImpl.java index a1eacd0bb7dc0..b3c431574dc60 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/ScriptCmdletsImpl.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/ScriptCmdletsImpl.java @@ -26,45 +26,36 @@ public ScriptCmdletsImpl(ScriptCmdletsClient innerClient, com.azure.resourcemana this.serviceManager = serviceManager; } - public PagedIterable list( - String resourceGroupName, String privateCloudName, String scriptPackageName) { - PagedIterable inner = - this.serviceClient().list(resourceGroupName, privateCloudName, scriptPackageName); - return Utils.mapPage(inner, inner1 -> new ScriptCmdletImpl(inner1, this.manager())); + public PagedIterable list(String resourceGroupName, String privateCloudName, + String scriptPackageName) { + PagedIterable inner + = this.serviceClient().list(resourceGroupName, privateCloudName, scriptPackageName); + return ResourceManagerUtils.mapPage(inner, inner1 -> new ScriptCmdletImpl(inner1, this.manager())); } - public PagedIterable list( - String resourceGroupName, String privateCloudName, String scriptPackageName, Context context) { - PagedIterable inner = - this.serviceClient().list(resourceGroupName, privateCloudName, scriptPackageName, context); - return Utils.mapPage(inner, inner1 -> new ScriptCmdletImpl(inner1, this.manager())); + public PagedIterable list(String resourceGroupName, String privateCloudName, String scriptPackageName, + Context context) { + PagedIterable inner + = this.serviceClient().list(resourceGroupName, privateCloudName, scriptPackageName, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new ScriptCmdletImpl(inner1, this.manager())); } - public Response getWithResponse( - String resourceGroupName, - String privateCloudName, - String scriptPackageName, - String scriptCmdletName, - Context context) { - Response inner = - this - .serviceClient() - .getWithResponse(resourceGroupName, privateCloudName, scriptPackageName, scriptCmdletName, context); + public Response getWithResponse(String resourceGroupName, String privateCloudName, + String scriptPackageName, String scriptCmdletName, Context context) { + Response inner = this.serviceClient().getWithResponse(resourceGroupName, privateCloudName, + scriptPackageName, scriptCmdletName, context); if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), new ScriptCmdletImpl(inner.getValue(), this.manager())); } else { return null; } } - public ScriptCmdlet get( - String resourceGroupName, String privateCloudName, String scriptPackageName, String scriptCmdletName) { - ScriptCmdletInner inner = - this.serviceClient().get(resourceGroupName, privateCloudName, scriptPackageName, scriptCmdletName); + public ScriptCmdlet get(String resourceGroupName, String privateCloudName, String scriptPackageName, + String scriptCmdletName) { + ScriptCmdletInner inner + = this.serviceClient().get(resourceGroupName, privateCloudName, scriptPackageName, scriptCmdletName); if (inner != null) { return new ScriptCmdletImpl(inner, this.manager()); } else { diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/ScriptExecutionImpl.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/ScriptExecutionImpl.java index ee4225884020a..56a9ab9fdeb71 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/ScriptExecutionImpl.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/ScriptExecutionImpl.java @@ -5,6 +5,7 @@ package com.azure.resourcemanager.avs.implementation; import com.azure.core.http.rest.Response; +import com.azure.core.management.SystemData; import com.azure.core.util.Context; import com.azure.resourcemanager.avs.fluent.models.ScriptExecutionInner; import com.azure.resourcemanager.avs.models.ScriptExecution; @@ -33,6 +34,10 @@ public String type() { return this.innerModel().type(); } + public SystemData systemData() { + return this.innerModel().systemData(); + } + public String scriptCmdletId() { return this.innerModel().scriptCmdletId(); } @@ -153,21 +158,14 @@ public ScriptExecutionImpl withExistingPrivateCloud(String resourceGroupName, St } public ScriptExecution create() { - this.innerObject = - serviceManager - .serviceClient() - .getScriptExecutions() - .createOrUpdate( - resourceGroupName, privateCloudName, scriptExecutionName, this.innerModel(), Context.NONE); + this.innerObject = serviceManager.serviceClient().getScriptExecutions().createOrUpdate(resourceGroupName, + privateCloudName, scriptExecutionName, this.innerModel(), Context.NONE); return this; } public ScriptExecution create(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getScriptExecutions() - .createOrUpdate(resourceGroupName, privateCloudName, scriptExecutionName, this.innerModel(), context); + this.innerObject = serviceManager.serviceClient().getScriptExecutions().createOrUpdate(resourceGroupName, + privateCloudName, scriptExecutionName, this.innerModel(), context); return this; } @@ -182,64 +180,46 @@ public ScriptExecutionImpl update() { } public ScriptExecution apply() { - this.innerObject = - serviceManager - .serviceClient() - .getScriptExecutions() - .createOrUpdate( - resourceGroupName, privateCloudName, scriptExecutionName, this.innerModel(), Context.NONE); + this.innerObject = serviceManager.serviceClient().getScriptExecutions().createOrUpdate(resourceGroupName, + privateCloudName, scriptExecutionName, this.innerModel(), Context.NONE); return this; } public ScriptExecution apply(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getScriptExecutions() - .createOrUpdate(resourceGroupName, privateCloudName, scriptExecutionName, this.innerModel(), context); + this.innerObject = serviceManager.serviceClient().getScriptExecutions().createOrUpdate(resourceGroupName, + privateCloudName, scriptExecutionName, this.innerModel(), context); return this; } ScriptExecutionImpl(ScriptExecutionInner innerObject, com.azure.resourcemanager.avs.AvsManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; - this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups"); - this.privateCloudName = Utils.getValueFromIdByName(innerObject.id(), "privateClouds"); - this.scriptExecutionName = Utils.getValueFromIdByName(innerObject.id(), "scriptExecutions"); + this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); + this.privateCloudName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "privateClouds"); + this.scriptExecutionName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "scriptExecutions"); } public ScriptExecution refresh() { - this.innerObject = - serviceManager - .serviceClient() - .getScriptExecutions() - .getWithResponse(resourceGroupName, privateCloudName, scriptExecutionName, Context.NONE) - .getValue(); + this.innerObject = serviceManager.serviceClient().getScriptExecutions() + .getWithResponse(resourceGroupName, privateCloudName, scriptExecutionName, Context.NONE).getValue(); return this; } public ScriptExecution refresh(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getScriptExecutions() - .getWithResponse(resourceGroupName, privateCloudName, scriptExecutionName, context) - .getValue(); + this.innerObject = serviceManager.serviceClient().getScriptExecutions() + .getWithResponse(resourceGroupName, privateCloudName, scriptExecutionName, context).getValue(); return this; } - public Response getExecutionLogsWithResponse( - List scriptOutputStreamType, Context context) { - return serviceManager - .scriptExecutions() - .getExecutionLogsWithResponse( - resourceGroupName, privateCloudName, scriptExecutionName, scriptOutputStreamType, context); + public Response getExecutionLogsWithResponse(List scriptOutputStreamType, + Context context) { + return serviceManager.scriptExecutions().getExecutionLogsWithResponse(resourceGroupName, privateCloudName, + scriptExecutionName, scriptOutputStreamType, context); } public ScriptExecution getExecutionLogs() { - return serviceManager - .scriptExecutions() - .getExecutionLogs(resourceGroupName, privateCloudName, scriptExecutionName); + return serviceManager.scriptExecutions().getExecutionLogs(resourceGroupName, privateCloudName, + scriptExecutionName); } public ScriptExecutionImpl withScriptCmdletId(String scriptCmdletId) { diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/ScriptExecutionsClientImpl.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/ScriptExecutionsClientImpl.java index b38baa50f3049..47e31f289f0bb 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/ScriptExecutionsClientImpl.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/ScriptExecutionsClientImpl.java @@ -34,29 +34,35 @@ import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.avs.fluent.ScriptExecutionsClient; import com.azure.resourcemanager.avs.fluent.models.ScriptExecutionInner; -import com.azure.resourcemanager.avs.models.ScriptExecutionsList; +import com.azure.resourcemanager.avs.models.ScriptExecutionListResult; import com.azure.resourcemanager.avs.models.ScriptOutputStreamType; import java.nio.ByteBuffer; import java.util.List; import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; -/** An instance of this class provides access to all the operations defined in ScriptExecutionsClient. */ +/** + * An instance of this class provides access to all the operations defined in ScriptExecutionsClient. + */ public final class ScriptExecutionsClientImpl implements ScriptExecutionsClient { - /** The proxy service used to perform REST calls. */ + /** + * The proxy service used to perform REST calls. + */ private final ScriptExecutionsService service; - /** The service client containing this operation class. */ + /** + * The service client containing this operation class. + */ private final AvsClientImpl client; /** * Initializes an instance of ScriptExecutionsClientImpl. - * + * * @param client the instance of the service client containing this operation class. */ ScriptExecutionsClientImpl(AvsClientImpl client) { - this.service = - RestProxy.create(ScriptExecutionsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.service + = RestProxy.create(ScriptExecutionsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } @@ -67,118 +73,92 @@ public final class ScriptExecutionsClientImpl implements ScriptExecutionsClient @Host("{$host}") @ServiceInterface(name = "AvsClientScriptExecu") public interface ScriptExecutionsService { - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/scriptExecutions") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/scriptExecutions") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono> list(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("privateCloudName") String privateCloudName, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, + @PathParam("privateCloudName") String privateCloudName, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/scriptExecutions/{scriptExecutionName}") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/scriptExecutions/{scriptExecutionName}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono> get(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("privateCloudName") String privateCloudName, - @PathParam("scriptExecutionName") String scriptExecutionName, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, + @PathParam("scriptExecutionName") String scriptExecutionName, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/scriptExecutions/{scriptExecutionName}") - @ExpectedResponses({200, 201}) + @Headers({ "Content-Type: application/json" }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/scriptExecutions/{scriptExecutionName}") + @ExpectedResponses({ 200, 201 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createOrUpdate( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono>> createOrUpdate(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("privateCloudName") String privateCloudName, @PathParam("scriptExecutionName") String scriptExecutionName, - @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") ScriptExecutionInner scriptExecution, - @HeaderParam("Accept") String accept, + @BodyParam("application/json") ScriptExecutionInner scriptExecution, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Delete( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/scriptExecutions/{scriptExecutionName}") - @ExpectedResponses({200, 202, 204}) + @Headers({ "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/scriptExecutions/{scriptExecutionName}") + @ExpectedResponses({ 200, 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono>> delete(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("privateCloudName") String privateCloudName, - @PathParam("scriptExecutionName") String scriptExecutionName, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, + @PathParam("scriptExecutionName") String scriptExecutionName, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/scriptExecutions/{scriptExecutionName}/getExecutionLogs") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/scriptExecutions/{scriptExecutionName}/getExecutionLogs") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> getExecutionLogs( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono> getExecutionLogs(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("privateCloudName") String privateCloudName, @PathParam("scriptExecutionName") String scriptExecutionName, - @QueryParam("api-version") String apiVersion, @BodyParam("application/json") List scriptOutputStreamType, - @HeaderParam("Accept") String accept, - Context context); + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + Mono> listNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); } /** - * List script executions in a private cloud. - * + * List ScriptExecution resources by PrivateCloud. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return pageable list of script executions along with {@link PagedResponse} on successful completion of {@link - * Mono}. + * @return the response of a ScriptExecution list operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync( - String resourceGroupName, String privateCloudName) { + private Mono> listSinglePageAsync(String resourceGroupName, + String privateCloudName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -190,55 +170,35 @@ private Mono> listSinglePageAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .list( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - privateCloudName, - this.client.getApiVersion(), - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, 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 script executions in a private cloud. - * + * List ScriptExecution resources by PrivateCloud. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return pageable list of script executions along with {@link PagedResponse} on successful completion of {@link - * Mono}. + * @return the response of a ScriptExecution list operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync( - String resourceGroupName, String privateCloudName, Context context) { + private Mono> listSinglePageAsync(String resourceGroupName, + String privateCloudName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -251,70 +211,55 @@ private Mono> listSinglePageAsync( final String accept = "application/json"; context = this.client.mergeContext(context); return service - .list( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - privateCloudName, - this.client.getApiVersion(), - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + .list(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, privateCloudName, accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** - * List script executions in a private cloud. - * + * List ScriptExecution resources by PrivateCloud. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return pageable list of script executions as paginated response with {@link PagedFlux}. + * @return the response of a ScriptExecution list operation as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(String resourceGroupName, String privateCloudName) { - return new PagedFlux<>( - () -> listSinglePageAsync(resourceGroupName, privateCloudName), + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, privateCloudName), nextLink -> listNextSinglePageAsync(nextLink)); } /** - * List script executions in a private cloud. - * + * List ScriptExecution resources by PrivateCloud. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return pageable list of script executions as paginated response with {@link PagedFlux}. + * @return the response of a ScriptExecution list operation as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync( - String resourceGroupName, String privateCloudName, Context context) { - return new PagedFlux<>( - () -> listSinglePageAsync(resourceGroupName, privateCloudName, context), + private PagedFlux listAsync(String resourceGroupName, String privateCloudName, + Context context) { + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, privateCloudName, context), nextLink -> listNextSinglePageAsync(nextLink, context)); } /** - * List script executions in a private cloud. - * + * List ScriptExecution resources by PrivateCloud. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return pageable list of script executions as paginated response with {@link PagedIterable}. + * @return the response of a ScriptExecution list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(String resourceGroupName, String privateCloudName) { @@ -322,48 +267,43 @@ public PagedIterable list(String resourceGroupName, String } /** - * List script executions in a private cloud. - * + * List ScriptExecution resources by PrivateCloud. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return pageable list of script executions as paginated response with {@link PagedIterable}. + * @return the response of a ScriptExecution list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list( - String resourceGroupName, String privateCloudName, Context context) { + public PagedIterable list(String resourceGroupName, String privateCloudName, + Context context) { return new PagedIterable<>(listAsync(resourceGroupName, privateCloudName, context)); } /** - * Get an script execution by name in a private cloud. - * + * Get a ScriptExecution. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param scriptExecutionName Name of the user-invoked script execution resource. + * @param scriptExecutionName Name of the script cmdlet. * @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 an script execution by name in a private cloud along with {@link Response} on successful completion of - * {@link Mono}. + * @return a ScriptExecution along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String privateCloudName, String scriptExecutionName) { + private Mono> getWithResponseAsync(String resourceGroupName, String privateCloudName, + String scriptExecutionName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -378,49 +318,33 @@ private Mono> getWithResponseAsync( .error(new IllegalArgumentException("Parameter scriptExecutionName is required and cannot be null.")); } final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .get( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - privateCloudName, - scriptExecutionName, - this.client.getApiVersion(), - accept, - context)) + return FluxUtil.withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, scriptExecutionName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Get an script execution by name in a private cloud. - * + * Get a ScriptExecution. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param scriptExecutionName Name of the user-invoked script execution resource. + * @param scriptExecutionName Name of the script cmdlet. * @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 an script execution by name in a private cloud along with {@link Response} on successful completion of - * {@link Mono}. + * @return a ScriptExecution along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String privateCloudName, String scriptExecutionName, Context context) { + private Mono> getWithResponseAsync(String resourceGroupName, String privateCloudName, + String scriptExecutionName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -436,64 +360,56 @@ private Mono> getWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .get( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - privateCloudName, - scriptExecutionName, - this.client.getApiVersion(), - accept, - context); + return service.get(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, privateCloudName, scriptExecutionName, accept, context); } /** - * Get an script execution by name in a private cloud. - * + * Get a ScriptExecution. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param scriptExecutionName Name of the user-invoked script execution resource. + * @param scriptExecutionName Name of the script cmdlet. * @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 an script execution by name in a private cloud on successful completion of {@link Mono}. + * @return a ScriptExecution on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync( - String resourceGroupName, String privateCloudName, String scriptExecutionName) { + private Mono getAsync(String resourceGroupName, String privateCloudName, + String scriptExecutionName) { return getWithResponseAsync(resourceGroupName, privateCloudName, scriptExecutionName) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** - * Get an script execution by name in a private cloud. - * + * Get a ScriptExecution. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param scriptExecutionName Name of the user-invoked script execution resource. + * @param scriptExecutionName Name of the script cmdlet. * @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 an script execution by name in a private cloud along with {@link Response}. + * @return a ScriptExecution along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, String privateCloudName, String scriptExecutionName, Context context) { + public Response getWithResponse(String resourceGroupName, String privateCloudName, + String scriptExecutionName, Context context) { return getWithResponseAsync(resourceGroupName, privateCloudName, scriptExecutionName, context).block(); } /** - * Get an script execution by name in a private cloud. - * + * Get a ScriptExecution. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param scriptExecutionName Name of the user-invoked script execution resource. + * @param scriptExecutionName Name of the script cmdlet. * @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 an script execution by name in a private cloud. + * @return a ScriptExecution. */ @ServiceMethod(returns = ReturnType.SINGLE) public ScriptExecutionInner get(String resourceGroupName, String privateCloudName, String scriptExecutionName) { @@ -501,35 +417,28 @@ public ScriptExecutionInner get(String resourceGroupName, String privateCloudNam } /** - * Create or update a script execution in a private cloud. - * + * Create a ScriptExecution. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName The name of the private cloud. - * @param scriptExecutionName Name of the user-invoked script execution resource. - * @param scriptExecution A script running in the private cloud. + * @param privateCloudName Name of the private cloud. + * @param scriptExecutionName Name of the script cmdlet. + * @param scriptExecution Resource create parameters. * @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 an instance of a script executed by a user - custom or AVS along with {@link Response} on successful - * completion of {@link Mono}. + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync( - String resourceGroupName, - String privateCloudName, - String scriptExecutionName, - ScriptExecutionInner scriptExecution) { + private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String privateCloudName, String scriptExecutionName, ScriptExecutionInner scriptExecution) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -551,54 +460,36 @@ private Mono>> createOrUpdateWithResponseAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .createOrUpdate( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - privateCloudName, - scriptExecutionName, - this.client.getApiVersion(), - scriptExecution, - accept, - context)) + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, scriptExecutionName, + scriptExecution, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Create or update a script execution in a private cloud. - * + * Create a ScriptExecution. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName The name of the private cloud. - * @param scriptExecutionName Name of the user-invoked script execution resource. - * @param scriptExecution A script running in the private cloud. + * @param privateCloudName Name of the private cloud. + * @param scriptExecutionName Name of the script cmdlet. + * @param scriptExecution Resource create parameters. * @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 an instance of a script executed by a user - custom or AVS along with {@link Response} on successful - * completion of {@link Mono}. + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync( - String resourceGroupName, - String privateCloudName, - String scriptExecutionName, - ScriptExecutionInner scriptExecution, - Context context) { + private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String privateCloudName, String scriptExecutionName, ScriptExecutionInner scriptExecution, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -620,26 +511,18 @@ private Mono>> createOrUpdateWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .createOrUpdate( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - privateCloudName, - scriptExecutionName, - this.client.getApiVersion(), - scriptExecution, - accept, - context); + return service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, scriptExecutionName, scriptExecution, + accept, context); } /** - * Create or update a script execution in a private cloud. - * + * Create a ScriptExecution. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName The name of the private cloud. - * @param scriptExecutionName Name of the user-invoked script execution resource. - * @param scriptExecution A script running in the private cloud. + * @param privateCloudName Name of the private cloud. + * @param scriptExecutionName Name of the script cmdlet. + * @param scriptExecution Resource create parameters. * @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. @@ -647,29 +530,21 @@ private Mono>> createOrUpdateWithResponseAsync( */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, ScriptExecutionInner> beginCreateOrUpdateAsync( - String resourceGroupName, - String privateCloudName, - String scriptExecutionName, + String resourceGroupName, String privateCloudName, String scriptExecutionName, ScriptExecutionInner scriptExecution) { - Mono>> mono = - createOrUpdateWithResponseAsync(resourceGroupName, privateCloudName, scriptExecutionName, scriptExecution); - return this - .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - ScriptExecutionInner.class, - ScriptExecutionInner.class, - this.client.getContext()); + Mono>> mono = createOrUpdateWithResponseAsync(resourceGroupName, privateCloudName, + scriptExecutionName, scriptExecution); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + ScriptExecutionInner.class, ScriptExecutionInner.class, this.client.getContext()); } /** - * Create or update a script execution in a private cloud. - * + * Create a ScriptExecution. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName The name of the private cloud. - * @param scriptExecutionName Name of the user-invoked script execution resource. - * @param scriptExecution A script running in the private cloud. + * @param privateCloudName Name of the private cloud. + * @param scriptExecutionName Name of the script cmdlet. + * @param scriptExecution Resource create parameters. * @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. @@ -678,28 +553,22 @@ private PollerFlux, ScriptExecutionInner> begin */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, ScriptExecutionInner> beginCreateOrUpdateAsync( - String resourceGroupName, - String privateCloudName, - String scriptExecutionName, - ScriptExecutionInner scriptExecution, - Context context) { + String resourceGroupName, String privateCloudName, String scriptExecutionName, + ScriptExecutionInner scriptExecution, Context context) { context = this.client.mergeContext(context); - Mono>> mono = - createOrUpdateWithResponseAsync( - resourceGroupName, privateCloudName, scriptExecutionName, scriptExecution, context); - return this - .client - .getLroResult( - mono, this.client.getHttpPipeline(), ScriptExecutionInner.class, ScriptExecutionInner.class, context); + Mono>> mono = createOrUpdateWithResponseAsync(resourceGroupName, privateCloudName, + scriptExecutionName, scriptExecution, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + ScriptExecutionInner.class, ScriptExecutionInner.class, context); } /** - * Create or update a script execution in a private cloud. - * + * Create a ScriptExecution. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName The name of the private cloud. - * @param scriptExecutionName Name of the user-invoked script execution resource. - * @param scriptExecution A script running in the private cloud. + * @param privateCloudName Name of the private cloud. + * @param scriptExecutionName Name of the script cmdlet. + * @param scriptExecution Resource create parameters. * @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. @@ -707,22 +576,19 @@ private PollerFlux, ScriptExecutionInner> begin */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, ScriptExecutionInner> beginCreateOrUpdate( - String resourceGroupName, - String privateCloudName, - String scriptExecutionName, + String resourceGroupName, String privateCloudName, String scriptExecutionName, ScriptExecutionInner scriptExecution) { - return this - .beginCreateOrUpdateAsync(resourceGroupName, privateCloudName, scriptExecutionName, scriptExecution) + return this.beginCreateOrUpdateAsync(resourceGroupName, privateCloudName, scriptExecutionName, scriptExecution) .getSyncPoller(); } /** - * Create or update a script execution in a private cloud. - * + * Create a ScriptExecution. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName The name of the private cloud. - * @param scriptExecutionName Name of the user-invoked script execution resource. - * @param scriptExecution A script running in the private cloud. + * @param privateCloudName Name of the private cloud. + * @param scriptExecutionName Name of the script cmdlet. + * @param scriptExecution Resource create parameters. * @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. @@ -731,47 +597,38 @@ public SyncPoller, ScriptExecutionInner> beginC */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, ScriptExecutionInner> beginCreateOrUpdate( - String resourceGroupName, - String privateCloudName, - String scriptExecutionName, - ScriptExecutionInner scriptExecution, - Context context) { - return this - .beginCreateOrUpdateAsync( - resourceGroupName, privateCloudName, scriptExecutionName, scriptExecution, context) - .getSyncPoller(); + String resourceGroupName, String privateCloudName, String scriptExecutionName, + ScriptExecutionInner scriptExecution, Context context) { + return this.beginCreateOrUpdateAsync(resourceGroupName, privateCloudName, scriptExecutionName, scriptExecution, + context).getSyncPoller(); } /** - * Create or update a script execution in a private cloud. - * + * Create a ScriptExecution. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName The name of the private cloud. - * @param scriptExecutionName Name of the user-invoked script execution resource. - * @param scriptExecution A script running in the private cloud. + * @param privateCloudName Name of the private cloud. + * @param scriptExecutionName Name of the script cmdlet. + * @param scriptExecution Resource create parameters. * @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 an instance of a script executed by a user - custom or AVS on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync( - String resourceGroupName, - String privateCloudName, - String scriptExecutionName, - ScriptExecutionInner scriptExecution) { + private Mono createOrUpdateAsync(String resourceGroupName, String privateCloudName, + String scriptExecutionName, ScriptExecutionInner scriptExecution) { return beginCreateOrUpdateAsync(resourceGroupName, privateCloudName, scriptExecutionName, scriptExecution) - .last() - .flatMap(this.client::getLroFinalResultOrError); + .last().flatMap(this.client::getLroFinalResultOrError); } /** - * Create or update a script execution in a private cloud. - * + * Create a ScriptExecution. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName The name of the private cloud. - * @param scriptExecutionName Name of the user-invoked script execution resource. - * @param scriptExecution A script running in the private cloud. + * @param privateCloudName Name of the private cloud. + * @param scriptExecutionName Name of the script cmdlet. + * @param scriptExecution Resource create parameters. * @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. @@ -779,46 +636,37 @@ private Mono createOrUpdateAsync( * @return an instance of a script executed by a user - custom or AVS on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync( - String resourceGroupName, - String privateCloudName, - String scriptExecutionName, - ScriptExecutionInner scriptExecution, - Context context) { - return beginCreateOrUpdateAsync( - resourceGroupName, privateCloudName, scriptExecutionName, scriptExecution, context) - .last() - .flatMap(this.client::getLroFinalResultOrError); + private Mono createOrUpdateAsync(String resourceGroupName, String privateCloudName, + String scriptExecutionName, ScriptExecutionInner scriptExecution, Context context) { + return beginCreateOrUpdateAsync(resourceGroupName, privateCloudName, scriptExecutionName, scriptExecution, + context).last().flatMap(this.client::getLroFinalResultOrError); } /** - * Create or update a script execution in a private cloud. - * + * Create a ScriptExecution. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName The name of the private cloud. - * @param scriptExecutionName Name of the user-invoked script execution resource. - * @param scriptExecution A script running in the private cloud. + * @param privateCloudName Name of the private cloud. + * @param scriptExecutionName Name of the script cmdlet. + * @param scriptExecution Resource create parameters. * @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 an instance of a script executed by a user - custom or AVS. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ScriptExecutionInner createOrUpdate( - String resourceGroupName, - String privateCloudName, - String scriptExecutionName, - ScriptExecutionInner scriptExecution) { + public ScriptExecutionInner createOrUpdate(String resourceGroupName, String privateCloudName, + String scriptExecutionName, ScriptExecutionInner scriptExecution) { return createOrUpdateAsync(resourceGroupName, privateCloudName, scriptExecutionName, scriptExecution).block(); } /** - * Create or update a script execution in a private cloud. - * + * Create a ScriptExecution. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName The name of the private cloud. - * @param scriptExecutionName Name of the user-invoked script execution resource. - * @param scriptExecution A script running in the private cloud. + * @param privateCloudName Name of the private cloud. + * @param scriptExecutionName Name of the script cmdlet. + * @param scriptExecution Resource create parameters. * @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. @@ -826,41 +674,33 @@ public ScriptExecutionInner createOrUpdate( * @return an instance of a script executed by a user - custom or AVS. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ScriptExecutionInner createOrUpdate( - String resourceGroupName, - String privateCloudName, - String scriptExecutionName, - ScriptExecutionInner scriptExecution, - Context context) { + public ScriptExecutionInner createOrUpdate(String resourceGroupName, String privateCloudName, + String scriptExecutionName, ScriptExecutionInner scriptExecution, Context context) { return createOrUpdateAsync(resourceGroupName, privateCloudName, scriptExecutionName, scriptExecution, context) .block(); } /** - * Cancel a ScriptExecution in a private cloud. - * + * Delete a ScriptExecution. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param scriptExecutionName Name of the user-invoked script execution resource. + * @param scriptExecutionName Name of the script cmdlet. * @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 privateCloudName, String scriptExecutionName) { + private Mono>> deleteWithResponseAsync(String resourceGroupName, String privateCloudName, + String scriptExecutionName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -875,28 +715,17 @@ private Mono>> deleteWithResponseAsync( .error(new IllegalArgumentException("Parameter scriptExecutionName is required and cannot be null.")); } final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .delete( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - privateCloudName, - scriptExecutionName, - this.client.getApiVersion(), - accept, - context)) + return FluxUtil.withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, scriptExecutionName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Cancel a ScriptExecution in a private cloud. - * + * Delete a ScriptExecution. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param scriptExecutionName Name of the user-invoked script execution resource. + * @param scriptExecutionName Name of the script cmdlet. * @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. @@ -904,19 +733,15 @@ private Mono>> deleteWithResponseAsync( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync( - String resourceGroupName, String privateCloudName, String scriptExecutionName, Context context) { + private Mono>> deleteWithResponseAsync(String resourceGroupName, String privateCloudName, + String scriptExecutionName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -932,46 +757,36 @@ private Mono>> deleteWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .delete( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - privateCloudName, - scriptExecutionName, - this.client.getApiVersion(), - accept, - context); + return service.delete(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, privateCloudName, scriptExecutionName, accept, context); } /** - * Cancel a ScriptExecution in a private cloud. - * + * Delete a ScriptExecution. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param scriptExecutionName Name of the user-invoked script execution resource. + * @param scriptExecutionName Name of the script cmdlet. * @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 long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync( - String resourceGroupName, String privateCloudName, String scriptExecutionName) { - Mono>> mono = - deleteWithResponseAsync(resourceGroupName, privateCloudName, scriptExecutionName); - return this - .client - .getLroResult( - mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String privateCloudName, + String scriptExecutionName) { + Mono>> mono + = deleteWithResponseAsync(resourceGroupName, privateCloudName, scriptExecutionName); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); } /** - * Cancel a ScriptExecution in a private cloud. - * + * Delete a ScriptExecution. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param scriptExecutionName Name of the user-invoked script execution resource. + * @param scriptExecutionName Name of the script cmdlet. * @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. @@ -979,39 +794,38 @@ private PollerFlux, Void> beginDeleteAsync( * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync( - String resourceGroupName, String privateCloudName, String scriptExecutionName, Context context) { + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String privateCloudName, + String scriptExecutionName, Context context) { context = this.client.mergeContext(context); - Mono>> mono = - deleteWithResponseAsync(resourceGroupName, privateCloudName, scriptExecutionName, context); - return this - .client - .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); + Mono>> mono + = deleteWithResponseAsync(resourceGroupName, privateCloudName, scriptExecutionName, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + context); } /** - * Cancel a ScriptExecution in a private cloud. - * + * Delete a ScriptExecution. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param scriptExecutionName Name of the user-invoked script execution resource. + * @param scriptExecutionName Name of the script cmdlet. * @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 long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete( - String resourceGroupName, String privateCloudName, String scriptExecutionName) { + public SyncPoller, Void> beginDelete(String resourceGroupName, String privateCloudName, + String scriptExecutionName) { return this.beginDeleteAsync(resourceGroupName, privateCloudName, scriptExecutionName).getSyncPoller(); } /** - * Cancel a ScriptExecution in a private cloud. - * + * Delete a ScriptExecution. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param scriptExecutionName Name of the user-invoked script execution resource. + * @param scriptExecutionName Name of the script cmdlet. * @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. @@ -1019,17 +833,17 @@ public SyncPoller, Void> beginDelete( * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete( - String resourceGroupName, String privateCloudName, String scriptExecutionName, Context context) { + public SyncPoller, Void> beginDelete(String resourceGroupName, String privateCloudName, + String scriptExecutionName, Context context) { return this.beginDeleteAsync(resourceGroupName, privateCloudName, scriptExecutionName, context).getSyncPoller(); } /** - * Cancel a ScriptExecution in a private cloud. - * + * Delete a ScriptExecution. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param scriptExecutionName Name of the user-invoked script execution resource. + * @param scriptExecutionName Name of the script cmdlet. * @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. @@ -1037,17 +851,16 @@ public SyncPoller, Void> beginDelete( */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono deleteAsync(String resourceGroupName, String privateCloudName, String scriptExecutionName) { - return beginDeleteAsync(resourceGroupName, privateCloudName, scriptExecutionName) - .last() + return beginDeleteAsync(resourceGroupName, privateCloudName, scriptExecutionName).last() .flatMap(this.client::getLroFinalResultOrError); } /** - * Cancel a ScriptExecution in a private cloud. - * + * Delete a ScriptExecution. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param scriptExecutionName Name of the user-invoked script execution resource. + * @param scriptExecutionName Name of the script cmdlet. * @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. @@ -1055,19 +868,18 @@ private Mono deleteAsync(String resourceGroupName, String privateCloudName * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync( - String resourceGroupName, String privateCloudName, String scriptExecutionName, Context context) { - return beginDeleteAsync(resourceGroupName, privateCloudName, scriptExecutionName, context) - .last() + private Mono deleteAsync(String resourceGroupName, String privateCloudName, String scriptExecutionName, + Context context) { + return beginDeleteAsync(resourceGroupName, privateCloudName, scriptExecutionName, context).last() .flatMap(this.client::getLroFinalResultOrError); } /** - * Cancel a ScriptExecution in a private cloud. - * + * Delete a ScriptExecution. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param scriptExecutionName Name of the user-invoked script execution resource. + * @param scriptExecutionName Name of the script cmdlet. * @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. @@ -1078,11 +890,11 @@ public void delete(String resourceGroupName, String privateCloudName, String scr } /** - * Cancel a ScriptExecution in a private cloud. - * + * Delete a ScriptExecution. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param scriptExecutionName Name of the user-invoked script execution resource. + * @param scriptExecutionName Name of the script cmdlet. * @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. @@ -1095,35 +907,28 @@ public void delete(String resourceGroupName, String privateCloudName, String scr /** * Return the logs for a script execution resource. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param scriptExecutionName Name of the user-invoked script execution resource. + * @param scriptExecutionName Name of the script cmdlet. * @param scriptOutputStreamType Name of the desired output stream to return. If not provided, will return all. An - * empty array will return nothing. + * empty array will return nothing. * @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 an instance of a script executed by a user - custom or AVS along with {@link Response} on successful - * completion of {@link Mono}. + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getExecutionLogsWithResponseAsync( - String resourceGroupName, - String privateCloudName, - String scriptExecutionName, - List scriptOutputStreamType) { + private Mono> getExecutionLogsWithResponseAsync(String resourceGroupName, + String privateCloudName, String scriptExecutionName, List scriptOutputStreamType) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1139,55 +944,38 @@ private Mono> getExecutionLogsWithResponseAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .getExecutionLogs( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - privateCloudName, - scriptExecutionName, - this.client.getApiVersion(), - scriptOutputStreamType, - accept, - context)) + .withContext(context -> service.getExecutionLogs(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, scriptExecutionName, + scriptOutputStreamType, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Return the logs for a script execution resource. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param scriptExecutionName Name of the user-invoked script execution resource. + * @param scriptExecutionName Name of the script cmdlet. * @param scriptOutputStreamType Name of the desired output stream to return. If not provided, will return all. An - * empty array will return nothing. + * empty array will return nothing. * @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 an instance of a script executed by a user - custom or AVS along with {@link Response} on successful - * completion of {@link Mono}. + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getExecutionLogsWithResponseAsync( - String resourceGroupName, - String privateCloudName, - String scriptExecutionName, - List scriptOutputStreamType, + private Mono> getExecutionLogsWithResponseAsync(String resourceGroupName, + String privateCloudName, String scriptExecutionName, List scriptOutputStreamType, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1203,47 +991,38 @@ private Mono> getExecutionLogsWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .getExecutionLogs( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - privateCloudName, - scriptExecutionName, - this.client.getApiVersion(), - scriptOutputStreamType, - accept, - context); + return service.getExecutionLogs(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, scriptExecutionName, + scriptOutputStreamType, accept, context); } /** * Return the logs for a script execution resource. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param scriptExecutionName Name of the user-invoked script execution resource. + * @param scriptExecutionName Name of the script cmdlet. * @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 an instance of a script executed by a user - custom or AVS on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getExecutionLogsAsync( - String resourceGroupName, String privateCloudName, String scriptExecutionName) { + private Mono getExecutionLogsAsync(String resourceGroupName, String privateCloudName, + String scriptExecutionName) { final List scriptOutputStreamType = null; - return getExecutionLogsWithResponseAsync( - resourceGroupName, privateCloudName, scriptExecutionName, scriptOutputStreamType) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); + return getExecutionLogsWithResponseAsync(resourceGroupName, privateCloudName, scriptExecutionName, + scriptOutputStreamType).flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** * Return the logs for a script execution resource. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param scriptExecutionName Name of the user-invoked script execution resource. + * @param scriptExecutionName Name of the script cmdlet. * @param scriptOutputStreamType Name of the desired output stream to return. If not provided, will return all. An - * empty array will return nothing. + * empty array will return nothing. * @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. @@ -1251,47 +1030,43 @@ private Mono getExecutionLogsAsync( * @return an instance of a script executed by a user - custom or AVS along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getExecutionLogsWithResponse( - String resourceGroupName, - String privateCloudName, - String scriptExecutionName, - List scriptOutputStreamType, + public Response getExecutionLogsWithResponse(String resourceGroupName, + String privateCloudName, String scriptExecutionName, List scriptOutputStreamType, Context context) { - return getExecutionLogsWithResponseAsync( - resourceGroupName, privateCloudName, scriptExecutionName, scriptOutputStreamType, context) - .block(); + return getExecutionLogsWithResponseAsync(resourceGroupName, privateCloudName, scriptExecutionName, + scriptOutputStreamType, context).block(); } /** * Return the logs for a script execution resource. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param scriptExecutionName Name of the user-invoked script execution resource. + * @param scriptExecutionName Name of the script cmdlet. * @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 an instance of a script executed by a user - custom or AVS. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ScriptExecutionInner getExecutionLogs( - String resourceGroupName, String privateCloudName, String scriptExecutionName) { + public ScriptExecutionInner getExecutionLogs(String resourceGroupName, String privateCloudName, + String scriptExecutionName) { final List scriptOutputStreamType = null; - return getExecutionLogsWithResponse( - resourceGroupName, privateCloudName, scriptExecutionName, scriptOutputStreamType, Context.NONE) - .getValue(); + return getExecutionLogsWithResponse(resourceGroupName, privateCloudName, scriptExecutionName, + scriptOutputStreamType, Context.NONE).getValue(); } /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * The nextLink parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return pageable list of script executions along with {@link PagedResponse} on successful completion of {@link - * Mono}. + * @return the response of a ScriptExecution list operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink) { @@ -1299,37 +1074,28 @@ private Mono> listNextSinglePageAsync(String 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.")); + 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.listNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + return FluxUtil.withContext(context -> service.listNext(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 URL to get the next list of items - *

The nextLink parameter. + * + * The nextLink parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return pageable list of script executions along with {@link PagedResponse} on successful completion of {@link - * Mono}. + * @return the response of a ScriptExecution list operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink, Context context) { @@ -1337,23 +1103,13 @@ private Mono> listNextSinglePageAsync(String 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.")); + 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 - .listNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.listNext(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/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/ScriptExecutionsImpl.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/ScriptExecutionsImpl.java index 43fab5a4d89f1..a8906281da26c 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/ScriptExecutionsImpl.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/ScriptExecutionsImpl.java @@ -23,32 +23,29 @@ public final class ScriptExecutionsImpl implements ScriptExecutions { private final com.azure.resourcemanager.avs.AvsManager serviceManager; - public ScriptExecutionsImpl( - ScriptExecutionsClient innerClient, com.azure.resourcemanager.avs.AvsManager serviceManager) { + public ScriptExecutionsImpl(ScriptExecutionsClient innerClient, + com.azure.resourcemanager.avs.AvsManager serviceManager) { this.innerClient = innerClient; this.serviceManager = serviceManager; } public PagedIterable list(String resourceGroupName, String privateCloudName) { PagedIterable inner = this.serviceClient().list(resourceGroupName, privateCloudName); - return Utils.mapPage(inner, inner1 -> new ScriptExecutionImpl(inner1, this.manager())); + return ResourceManagerUtils.mapPage(inner, inner1 -> new ScriptExecutionImpl(inner1, this.manager())); } public PagedIterable list(String resourceGroupName, String privateCloudName, Context context) { - PagedIterable inner = - this.serviceClient().list(resourceGroupName, privateCloudName, context); - return Utils.mapPage(inner, inner1 -> new ScriptExecutionImpl(inner1, this.manager())); + PagedIterable inner + = this.serviceClient().list(resourceGroupName, privateCloudName, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new ScriptExecutionImpl(inner1, this.manager())); } - public Response getWithResponse( - String resourceGroupName, String privateCloudName, String scriptExecutionName, Context context) { - Response inner = - this.serviceClient().getWithResponse(resourceGroupName, privateCloudName, scriptExecutionName, context); + public Response getWithResponse(String resourceGroupName, String privateCloudName, + String scriptExecutionName, Context context) { + Response inner + = this.serviceClient().getWithResponse(resourceGroupName, privateCloudName, scriptExecutionName, context); if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), new ScriptExecutionImpl(inner.getValue(), this.manager())); } else { return null; @@ -72,32 +69,22 @@ public void delete(String resourceGroupName, String privateCloudName, String scr this.serviceClient().delete(resourceGroupName, privateCloudName, scriptExecutionName, context); } - public Response getExecutionLogsWithResponse( - String resourceGroupName, - String privateCloudName, - String scriptExecutionName, - List scriptOutputStreamType, - Context context) { - Response inner = - this - .serviceClient() - .getExecutionLogsWithResponse( - resourceGroupName, privateCloudName, scriptExecutionName, scriptOutputStreamType, context); + public Response getExecutionLogsWithResponse(String resourceGroupName, String privateCloudName, + String scriptExecutionName, List scriptOutputStreamType, Context context) { + Response inner = this.serviceClient().getExecutionLogsWithResponse(resourceGroupName, + privateCloudName, scriptExecutionName, scriptOutputStreamType, context); if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), new ScriptExecutionImpl(inner.getValue(), this.manager())); } else { return null; } } - public ScriptExecution getExecutionLogs( - String resourceGroupName, String privateCloudName, String scriptExecutionName) { - ScriptExecutionInner inner = - this.serviceClient().getExecutionLogs(resourceGroupName, privateCloudName, scriptExecutionName); + public ScriptExecution getExecutionLogs(String resourceGroupName, String privateCloudName, + String scriptExecutionName) { + ScriptExecutionInner inner + = this.serviceClient().getExecutionLogs(resourceGroupName, privateCloudName, scriptExecutionName); if (inner != null) { return new ScriptExecutionImpl(inner, this.manager()); } else { @@ -106,113 +93,77 @@ public ScriptExecution getExecutionLogs( } public ScriptExecution getById(String id) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + String resourceGroupName = ResourceManagerUtils.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))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } - String privateCloudName = Utils.getValueFromIdByName(id, "privateClouds"); + String privateCloudName = ResourceManagerUtils.getValueFromIdByName(id, "privateClouds"); if (privateCloudName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'privateClouds'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'privateClouds'.", id))); } - String scriptExecutionName = Utils.getValueFromIdByName(id, "scriptExecutions"); + String scriptExecutionName = ResourceManagerUtils.getValueFromIdByName(id, "scriptExecutions"); if (scriptExecutionName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format( - "The resource ID '%s' is not valid. Missing path segment 'scriptExecutions'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'scriptExecutions'.", id))); } return this.getWithResponse(resourceGroupName, privateCloudName, scriptExecutionName, Context.NONE).getValue(); } public Response getByIdWithResponse(String id, Context context) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + String resourceGroupName = ResourceManagerUtils.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))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } - String privateCloudName = Utils.getValueFromIdByName(id, "privateClouds"); + String privateCloudName = ResourceManagerUtils.getValueFromIdByName(id, "privateClouds"); if (privateCloudName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'privateClouds'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'privateClouds'.", id))); } - String scriptExecutionName = Utils.getValueFromIdByName(id, "scriptExecutions"); + String scriptExecutionName = ResourceManagerUtils.getValueFromIdByName(id, "scriptExecutions"); if (scriptExecutionName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format( - "The resource ID '%s' is not valid. Missing path segment 'scriptExecutions'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'scriptExecutions'.", id))); } return this.getWithResponse(resourceGroupName, privateCloudName, scriptExecutionName, context); } public void deleteById(String id) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + String resourceGroupName = ResourceManagerUtils.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))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } - String privateCloudName = Utils.getValueFromIdByName(id, "privateClouds"); + String privateCloudName = ResourceManagerUtils.getValueFromIdByName(id, "privateClouds"); if (privateCloudName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'privateClouds'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'privateClouds'.", id))); } - String scriptExecutionName = Utils.getValueFromIdByName(id, "scriptExecutions"); + String scriptExecutionName = ResourceManagerUtils.getValueFromIdByName(id, "scriptExecutions"); if (scriptExecutionName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format( - "The resource ID '%s' is not valid. Missing path segment 'scriptExecutions'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'scriptExecutions'.", id))); } this.delete(resourceGroupName, privateCloudName, scriptExecutionName, Context.NONE); } public void deleteByIdWithResponse(String id, Context context) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + String resourceGroupName = ResourceManagerUtils.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))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } - String privateCloudName = Utils.getValueFromIdByName(id, "privateClouds"); + String privateCloudName = ResourceManagerUtils.getValueFromIdByName(id, "privateClouds"); if (privateCloudName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'privateClouds'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'privateClouds'.", id))); } - String scriptExecutionName = Utils.getValueFromIdByName(id, "scriptExecutions"); + String scriptExecutionName = ResourceManagerUtils.getValueFromIdByName(id, "scriptExecutions"); if (scriptExecutionName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format( - "The resource ID '%s' is not valid. Missing path segment 'scriptExecutions'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'scriptExecutions'.", id))); } this.delete(resourceGroupName, privateCloudName, scriptExecutionName, context); } diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/ScriptPackageImpl.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/ScriptPackageImpl.java index 357150e3d27af..84b03be05d643 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/ScriptPackageImpl.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/ScriptPackageImpl.java @@ -4,8 +4,10 @@ package com.azure.resourcemanager.avs.implementation; +import com.azure.core.management.SystemData; import com.azure.resourcemanager.avs.fluent.models.ScriptPackageInner; import com.azure.resourcemanager.avs.models.ScriptPackage; +import com.azure.resourcemanager.avs.models.ScriptPackageProvisioningState; public final class ScriptPackageImpl implements ScriptPackage { private ScriptPackageInner innerObject; @@ -29,6 +31,14 @@ public String type() { return this.innerModel().type(); } + public SystemData systemData() { + return this.innerModel().systemData(); + } + + public ScriptPackageProvisioningState provisioningState() { + return this.innerModel().provisioningState(); + } + public String description() { return this.innerModel().description(); } diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/ScriptPackagesClientImpl.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/ScriptPackagesClientImpl.java index 43ee4d54c96ff..ddb4187e403ce 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/ScriptPackagesClientImpl.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/ScriptPackagesClientImpl.java @@ -27,25 +27,31 @@ import com.azure.core.util.FluxUtil; import com.azure.resourcemanager.avs.fluent.ScriptPackagesClient; import com.azure.resourcemanager.avs.fluent.models.ScriptPackageInner; -import com.azure.resourcemanager.avs.models.ScriptPackagesList; +import com.azure.resourcemanager.avs.models.ScriptPackageListResult; import reactor.core.publisher.Mono; -/** An instance of this class provides access to all the operations defined in ScriptPackagesClient. */ +/** + * An instance of this class provides access to all the operations defined in ScriptPackagesClient. + */ public final class ScriptPackagesClientImpl implements ScriptPackagesClient { - /** The proxy service used to perform REST calls. */ + /** + * The proxy service used to perform REST calls. + */ private final ScriptPackagesService service; - /** The service client containing this operation class. */ + /** + * The service client containing this operation class. + */ private final AvsClientImpl client; /** * Initializes an instance of ScriptPackagesClientImpl. - * + * * @param client the instance of the service client containing this operation class. */ ScriptPackagesClientImpl(AvsClientImpl client) { - this.service = - RestProxy.create(ScriptPackagesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.service + = RestProxy.create(ScriptPackagesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } @@ -56,71 +62,56 @@ public final class ScriptPackagesClientImpl implements ScriptPackagesClient { @Host("{$host}") @ServiceInterface(name = "AvsClientScriptPacka") public interface ScriptPackagesService { - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/scriptPackages") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/scriptPackages") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono> list(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("privateCloudName") String privateCloudName, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, + @PathParam("privateCloudName") String privateCloudName, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/scriptPackages/{scriptPackageName}") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/scriptPackages/{scriptPackageName}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono> get(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("privateCloudName") String privateCloudName, - @PathParam("scriptPackageName") String scriptPackageName, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, + @PathParam("scriptPackageName") String scriptPackageName, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + Mono> listNext(@PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); } /** - * List script packages available to run on the private cloud. - * + * List ScriptPackage resources by PrivateCloud. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. * @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 list of the available script packages along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * @return the response of a ScriptPackage list operation along with {@link PagedResponse} on successful completion + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync( - String resourceGroupName, String privateCloudName) { + private Mono> listSinglePageAsync(String resourceGroupName, + String privateCloudName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -132,55 +123,35 @@ private Mono> listSinglePageAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .list( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - privateCloudName, - this.client.getApiVersion(), - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, 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 script packages available to run on the private cloud. - * + * List ScriptPackage resources by PrivateCloud. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. * @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 a list of the available script packages along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * @return the response of a ScriptPackage list operation along with {@link PagedResponse} on successful completion + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync( - String resourceGroupName, String privateCloudName, Context context) { + private Mono> listSinglePageAsync(String resourceGroupName, + String privateCloudName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -193,70 +164,55 @@ private Mono> listSinglePageAsync( final String accept = "application/json"; context = this.client.mergeContext(context); return service - .list( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - privateCloudName, - this.client.getApiVersion(), - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + .list(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, privateCloudName, accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** - * List script packages available to run on the private cloud. - * + * List ScriptPackage resources by PrivateCloud. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. * @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 list of the available script packages as paginated response with {@link PagedFlux}. + * @return the response of a ScriptPackage list operation as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(String resourceGroupName, String privateCloudName) { - return new PagedFlux<>( - () -> listSinglePageAsync(resourceGroupName, privateCloudName), + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, privateCloudName), nextLink -> listNextSinglePageAsync(nextLink)); } /** - * List script packages available to run on the private cloud. - * + * List ScriptPackage resources by PrivateCloud. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. * @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 a list of the available script packages as paginated response with {@link PagedFlux}. + * @return the response of a ScriptPackage list operation as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync( - String resourceGroupName, String privateCloudName, Context context) { - return new PagedFlux<>( - () -> listSinglePageAsync(resourceGroupName, privateCloudName, context), + private PagedFlux listAsync(String resourceGroupName, String privateCloudName, + Context context) { + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, privateCloudName, context), nextLink -> listNextSinglePageAsync(nextLink, context)); } /** - * List script packages available to run on the private cloud. - * + * List ScriptPackage resources by PrivateCloud. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. * @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 list of the available script packages as paginated response with {@link PagedIterable}. + * @return the response of a ScriptPackage list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(String resourceGroupName, String privateCloudName) { @@ -264,15 +220,15 @@ public PagedIterable list(String resourceGroupName, String p } /** - * List script packages available to run on the private cloud. - * + * List ScriptPackage resources by PrivateCloud. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. * @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 a list of the available script packages as paginated response with {@link PagedIterable}. + * @return the response of a ScriptPackage list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(String resourceGroupName, String privateCloudName, Context context) { @@ -280,31 +236,26 @@ public PagedIterable list(String resourceGroupName, String p } /** - * Get a script package available to run on a private cloud. - * + * Get a ScriptPackage. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param scriptPackageName Name of the script package in the private cloud. + * @param scriptPackageName Name of the script package. * @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 script package available to run on a private cloud along with {@link Response} on successful completion - * of {@link Mono}. + * @return a ScriptPackage along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String privateCloudName, String scriptPackageName) { + private Mono> getWithResponseAsync(String resourceGroupName, String privateCloudName, + String scriptPackageName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -319,49 +270,33 @@ private Mono> getWithResponseAsync( .error(new IllegalArgumentException("Parameter scriptPackageName is required and cannot be null.")); } final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .get( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - privateCloudName, - scriptPackageName, - this.client.getApiVersion(), - accept, - context)) + return FluxUtil.withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, scriptPackageName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Get a script package available to run on a private cloud. - * + * Get a ScriptPackage. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param scriptPackageName Name of the script package in the private cloud. + * @param scriptPackageName Name of the script package. * @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 a script package available to run on a private cloud along with {@link Response} on successful completion - * of {@link Mono}. + * @return a ScriptPackage along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String privateCloudName, String scriptPackageName, Context context) { + private Mono> getWithResponseAsync(String resourceGroupName, String privateCloudName, + String scriptPackageName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -377,64 +312,56 @@ private Mono> getWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .get( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - privateCloudName, - scriptPackageName, - this.client.getApiVersion(), - accept, - context); + return service.get(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, privateCloudName, scriptPackageName, accept, context); } /** - * Get a script package available to run on a private cloud. - * + * Get a ScriptPackage. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param scriptPackageName Name of the script package in the private cloud. + * @param scriptPackageName Name of the script package. * @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 script package available to run on a private cloud on successful completion of {@link Mono}. + * @return a ScriptPackage on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync( - String resourceGroupName, String privateCloudName, String scriptPackageName) { + private Mono getAsync(String resourceGroupName, String privateCloudName, + String scriptPackageName) { return getWithResponseAsync(resourceGroupName, privateCloudName, scriptPackageName) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** - * Get a script package available to run on a private cloud. - * + * Get a ScriptPackage. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param scriptPackageName Name of the script package in the private cloud. + * @param scriptPackageName Name of the script package. * @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 a script package available to run on a private cloud along with {@link Response}. + * @return a ScriptPackage along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, String privateCloudName, String scriptPackageName, Context context) { + public Response getWithResponse(String resourceGroupName, String privateCloudName, + String scriptPackageName, Context context) { return getWithResponseAsync(resourceGroupName, privateCloudName, scriptPackageName, context).block(); } /** - * Get a script package available to run on a private cloud. - * + * Get a ScriptPackage. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param scriptPackageName Name of the script package in the private cloud. + * @param scriptPackageName Name of the script package. * @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 script package available to run on a private cloud. + * @return a ScriptPackage. */ @ServiceMethod(returns = ReturnType.SINGLE) public ScriptPackageInner get(String resourceGroupName, String privateCloudName, String scriptPackageName) { @@ -443,14 +370,15 @@ public ScriptPackageInner get(String resourceGroupName, String privateCloudName, /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * 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 a list of the available script packages along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * @return the response of a ScriptPackage list operation along with {@link PagedResponse} on successful completion + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink) { @@ -458,37 +386,28 @@ private Mono> listNextSinglePageAsync(String n 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.")); + 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.listNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + return FluxUtil.withContext(context -> service.listNext(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 URL to get the next list of items - *

The nextLink parameter. + * + * 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 a list of the available script packages along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * @return the response of a ScriptPackage list operation along with {@link PagedResponse} on successful completion + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink, Context context) { @@ -496,23 +415,13 @@ private Mono> listNextSinglePageAsync(String n 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.")); + 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 - .listNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.listNext(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/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/ScriptPackagesImpl.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/ScriptPackagesImpl.java index da824acd062db..7290241ccce6c 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/ScriptPackagesImpl.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/ScriptPackagesImpl.java @@ -21,32 +21,29 @@ public final class ScriptPackagesImpl implements ScriptPackages { private final com.azure.resourcemanager.avs.AvsManager serviceManager; - public ScriptPackagesImpl( - ScriptPackagesClient innerClient, com.azure.resourcemanager.avs.AvsManager serviceManager) { + public ScriptPackagesImpl(ScriptPackagesClient innerClient, + com.azure.resourcemanager.avs.AvsManager serviceManager) { this.innerClient = innerClient; this.serviceManager = serviceManager; } public PagedIterable list(String resourceGroupName, String privateCloudName) { PagedIterable inner = this.serviceClient().list(resourceGroupName, privateCloudName); - return Utils.mapPage(inner, inner1 -> new ScriptPackageImpl(inner1, this.manager())); + return ResourceManagerUtils.mapPage(inner, inner1 -> new ScriptPackageImpl(inner1, this.manager())); } public PagedIterable list(String resourceGroupName, String privateCloudName, Context context) { - PagedIterable inner = - this.serviceClient().list(resourceGroupName, privateCloudName, context); - return Utils.mapPage(inner, inner1 -> new ScriptPackageImpl(inner1, this.manager())); + PagedIterable inner + = this.serviceClient().list(resourceGroupName, privateCloudName, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new ScriptPackageImpl(inner1, this.manager())); } - public Response getWithResponse( - String resourceGroupName, String privateCloudName, String scriptPackageName, Context context) { - Response inner = - this.serviceClient().getWithResponse(resourceGroupName, privateCloudName, scriptPackageName, context); + public Response getWithResponse(String resourceGroupName, String privateCloudName, + String scriptPackageName, Context context) { + Response inner + = this.serviceClient().getWithResponse(resourceGroupName, privateCloudName, scriptPackageName, context); if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), new ScriptPackageImpl(inner.getValue(), this.manager())); } else { return null; diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/VirtualMachineImpl.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/VirtualMachineImpl.java index 6a1dfa81691ad..d1a268fd18d52 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/VirtualMachineImpl.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/VirtualMachineImpl.java @@ -4,8 +4,10 @@ package com.azure.resourcemanager.avs.implementation; +import com.azure.core.management.SystemData; import com.azure.resourcemanager.avs.fluent.models.VirtualMachineInner; import com.azure.resourcemanager.avs.models.VirtualMachine; +import com.azure.resourcemanager.avs.models.VirtualMachineProvisioningState; import com.azure.resourcemanager.avs.models.VirtualMachineRestrictMovementState; public final class VirtualMachineImpl implements VirtualMachine { @@ -30,6 +32,14 @@ public String type() { return this.innerModel().type(); } + public SystemData systemData() { + return this.innerModel().systemData(); + } + + public VirtualMachineProvisioningState provisioningState() { + return this.innerModel().provisioningState(); + } + public String displayName() { return this.innerModel().displayName(); } diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/VirtualMachinesClientImpl.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/VirtualMachinesClientImpl.java index 8fdf779ba62ff..bb00077c6c63e 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/VirtualMachinesClientImpl.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/VirtualMachinesClientImpl.java @@ -32,28 +32,34 @@ import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.avs.fluent.VirtualMachinesClient; import com.azure.resourcemanager.avs.fluent.models.VirtualMachineInner; +import com.azure.resourcemanager.avs.models.VirtualMachineListResult; import com.azure.resourcemanager.avs.models.VirtualMachineRestrictMovement; -import com.azure.resourcemanager.avs.models.VirtualMachinesList; 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 VirtualMachinesClient. */ +/** + * An instance of this class provides access to all the operations defined in VirtualMachinesClient. + */ public final class VirtualMachinesClientImpl implements VirtualMachinesClient { - /** The proxy service used to perform REST calls. */ + /** + * The proxy service used to perform REST calls. + */ private final VirtualMachinesService service; - /** The service client containing this operation class. */ + /** + * The service client containing this operation class. + */ private final AvsClientImpl client; /** * Initializes an instance of VirtualMachinesClientImpl. - * + * * @param client the instance of the service client containing this operation class. */ VirtualMachinesClientImpl(AvsClientImpl client) { - this.service = - RestProxy.create(VirtualMachinesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.service + = RestProxy.create(VirtualMachinesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } @@ -64,90 +70,70 @@ public final class VirtualMachinesClientImpl implements VirtualMachinesClient { @Host("{$host}") @ServiceInterface(name = "AvsClientVirtualMach") public interface VirtualMachinesService { - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters/{clusterName}/virtualMachines") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters/{clusterName}/virtualMachines") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono> list(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, - @QueryParam("api-version") String apiVersion, - @PathParam("privateCloudName") String privateCloudName, - @PathParam("clusterName") String clusterName, - @HeaderParam("Accept") String accept, - Context context); + @PathParam("privateCloudName") String privateCloudName, @PathParam("clusterName") String clusterName, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters/{clusterName}/virtualMachines/{virtualMachineId}") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters/{clusterName}/virtualMachines/{virtualMachineId}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono> get(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, - @QueryParam("api-version") String apiVersion, - @PathParam("privateCloudName") String privateCloudName, - @PathParam("clusterName") String clusterName, - @PathParam("virtualMachineId") String virtualMachineId, - @HeaderParam("Accept") String accept, + @PathParam("privateCloudName") String privateCloudName, @PathParam("clusterName") String clusterName, + @PathParam("virtualMachineId") String virtualMachineId, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters/{clusterName}/virtualMachines/{virtualMachineId}/restrictMovement") - @ExpectedResponses({202}) + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters/{clusterName}/virtualMachines/{virtualMachineId}/restrictMovement") + @ExpectedResponses({ 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> restrictMovement( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono>> restrictMovement(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, - @QueryParam("api-version") String apiVersion, - @PathParam("privateCloudName") String privateCloudName, - @PathParam("clusterName") String clusterName, + @PathParam("privateCloudName") String privateCloudName, @PathParam("clusterName") String clusterName, @PathParam("virtualMachineId") String virtualMachineId, @BodyParam("application/json") VirtualMachineRestrictMovement restrictMovement, - @HeaderParam("Accept") String accept, - Context context); + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + Mono> listNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); } /** - * List of virtual machines in a private cloud cluster. - * + * List VirtualMachine resources by Cluster. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param clusterName Name of the cluster in the private cloud. + * @param clusterName Name of the cluster. * @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 list of Virtual Machines along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return the response of a VirtualMachine list operation along with {@link PagedResponse} on successful completion + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync( - String resourceGroupName, String privateCloudName, String clusterName) { + private Mono> listSinglePageAsync(String resourceGroupName, + String privateCloudName, String clusterName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -162,56 +148,36 @@ private Mono> listSinglePageAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .list( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - this.client.getApiVersion(), - privateCloudName, - clusterName, - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, clusterName, 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 of virtual machines in a private cloud cluster. - * + * List VirtualMachine resources by Cluster. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param clusterName Name of the cluster in the private cloud. + * @param clusterName Name of the cluster. * @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 a list of Virtual Machines along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return the response of a VirtualMachine list operation along with {@link PagedResponse} on successful completion + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync( - String resourceGroupName, String privateCloudName, String clusterName, Context context) { + private Mono> listSinglePageAsync(String resourceGroupName, + String privateCloudName, String clusterName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -227,127 +193,106 @@ private Mono> listSinglePageAsync( final String accept = "application/json"; context = this.client.mergeContext(context); return service - .list( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - this.client.getApiVersion(), - privateCloudName, - clusterName, - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + .list(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, privateCloudName, clusterName, accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** - * List of virtual machines in a private cloud cluster. - * + * List VirtualMachine resources by Cluster. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param clusterName Name of the cluster in the private cloud. + * @param clusterName Name of the cluster. * @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 list of Virtual Machines as paginated response with {@link PagedFlux}. + * @return the response of a VirtualMachine list operation as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync( - String resourceGroupName, String privateCloudName, String clusterName) { - return new PagedFlux<>( - () -> listSinglePageAsync(resourceGroupName, privateCloudName, clusterName), + private PagedFlux listAsync(String resourceGroupName, String privateCloudName, + String clusterName) { + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, privateCloudName, clusterName), nextLink -> listNextSinglePageAsync(nextLink)); } /** - * List of virtual machines in a private cloud cluster. - * + * List VirtualMachine resources by Cluster. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param clusterName Name of the cluster in the private cloud. + * @param clusterName Name of the cluster. * @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 a list of Virtual Machines as paginated response with {@link PagedFlux}. + * @return the response of a VirtualMachine list operation as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync( - String resourceGroupName, String privateCloudName, String clusterName, Context context) { - return new PagedFlux<>( - () -> listSinglePageAsync(resourceGroupName, privateCloudName, clusterName, context), + private PagedFlux listAsync(String resourceGroupName, String privateCloudName, + String clusterName, Context context) { + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, privateCloudName, clusterName, context), nextLink -> listNextSinglePageAsync(nextLink, context)); } /** - * List of virtual machines in a private cloud cluster. - * + * List VirtualMachine resources by Cluster. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param clusterName Name of the cluster in the private cloud. + * @param clusterName Name of the cluster. * @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 list of Virtual Machines as paginated response with {@link PagedIterable}. + * @return the response of a VirtualMachine list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list( - String resourceGroupName, String privateCloudName, String clusterName) { + public PagedIterable list(String resourceGroupName, String privateCloudName, + String clusterName) { return new PagedIterable<>(listAsync(resourceGroupName, privateCloudName, clusterName)); } /** - * List of virtual machines in a private cloud cluster. - * + * List VirtualMachine resources by Cluster. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param clusterName Name of the cluster in the private cloud. + * @param clusterName Name of the cluster. * @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 a list of Virtual Machines as paginated response with {@link PagedIterable}. + * @return the response of a VirtualMachine list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list( - String resourceGroupName, String privateCloudName, String clusterName, Context context) { + public PagedIterable list(String resourceGroupName, String privateCloudName, + String clusterName, Context context) { return new PagedIterable<>(listAsync(resourceGroupName, privateCloudName, clusterName, context)); } /** - * Get a virtual machine by id in a private cloud cluster. - * + * Get a VirtualMachine. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param clusterName Name of the cluster in the private cloud. - * @param virtualMachineId Virtual Machine identifier. + * @param clusterName Name of the cluster. + * @param virtualMachineId ID of the virtual machine. * @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 virtual machine by id in a private cloud cluster along with {@link Response} on successful completion - * of {@link Mono}. + * @return a VirtualMachine along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String privateCloudName, String clusterName, String virtualMachineId) { + private Mono> getWithResponseAsync(String resourceGroupName, String privateCloudName, + String clusterName, String virtualMachineId) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -366,54 +311,35 @@ private Mono> getWithResponseAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .get( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - this.client.getApiVersion(), - privateCloudName, - clusterName, - virtualMachineId, - accept, - context)) + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, clusterName, virtualMachineId, + accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Get a virtual machine by id in a private cloud cluster. - * + * Get a VirtualMachine. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param clusterName Name of the cluster in the private cloud. - * @param virtualMachineId Virtual Machine identifier. + * @param clusterName Name of the cluster. + * @param virtualMachineId ID of the virtual machine. * @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 a virtual machine by id in a private cloud cluster along with {@link Response} on successful completion - * of {@link Mono}. + * @return a VirtualMachine along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, - String privateCloudName, - String clusterName, - String virtualMachineId, - Context context) { + private Mono> getWithResponseAsync(String resourceGroupName, String privateCloudName, + String clusterName, String virtualMachineId, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -432,112 +358,92 @@ private Mono> getWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .get( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - this.client.getApiVersion(), - privateCloudName, - clusterName, - virtualMachineId, - accept, - context); + return service.get(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, privateCloudName, clusterName, virtualMachineId, accept, context); } /** - * Get a virtual machine by id in a private cloud cluster. - * + * Get a VirtualMachine. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param clusterName Name of the cluster in the private cloud. - * @param virtualMachineId Virtual Machine identifier. + * @param clusterName Name of the cluster. + * @param virtualMachineId ID of the virtual machine. * @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 virtual machine by id in a private cloud cluster on successful completion of {@link Mono}. + * @return a VirtualMachine on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync( - String resourceGroupName, String privateCloudName, String clusterName, String virtualMachineId) { + private Mono getAsync(String resourceGroupName, String privateCloudName, String clusterName, + String virtualMachineId) { return getWithResponseAsync(resourceGroupName, privateCloudName, clusterName, virtualMachineId) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** - * Get a virtual machine by id in a private cloud cluster. - * + * Get a VirtualMachine. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param clusterName Name of the cluster in the private cloud. - * @param virtualMachineId Virtual Machine identifier. + * @param clusterName Name of the cluster. + * @param virtualMachineId ID of the virtual machine. * @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 a virtual machine by id in a private cloud cluster along with {@link Response}. + * @return a VirtualMachine along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, - String privateCloudName, - String clusterName, - String virtualMachineId, - Context context) { + public Response getWithResponse(String resourceGroupName, String privateCloudName, + String clusterName, String virtualMachineId, Context context) { return getWithResponseAsync(resourceGroupName, privateCloudName, clusterName, virtualMachineId, context) .block(); } /** - * Get a virtual machine by id in a private cloud cluster. - * + * Get a VirtualMachine. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param clusterName Name of the cluster in the private cloud. - * @param virtualMachineId Virtual Machine identifier. + * @param clusterName Name of the cluster. + * @param virtualMachineId ID of the virtual machine. * @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 virtual machine by id in a private cloud cluster. + * @return a VirtualMachine. */ @ServiceMethod(returns = ReturnType.SINGLE) - public VirtualMachineInner get( - String resourceGroupName, String privateCloudName, String clusterName, String virtualMachineId) { + public VirtualMachineInner get(String resourceGroupName, String privateCloudName, String clusterName, + String virtualMachineId) { return getWithResponse(resourceGroupName, privateCloudName, clusterName, virtualMachineId, Context.NONE) .getValue(); } /** * Enable or disable DRS-driven VM movement restriction. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param clusterName Name of the cluster in the private cloud. - * @param virtualMachineId Virtual Machine identifier. - * @param restrictMovement Whether VM DRS-driven movement is restricted (Enabled) or not (Disabled). + * @param clusterName Name of the cluster. + * @param virtualMachineId ID of the virtual machine. + * @param restrictMovement The body type of the operation request. * @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>> restrictMovementWithResponseAsync( - String resourceGroupName, - String privateCloudName, - String clusterName, - String virtualMachineId, + private Mono>> restrictMovementWithResponseAsync(String resourceGroupName, + String privateCloudName, String clusterName, String virtualMachineId, VirtualMachineRestrictMovement restrictMovement) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -562,31 +468,20 @@ private Mono>> restrictMovementWithResponseAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .restrictMovement( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - this.client.getApiVersion(), - privateCloudName, - clusterName, - virtualMachineId, - restrictMovement, - accept, - context)) + .withContext(context -> service.restrictMovement(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, clusterName, virtualMachineId, + restrictMovement, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Enable or disable DRS-driven VM movement restriction. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param clusterName Name of the cluster in the private cloud. - * @param virtualMachineId Virtual Machine identifier. - * @param restrictMovement Whether VM DRS-driven movement is restricted (Enabled) or not (Disabled). + * @param clusterName Name of the cluster. + * @param virtualMachineId ID of the virtual machine. + * @param restrictMovement The body type of the operation request. * @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. @@ -594,24 +489,16 @@ private Mono>> restrictMovementWithResponseAsync( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> restrictMovementWithResponseAsync( - String resourceGroupName, - String privateCloudName, - String clusterName, - String virtualMachineId, - VirtualMachineRestrictMovement restrictMovement, - Context context) { + private Mono>> restrictMovementWithResponseAsync(String resourceGroupName, + String privateCloudName, String clusterName, String virtualMachineId, + VirtualMachineRestrictMovement restrictMovement, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -636,57 +523,42 @@ private Mono>> restrictMovementWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .restrictMovement( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - this.client.getApiVersion(), - privateCloudName, - clusterName, - virtualMachineId, - restrictMovement, - accept, - context); + return service.restrictMovement(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, clusterName, virtualMachineId, + restrictMovement, accept, context); } /** * Enable or disable DRS-driven VM movement restriction. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param clusterName Name of the cluster in the private cloud. - * @param virtualMachineId Virtual Machine identifier. - * @param restrictMovement Whether VM DRS-driven movement is restricted (Enabled) or not (Disabled). + * @param clusterName Name of the cluster. + * @param virtualMachineId ID of the virtual machine. + * @param restrictMovement The body type of the operation request. * @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 long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginRestrictMovementAsync( - String resourceGroupName, - String privateCloudName, - String clusterName, - String virtualMachineId, + private PollerFlux, Void> beginRestrictMovementAsync(String resourceGroupName, + String privateCloudName, String clusterName, String virtualMachineId, VirtualMachineRestrictMovement restrictMovement) { - Mono>> mono = - restrictMovementWithResponseAsync( - resourceGroupName, privateCloudName, clusterName, virtualMachineId, restrictMovement); - return this - .client - .getLroResult( - mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); + Mono>> mono = restrictMovementWithResponseAsync(resourceGroupName, privateCloudName, + clusterName, virtualMachineId, restrictMovement); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); } /** * Enable or disable DRS-driven VM movement restriction. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param clusterName Name of the cluster in the private cloud. - * @param virtualMachineId Virtual Machine identifier. - * @param restrictMovement Whether VM DRS-driven movement is restricted (Enabled) or not (Disabled). + * @param clusterName Name of the cluster. + * @param virtualMachineId ID of the virtual machine. + * @param restrictMovement The body type of the operation request. * @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. @@ -694,56 +566,44 @@ private PollerFlux, Void> beginRestrictMovementAsync( * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginRestrictMovementAsync( - String resourceGroupName, - String privateCloudName, - String clusterName, - String virtualMachineId, - VirtualMachineRestrictMovement restrictMovement, - Context context) { + private PollerFlux, Void> beginRestrictMovementAsync(String resourceGroupName, + String privateCloudName, String clusterName, String virtualMachineId, + VirtualMachineRestrictMovement restrictMovement, Context context) { context = this.client.mergeContext(context); - Mono>> mono = - restrictMovementWithResponseAsync( - resourceGroupName, privateCloudName, clusterName, virtualMachineId, restrictMovement, context); - return this - .client - .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); + Mono>> mono = restrictMovementWithResponseAsync(resourceGroupName, privateCloudName, + clusterName, virtualMachineId, restrictMovement, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + context); } /** * Enable or disable DRS-driven VM movement restriction. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param clusterName Name of the cluster in the private cloud. - * @param virtualMachineId Virtual Machine identifier. - * @param restrictMovement Whether VM DRS-driven movement is restricted (Enabled) or not (Disabled). + * @param clusterName Name of the cluster. + * @param virtualMachineId ID of the virtual machine. + * @param restrictMovement The body type of the operation request. * @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 long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginRestrictMovement( - String resourceGroupName, - String privateCloudName, - String clusterName, - String virtualMachineId, - VirtualMachineRestrictMovement restrictMovement) { - return this - .beginRestrictMovementAsync( - resourceGroupName, privateCloudName, clusterName, virtualMachineId, restrictMovement) - .getSyncPoller(); + public SyncPoller, Void> beginRestrictMovement(String resourceGroupName, String privateCloudName, + String clusterName, String virtualMachineId, VirtualMachineRestrictMovement restrictMovement) { + return this.beginRestrictMovementAsync(resourceGroupName, privateCloudName, clusterName, virtualMachineId, + restrictMovement).getSyncPoller(); } /** * Enable or disable DRS-driven VM movement restriction. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param clusterName Name of the cluster in the private cloud. - * @param virtualMachineId Virtual Machine identifier. - * @param restrictMovement Whether VM DRS-driven movement is restricted (Enabled) or not (Disabled). + * @param clusterName Name of the cluster. + * @param virtualMachineId ID of the virtual machine. + * @param restrictMovement The body type of the operation request. * @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. @@ -751,53 +611,40 @@ public SyncPoller, Void> beginRestrictMovement( * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginRestrictMovement( - String resourceGroupName, - String privateCloudName, - String clusterName, - String virtualMachineId, - VirtualMachineRestrictMovement restrictMovement, - Context context) { - return this - .beginRestrictMovementAsync( - resourceGroupName, privateCloudName, clusterName, virtualMachineId, restrictMovement, context) - .getSyncPoller(); + public SyncPoller, Void> beginRestrictMovement(String resourceGroupName, String privateCloudName, + String clusterName, String virtualMachineId, VirtualMachineRestrictMovement restrictMovement, Context context) { + return this.beginRestrictMovementAsync(resourceGroupName, privateCloudName, clusterName, virtualMachineId, + restrictMovement, context).getSyncPoller(); } /** * Enable or disable DRS-driven VM movement restriction. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param clusterName Name of the cluster in the private cloud. - * @param virtualMachineId Virtual Machine identifier. - * @param restrictMovement Whether VM DRS-driven movement is restricted (Enabled) or not (Disabled). + * @param clusterName Name of the cluster. + * @param virtualMachineId ID of the virtual machine. + * @param restrictMovement The body type of the operation request. * @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 restrictMovementAsync( - String resourceGroupName, - String privateCloudName, - String clusterName, - String virtualMachineId, - VirtualMachineRestrictMovement restrictMovement) { - return beginRestrictMovementAsync( - resourceGroupName, privateCloudName, clusterName, virtualMachineId, restrictMovement) - .last() - .flatMap(this.client::getLroFinalResultOrError); + private Mono restrictMovementAsync(String resourceGroupName, String privateCloudName, String clusterName, + String virtualMachineId, VirtualMachineRestrictMovement restrictMovement) { + return beginRestrictMovementAsync(resourceGroupName, privateCloudName, clusterName, virtualMachineId, + restrictMovement).last().flatMap(this.client::getLroFinalResultOrError); } /** * Enable or disable DRS-driven VM movement restriction. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param clusterName Name of the cluster in the private cloud. - * @param virtualMachineId Virtual Machine identifier. - * @param restrictMovement Whether VM DRS-driven movement is restricted (Enabled) or not (Disabled). + * @param clusterName Name of the cluster. + * @param virtualMachineId ID of the virtual machine. + * @param restrictMovement The body type of the operation request. * @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. @@ -805,77 +652,62 @@ private Mono restrictMovementAsync( * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono restrictMovementAsync( - String resourceGroupName, - String privateCloudName, - String clusterName, - String virtualMachineId, - VirtualMachineRestrictMovement restrictMovement, - Context context) { - return beginRestrictMovementAsync( - resourceGroupName, privateCloudName, clusterName, virtualMachineId, restrictMovement, context) - .last() - .flatMap(this.client::getLroFinalResultOrError); + private Mono restrictMovementAsync(String resourceGroupName, String privateCloudName, String clusterName, + String virtualMachineId, VirtualMachineRestrictMovement restrictMovement, Context context) { + return beginRestrictMovementAsync(resourceGroupName, privateCloudName, clusterName, virtualMachineId, + restrictMovement, context).last().flatMap(this.client::getLroFinalResultOrError); } /** * Enable or disable DRS-driven VM movement restriction. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param clusterName Name of the cluster in the private cloud. - * @param virtualMachineId Virtual Machine identifier. - * @param restrictMovement Whether VM DRS-driven movement is restricted (Enabled) or not (Disabled). + * @param clusterName Name of the cluster. + * @param virtualMachineId ID of the virtual machine. + * @param restrictMovement The body type of the operation request. * @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 restrictMovement( - String resourceGroupName, - String privateCloudName, - String clusterName, - String virtualMachineId, - VirtualMachineRestrictMovement restrictMovement) { + public void restrictMovement(String resourceGroupName, String privateCloudName, String clusterName, + String virtualMachineId, VirtualMachineRestrictMovement restrictMovement) { restrictMovementAsync(resourceGroupName, privateCloudName, clusterName, virtualMachineId, restrictMovement) .block(); } /** * Enable or disable DRS-driven VM movement restriction. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param clusterName Name of the cluster in the private cloud. - * @param virtualMachineId Virtual Machine identifier. - * @param restrictMovement Whether VM DRS-driven movement is restricted (Enabled) or not (Disabled). + * @param clusterName Name of the cluster. + * @param virtualMachineId ID of the virtual machine. + * @param restrictMovement The body type of the operation request. * @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. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void restrictMovement( - String resourceGroupName, - String privateCloudName, - String clusterName, - String virtualMachineId, - VirtualMachineRestrictMovement restrictMovement, - Context context) { - restrictMovementAsync( - resourceGroupName, privateCloudName, clusterName, virtualMachineId, restrictMovement, context) - .block(); + public void restrictMovement(String resourceGroupName, String privateCloudName, String clusterName, + String virtualMachineId, VirtualMachineRestrictMovement restrictMovement, Context context) { + restrictMovementAsync(resourceGroupName, privateCloudName, clusterName, virtualMachineId, restrictMovement, + context).block(); } /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * 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 a list of Virtual Machines along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return the response of a VirtualMachine list operation along with {@link PagedResponse} on successful completion + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink) { @@ -883,36 +715,28 @@ private Mono> listNextSinglePageAsync(String 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.")); + 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.listNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + return FluxUtil.withContext(context -> service.listNext(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 URL to get the next list of items - *

The nextLink parameter. + * + * 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 a list of Virtual Machines along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return the response of a VirtualMachine list operation along with {@link PagedResponse} on successful completion + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink, Context context) { @@ -920,23 +744,13 @@ private Mono> listNextSinglePageAsync(String 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.")); + 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 - .listNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.listNext(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/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/VirtualMachinesImpl.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/VirtualMachinesImpl.java index 12e5bb4e520a6..18c28351151a6 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/VirtualMachinesImpl.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/VirtualMachinesImpl.java @@ -22,50 +22,41 @@ public final class VirtualMachinesImpl implements VirtualMachines { private final com.azure.resourcemanager.avs.AvsManager serviceManager; - public VirtualMachinesImpl( - VirtualMachinesClient innerClient, com.azure.resourcemanager.avs.AvsManager serviceManager) { + public VirtualMachinesImpl(VirtualMachinesClient innerClient, + com.azure.resourcemanager.avs.AvsManager serviceManager) { this.innerClient = innerClient; this.serviceManager = serviceManager; } public PagedIterable list(String resourceGroupName, String privateCloudName, String clusterName) { - PagedIterable inner = - this.serviceClient().list(resourceGroupName, privateCloudName, clusterName); - return Utils.mapPage(inner, inner1 -> new VirtualMachineImpl(inner1, this.manager())); + PagedIterable inner + = this.serviceClient().list(resourceGroupName, privateCloudName, clusterName); + return ResourceManagerUtils.mapPage(inner, inner1 -> new VirtualMachineImpl(inner1, this.manager())); } - public PagedIterable list( - String resourceGroupName, String privateCloudName, String clusterName, Context context) { - PagedIterable inner = - this.serviceClient().list(resourceGroupName, privateCloudName, clusterName, context); - return Utils.mapPage(inner, inner1 -> new VirtualMachineImpl(inner1, this.manager())); + public PagedIterable list(String resourceGroupName, String privateCloudName, String clusterName, + Context context) { + PagedIterable inner + = this.serviceClient().list(resourceGroupName, privateCloudName, clusterName, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new VirtualMachineImpl(inner1, this.manager())); } - public Response getWithResponse( - String resourceGroupName, - String privateCloudName, - String clusterName, - String virtualMachineId, - Context context) { - Response inner = - this - .serviceClient() - .getWithResponse(resourceGroupName, privateCloudName, clusterName, virtualMachineId, context); + public Response getWithResponse(String resourceGroupName, String privateCloudName, + String clusterName, String virtualMachineId, Context context) { + Response inner = this.serviceClient().getWithResponse(resourceGroupName, privateCloudName, + clusterName, virtualMachineId, context); if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), new VirtualMachineImpl(inner.getValue(), this.manager())); } else { return null; } } - public VirtualMachine get( - String resourceGroupName, String privateCloudName, String clusterName, String virtualMachineId) { - VirtualMachineInner inner = - this.serviceClient().get(resourceGroupName, privateCloudName, clusterName, virtualMachineId); + public VirtualMachine get(String resourceGroupName, String privateCloudName, String clusterName, + String virtualMachineId) { + VirtualMachineInner inner + = this.serviceClient().get(resourceGroupName, privateCloudName, clusterName, virtualMachineId); if (inner != null) { return new VirtualMachineImpl(inner, this.manager()); } else { @@ -73,28 +64,16 @@ public VirtualMachine get( } } - public void restrictMovement( - String resourceGroupName, - String privateCloudName, - String clusterName, - String virtualMachineId, - VirtualMachineRestrictMovement restrictMovement) { - this - .serviceClient() - .restrictMovement(resourceGroupName, privateCloudName, clusterName, virtualMachineId, restrictMovement); + public void restrictMovement(String resourceGroupName, String privateCloudName, String clusterName, + String virtualMachineId, VirtualMachineRestrictMovement restrictMovement) { + this.serviceClient().restrictMovement(resourceGroupName, privateCloudName, clusterName, virtualMachineId, + restrictMovement); } - public void restrictMovement( - String resourceGroupName, - String privateCloudName, - String clusterName, - String virtualMachineId, - VirtualMachineRestrictMovement restrictMovement, - Context context) { - this - .serviceClient() - .restrictMovement( - resourceGroupName, privateCloudName, clusterName, virtualMachineId, restrictMovement, context); + public void restrictMovement(String resourceGroupName, String privateCloudName, String clusterName, + String virtualMachineId, VirtualMachineRestrictMovement restrictMovement, Context context) { + this.serviceClient().restrictMovement(resourceGroupName, privateCloudName, clusterName, virtualMachineId, + restrictMovement, context); } private VirtualMachinesClient serviceClient() { diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkDhcpImpl.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkDhcpImpl.java index 58335abd89d75..a4d6f05889c8e 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkDhcpImpl.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkDhcpImpl.java @@ -4,10 +4,13 @@ package com.azure.resourcemanager.avs.implementation; +import com.azure.core.management.SystemData; import com.azure.core.util.Context; import com.azure.resourcemanager.avs.fluent.models.WorkloadNetworkDhcpInner; import com.azure.resourcemanager.avs.models.WorkloadNetworkDhcp; import com.azure.resourcemanager.avs.models.WorkloadNetworkDhcpEntity; +import com.azure.resourcemanager.avs.models.WorkloadNetworkDhcpEntityUpdate; +import com.azure.resourcemanager.avs.models.WorkloadNetworkDhcpUpdate; public final class WorkloadNetworkDhcpImpl implements WorkloadNetworkDhcp, WorkloadNetworkDhcp.Definition, WorkloadNetworkDhcp.Update { @@ -31,6 +34,10 @@ public WorkloadNetworkDhcpEntity properties() { return this.innerModel().properties(); } + public SystemData systemData() { + return this.innerModel().systemData(); + } + public String resourceGroupName() { return resourceGroupName; } @@ -49,6 +56,8 @@ private com.azure.resourcemanager.avs.AvsManager manager() { private String dhcpId; + private WorkloadNetworkDhcpUpdate updateWorkloadNetworkDhcp; + public WorkloadNetworkDhcpImpl withExistingPrivateCloud(String resourceGroupName, String privateCloudName) { this.resourceGroupName = resourceGroupName; this.privateCloudName = privateCloudName; @@ -56,20 +65,14 @@ public WorkloadNetworkDhcpImpl withExistingPrivateCloud(String resourceGroupName } public WorkloadNetworkDhcp create() { - this.innerObject = - serviceManager - .serviceClient() - .getWorkloadNetworks() - .createDhcp(resourceGroupName, privateCloudName, dhcpId, this.innerModel(), Context.NONE); + this.innerObject = serviceManager.serviceClient().getWorkloadNetworks().createDhcp(resourceGroupName, + privateCloudName, dhcpId, this.innerModel(), Context.NONE); return this; } public WorkloadNetworkDhcp create(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getWorkloadNetworks() - .createDhcp(resourceGroupName, privateCloudName, dhcpId, this.innerModel(), context); + this.innerObject = serviceManager.serviceClient().getWorkloadNetworks().createDhcp(resourceGroupName, + privateCloudName, dhcpId, this.innerModel(), context); return this; } @@ -80,53 +83,40 @@ public WorkloadNetworkDhcp create(Context context) { } public WorkloadNetworkDhcpImpl update() { + this.updateWorkloadNetworkDhcp = new WorkloadNetworkDhcpUpdate(); return this; } public WorkloadNetworkDhcp apply() { - this.innerObject = - serviceManager - .serviceClient() - .getWorkloadNetworks() - .updateDhcp(resourceGroupName, privateCloudName, dhcpId, this.innerModel(), Context.NONE); + this.innerObject = serviceManager.serviceClient().getWorkloadNetworks().updateDhcp(resourceGroupName, + privateCloudName, dhcpId, updateWorkloadNetworkDhcp, Context.NONE); return this; } public WorkloadNetworkDhcp apply(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getWorkloadNetworks() - .updateDhcp(resourceGroupName, privateCloudName, dhcpId, this.innerModel(), context); + this.innerObject = serviceManager.serviceClient().getWorkloadNetworks().updateDhcp(resourceGroupName, + privateCloudName, dhcpId, updateWorkloadNetworkDhcp, context); return this; } - WorkloadNetworkDhcpImpl( - WorkloadNetworkDhcpInner innerObject, com.azure.resourcemanager.avs.AvsManager serviceManager) { + WorkloadNetworkDhcpImpl(WorkloadNetworkDhcpInner innerObject, + com.azure.resourcemanager.avs.AvsManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; - this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups"); - this.privateCloudName = Utils.getValueFromIdByName(innerObject.id(), "privateClouds"); - this.dhcpId = Utils.getValueFromIdByName(innerObject.id(), "dhcpConfigurations"); + this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); + this.privateCloudName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "privateClouds"); + this.dhcpId = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "dhcpConfigurations"); } public WorkloadNetworkDhcp refresh() { - this.innerObject = - serviceManager - .serviceClient() - .getWorkloadNetworks() - .getDhcpWithResponse(resourceGroupName, dhcpId, privateCloudName, Context.NONE) - .getValue(); + this.innerObject = serviceManager.serviceClient().getWorkloadNetworks() + .getDhcpWithResponse(resourceGroupName, dhcpId, privateCloudName, Context.NONE).getValue(); return this; } public WorkloadNetworkDhcp refresh(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getWorkloadNetworks() - .getDhcpWithResponse(resourceGroupName, dhcpId, privateCloudName, context) - .getValue(); + this.innerObject = serviceManager.serviceClient().getWorkloadNetworks() + .getDhcpWithResponse(resourceGroupName, dhcpId, privateCloudName, context).getValue(); return this; } @@ -134,4 +124,9 @@ public WorkloadNetworkDhcpImpl withProperties(WorkloadNetworkDhcpEntity properti this.innerModel().withProperties(properties); return this; } + + public WorkloadNetworkDhcpImpl withProperties(WorkloadNetworkDhcpEntityUpdate properties) { + this.updateWorkloadNetworkDhcp.withProperties(properties); + return this; + } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkDnsServiceImpl.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkDnsServiceImpl.java index 895afaf8bff5b..c68c070f74787 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkDnsServiceImpl.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkDnsServiceImpl.java @@ -4,12 +4,14 @@ package com.azure.resourcemanager.avs.implementation; +import com.azure.core.management.SystemData; import com.azure.core.util.Context; import com.azure.resourcemanager.avs.fluent.models.WorkloadNetworkDnsServiceInner; import com.azure.resourcemanager.avs.models.DnsServiceLogLevelEnum; import com.azure.resourcemanager.avs.models.DnsServiceStatusEnum; import com.azure.resourcemanager.avs.models.WorkloadNetworkDnsService; import com.azure.resourcemanager.avs.models.WorkloadNetworkDnsServiceProvisioningState; +import com.azure.resourcemanager.avs.models.WorkloadNetworkDnsServiceUpdate; import java.util.Collections; import java.util.List; @@ -31,6 +33,10 @@ public String type() { return this.innerModel().type(); } + public SystemData systemData() { + return this.innerModel().systemData(); + } + public String displayName() { return this.innerModel().displayName(); } @@ -86,6 +92,8 @@ private com.azure.resourcemanager.avs.AvsManager manager() { private String dnsServiceId; + private WorkloadNetworkDnsServiceUpdate updateWorkloadNetworkDnsService; + public WorkloadNetworkDnsServiceImpl withExistingPrivateCloud(String resourceGroupName, String privateCloudName) { this.resourceGroupName = resourceGroupName; this.privateCloudName = privateCloudName; @@ -93,20 +101,14 @@ public WorkloadNetworkDnsServiceImpl withExistingPrivateCloud(String resourceGro } public WorkloadNetworkDnsService create() { - this.innerObject = - serviceManager - .serviceClient() - .getWorkloadNetworks() - .createDnsService(resourceGroupName, privateCloudName, dnsServiceId, this.innerModel(), Context.NONE); + this.innerObject = serviceManager.serviceClient().getWorkloadNetworks().createDnsService(resourceGroupName, + privateCloudName, dnsServiceId, this.innerModel(), Context.NONE); return this; } public WorkloadNetworkDnsService create(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getWorkloadNetworks() - .createDnsService(resourceGroupName, privateCloudName, dnsServiceId, this.innerModel(), context); + this.innerObject = serviceManager.serviceClient().getWorkloadNetworks().createDnsService(resourceGroupName, + privateCloudName, dnsServiceId, this.innerModel(), context); return this; } @@ -117,83 +119,104 @@ public WorkloadNetworkDnsService create(Context context) { } public WorkloadNetworkDnsServiceImpl update() { + this.updateWorkloadNetworkDnsService = new WorkloadNetworkDnsServiceUpdate(); return this; } public WorkloadNetworkDnsService apply() { - this.innerObject = - serviceManager - .serviceClient() - .getWorkloadNetworks() - .updateDnsService(resourceGroupName, privateCloudName, dnsServiceId, this.innerModel(), Context.NONE); + this.innerObject = serviceManager.serviceClient().getWorkloadNetworks().updateDnsService(resourceGroupName, + privateCloudName, dnsServiceId, updateWorkloadNetworkDnsService, Context.NONE); return this; } public WorkloadNetworkDnsService apply(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getWorkloadNetworks() - .updateDnsService(resourceGroupName, privateCloudName, dnsServiceId, this.innerModel(), context); + this.innerObject = serviceManager.serviceClient().getWorkloadNetworks().updateDnsService(resourceGroupName, + privateCloudName, dnsServiceId, updateWorkloadNetworkDnsService, context); return this; } - WorkloadNetworkDnsServiceImpl( - WorkloadNetworkDnsServiceInner innerObject, com.azure.resourcemanager.avs.AvsManager serviceManager) { + WorkloadNetworkDnsServiceImpl(WorkloadNetworkDnsServiceInner innerObject, + com.azure.resourcemanager.avs.AvsManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; - this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups"); - this.privateCloudName = Utils.getValueFromIdByName(innerObject.id(), "privateClouds"); - this.dnsServiceId = Utils.getValueFromIdByName(innerObject.id(), "dnsServices"); + this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); + this.privateCloudName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "privateClouds"); + this.dnsServiceId = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "dnsServices"); } public WorkloadNetworkDnsService refresh() { - this.innerObject = - serviceManager - .serviceClient() - .getWorkloadNetworks() - .getDnsServiceWithResponse(resourceGroupName, privateCloudName, dnsServiceId, Context.NONE) - .getValue(); + this.innerObject = serviceManager.serviceClient().getWorkloadNetworks() + .getDnsServiceWithResponse(resourceGroupName, privateCloudName, dnsServiceId, Context.NONE).getValue(); return this; } public WorkloadNetworkDnsService refresh(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getWorkloadNetworks() - .getDnsServiceWithResponse(resourceGroupName, privateCloudName, dnsServiceId, context) - .getValue(); + this.innerObject = serviceManager.serviceClient().getWorkloadNetworks() + .getDnsServiceWithResponse(resourceGroupName, privateCloudName, dnsServiceId, context).getValue(); return this; } public WorkloadNetworkDnsServiceImpl withDisplayName(String displayName) { - this.innerModel().withDisplayName(displayName); - return this; + if (isInCreateMode()) { + this.innerModel().withDisplayName(displayName); + return this; + } else { + this.updateWorkloadNetworkDnsService.withDisplayName(displayName); + return this; + } } public WorkloadNetworkDnsServiceImpl withDnsServiceIp(String dnsServiceIp) { - this.innerModel().withDnsServiceIp(dnsServiceIp); - return this; + if (isInCreateMode()) { + this.innerModel().withDnsServiceIp(dnsServiceIp); + return this; + } else { + this.updateWorkloadNetworkDnsService.withDnsServiceIp(dnsServiceIp); + return this; + } } public WorkloadNetworkDnsServiceImpl withDefaultDnsZone(String defaultDnsZone) { - this.innerModel().withDefaultDnsZone(defaultDnsZone); - return this; + if (isInCreateMode()) { + this.innerModel().withDefaultDnsZone(defaultDnsZone); + return this; + } else { + this.updateWorkloadNetworkDnsService.withDefaultDnsZone(defaultDnsZone); + return this; + } } public WorkloadNetworkDnsServiceImpl withFqdnZones(List fqdnZones) { - this.innerModel().withFqdnZones(fqdnZones); - return this; + if (isInCreateMode()) { + this.innerModel().withFqdnZones(fqdnZones); + return this; + } else { + this.updateWorkloadNetworkDnsService.withFqdnZones(fqdnZones); + return this; + } } public WorkloadNetworkDnsServiceImpl withLogLevel(DnsServiceLogLevelEnum logLevel) { - this.innerModel().withLogLevel(logLevel); - return this; + if (isInCreateMode()) { + this.innerModel().withLogLevel(logLevel); + return this; + } else { + this.updateWorkloadNetworkDnsService.withLogLevel(logLevel); + return this; + } } public WorkloadNetworkDnsServiceImpl withRevision(Long revision) { - this.innerModel().withRevision(revision); - return this; + if (isInCreateMode()) { + this.innerModel().withRevision(revision); + return this; + } else { + this.updateWorkloadNetworkDnsService.withRevision(revision); + return this; + } + } + + private boolean isInCreateMode() { + return this.innerModel().id() == null; } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkDnsZoneImpl.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkDnsZoneImpl.java index f74b0b96cd387..3f5cf9ad4c4b1 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkDnsZoneImpl.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkDnsZoneImpl.java @@ -4,10 +4,12 @@ package com.azure.resourcemanager.avs.implementation; +import com.azure.core.management.SystemData; import com.azure.core.util.Context; import com.azure.resourcemanager.avs.fluent.models.WorkloadNetworkDnsZoneInner; import com.azure.resourcemanager.avs.models.WorkloadNetworkDnsZone; import com.azure.resourcemanager.avs.models.WorkloadNetworkDnsZoneProvisioningState; +import com.azure.resourcemanager.avs.models.WorkloadNetworkDnsZoneUpdate; import java.util.Collections; import java.util.List; @@ -29,6 +31,10 @@ public String type() { return this.innerModel().type(); } + public SystemData systemData() { + return this.innerModel().systemData(); + } + public String displayName() { return this.innerModel().displayName(); } @@ -55,7 +61,7 @@ public String sourceIp() { return this.innerModel().sourceIp(); } - public Long dnsServices() { + public Integer dnsServices() { return this.innerModel().dnsServices(); } @@ -85,6 +91,8 @@ private com.azure.resourcemanager.avs.AvsManager manager() { private String dnsZoneId; + private WorkloadNetworkDnsZoneUpdate updateWorkloadNetworkDnsZone; + public WorkloadNetworkDnsZoneImpl withExistingPrivateCloud(String resourceGroupName, String privateCloudName) { this.resourceGroupName = resourceGroupName; this.privateCloudName = privateCloudName; @@ -92,20 +100,14 @@ public WorkloadNetworkDnsZoneImpl withExistingPrivateCloud(String resourceGroupN } public WorkloadNetworkDnsZone create() { - this.innerObject = - serviceManager - .serviceClient() - .getWorkloadNetworks() - .createDnsZone(resourceGroupName, privateCloudName, dnsZoneId, this.innerModel(), Context.NONE); + this.innerObject = serviceManager.serviceClient().getWorkloadNetworks().createDnsZone(resourceGroupName, + privateCloudName, dnsZoneId, this.innerModel(), Context.NONE); return this; } public WorkloadNetworkDnsZone create(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getWorkloadNetworks() - .createDnsZone(resourceGroupName, privateCloudName, dnsZoneId, this.innerModel(), context); + this.innerObject = serviceManager.serviceClient().getWorkloadNetworks().createDnsZone(resourceGroupName, + privateCloudName, dnsZoneId, this.innerModel(), context); return this; } @@ -116,83 +118,104 @@ public WorkloadNetworkDnsZone create(Context context) { } public WorkloadNetworkDnsZoneImpl update() { + this.updateWorkloadNetworkDnsZone = new WorkloadNetworkDnsZoneUpdate(); return this; } public WorkloadNetworkDnsZone apply() { - this.innerObject = - serviceManager - .serviceClient() - .getWorkloadNetworks() - .updateDnsZone(resourceGroupName, privateCloudName, dnsZoneId, this.innerModel(), Context.NONE); + this.innerObject = serviceManager.serviceClient().getWorkloadNetworks().updateDnsZone(resourceGroupName, + privateCloudName, dnsZoneId, updateWorkloadNetworkDnsZone, Context.NONE); return this; } public WorkloadNetworkDnsZone apply(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getWorkloadNetworks() - .updateDnsZone(resourceGroupName, privateCloudName, dnsZoneId, this.innerModel(), context); + this.innerObject = serviceManager.serviceClient().getWorkloadNetworks().updateDnsZone(resourceGroupName, + privateCloudName, dnsZoneId, updateWorkloadNetworkDnsZone, context); return this; } - WorkloadNetworkDnsZoneImpl( - WorkloadNetworkDnsZoneInner innerObject, com.azure.resourcemanager.avs.AvsManager serviceManager) { + WorkloadNetworkDnsZoneImpl(WorkloadNetworkDnsZoneInner innerObject, + com.azure.resourcemanager.avs.AvsManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; - this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups"); - this.privateCloudName = Utils.getValueFromIdByName(innerObject.id(), "privateClouds"); - this.dnsZoneId = Utils.getValueFromIdByName(innerObject.id(), "dnsZones"); + this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); + this.privateCloudName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "privateClouds"); + this.dnsZoneId = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "dnsZones"); } public WorkloadNetworkDnsZone refresh() { - this.innerObject = - serviceManager - .serviceClient() - .getWorkloadNetworks() - .getDnsZoneWithResponse(resourceGroupName, privateCloudName, dnsZoneId, Context.NONE) - .getValue(); + this.innerObject = serviceManager.serviceClient().getWorkloadNetworks() + .getDnsZoneWithResponse(resourceGroupName, privateCloudName, dnsZoneId, Context.NONE).getValue(); return this; } public WorkloadNetworkDnsZone refresh(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getWorkloadNetworks() - .getDnsZoneWithResponse(resourceGroupName, privateCloudName, dnsZoneId, context) - .getValue(); + this.innerObject = serviceManager.serviceClient().getWorkloadNetworks() + .getDnsZoneWithResponse(resourceGroupName, privateCloudName, dnsZoneId, context).getValue(); return this; } public WorkloadNetworkDnsZoneImpl withDisplayName(String displayName) { - this.innerModel().withDisplayName(displayName); - return this; + if (isInCreateMode()) { + this.innerModel().withDisplayName(displayName); + return this; + } else { + this.updateWorkloadNetworkDnsZone.withDisplayName(displayName); + return this; + } } public WorkloadNetworkDnsZoneImpl withDomain(List domain) { - this.innerModel().withDomain(domain); - return this; + if (isInCreateMode()) { + this.innerModel().withDomain(domain); + return this; + } else { + this.updateWorkloadNetworkDnsZone.withDomain(domain); + return this; + } } public WorkloadNetworkDnsZoneImpl withDnsServerIps(List dnsServerIps) { - this.innerModel().withDnsServerIps(dnsServerIps); - return this; + if (isInCreateMode()) { + this.innerModel().withDnsServerIps(dnsServerIps); + return this; + } else { + this.updateWorkloadNetworkDnsZone.withDnsServerIps(dnsServerIps); + return this; + } } public WorkloadNetworkDnsZoneImpl withSourceIp(String sourceIp) { - this.innerModel().withSourceIp(sourceIp); - return this; + if (isInCreateMode()) { + this.innerModel().withSourceIp(sourceIp); + return this; + } else { + this.updateWorkloadNetworkDnsZone.withSourceIp(sourceIp); + return this; + } } - public WorkloadNetworkDnsZoneImpl withDnsServices(Long dnsServices) { - this.innerModel().withDnsServices(dnsServices); - return this; + public WorkloadNetworkDnsZoneImpl withDnsServices(Integer dnsServices) { + if (isInCreateMode()) { + this.innerModel().withDnsServices(dnsServices); + return this; + } else { + this.updateWorkloadNetworkDnsZone.withDnsServices(dnsServices); + return this; + } } public WorkloadNetworkDnsZoneImpl withRevision(Long revision) { - this.innerModel().withRevision(revision); - return this; + if (isInCreateMode()) { + this.innerModel().withRevision(revision); + return this; + } else { + this.updateWorkloadNetworkDnsZone.withRevision(revision); + return this; + } + } + + private boolean isInCreateMode() { + return this.innerModel().id() == null; } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkGatewayImpl.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkGatewayImpl.java index 247cb47681549..55de480046ca9 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkGatewayImpl.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkGatewayImpl.java @@ -4,16 +4,18 @@ package com.azure.resourcemanager.avs.implementation; +import com.azure.core.management.SystemData; import com.azure.resourcemanager.avs.fluent.models.WorkloadNetworkGatewayInner; import com.azure.resourcemanager.avs.models.WorkloadNetworkGateway; +import com.azure.resourcemanager.avs.models.WorkloadNetworkProvisioningState; public final class WorkloadNetworkGatewayImpl implements WorkloadNetworkGateway { private WorkloadNetworkGatewayInner innerObject; private final com.azure.resourcemanager.avs.AvsManager serviceManager; - WorkloadNetworkGatewayImpl( - WorkloadNetworkGatewayInner innerObject, com.azure.resourcemanager.avs.AvsManager serviceManager) { + WorkloadNetworkGatewayImpl(WorkloadNetworkGatewayInner innerObject, + com.azure.resourcemanager.avs.AvsManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; } @@ -30,6 +32,14 @@ public String type() { return this.innerModel().type(); } + public SystemData systemData() { + return this.innerModel().systemData(); + } + + public WorkloadNetworkProvisioningState provisioningState() { + return this.innerModel().provisioningState(); + } + public String displayName() { return this.innerModel().displayName(); } diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkImpl.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkImpl.java index 1e66a40f2999a..fef141164276e 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkImpl.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkImpl.java @@ -4,8 +4,10 @@ package com.azure.resourcemanager.avs.implementation; +import com.azure.core.management.SystemData; import com.azure.resourcemanager.avs.fluent.models.WorkloadNetworkInner; import com.azure.resourcemanager.avs.models.WorkloadNetwork; +import com.azure.resourcemanager.avs.models.WorkloadNetworkProvisioningState; public final class WorkloadNetworkImpl implements WorkloadNetwork { private WorkloadNetworkInner innerObject; @@ -29,6 +31,14 @@ public String type() { return this.innerModel().type(); } + public SystemData systemData() { + return this.innerModel().systemData(); + } + + public WorkloadNetworkProvisioningState provisioningState() { + return this.innerModel().provisioningState(); + } + public WorkloadNetworkInner innerModel() { return this.innerObject; } diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkPortMirroringImpl.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkPortMirroringImpl.java index e9195066f1158..224ea56e6102c 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkPortMirroringImpl.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkPortMirroringImpl.java @@ -4,17 +4,17 @@ package com.azure.resourcemanager.avs.implementation; +import com.azure.core.management.SystemData; import com.azure.core.util.Context; import com.azure.resourcemanager.avs.fluent.models.WorkloadNetworkPortMirroringInner; import com.azure.resourcemanager.avs.models.PortMirroringDirectionEnum; import com.azure.resourcemanager.avs.models.PortMirroringStatusEnum; import com.azure.resourcemanager.avs.models.WorkloadNetworkPortMirroring; import com.azure.resourcemanager.avs.models.WorkloadNetworkPortMirroringProvisioningState; +import com.azure.resourcemanager.avs.models.WorkloadNetworkPortMirroringUpdate; -public final class WorkloadNetworkPortMirroringImpl - implements WorkloadNetworkPortMirroring, - WorkloadNetworkPortMirroring.Definition, - WorkloadNetworkPortMirroring.Update { +public final class WorkloadNetworkPortMirroringImpl implements WorkloadNetworkPortMirroring, + WorkloadNetworkPortMirroring.Definition, WorkloadNetworkPortMirroring.Update { private WorkloadNetworkPortMirroringInner innerObject; private final com.azure.resourcemanager.avs.AvsManager serviceManager; @@ -31,6 +31,10 @@ public String type() { return this.innerModel().type(); } + public SystemData systemData() { + return this.innerModel().systemData(); + } + public String displayName() { return this.innerModel().displayName(); } @@ -77,29 +81,24 @@ private com.azure.resourcemanager.avs.AvsManager manager() { private String portMirroringId; - public WorkloadNetworkPortMirroringImpl withExistingPrivateCloud( - String resourceGroupName, String privateCloudName) { + private WorkloadNetworkPortMirroringUpdate updateWorkloadNetworkPortMirroring; + + public WorkloadNetworkPortMirroringImpl withExistingPrivateCloud(String resourceGroupName, + String privateCloudName) { this.resourceGroupName = resourceGroupName; this.privateCloudName = privateCloudName; return this; } public WorkloadNetworkPortMirroring create() { - this.innerObject = - serviceManager - .serviceClient() - .getWorkloadNetworks() - .createPortMirroring( - resourceGroupName, privateCloudName, portMirroringId, this.innerModel(), Context.NONE); + this.innerObject = serviceManager.serviceClient().getWorkloadNetworks().createPortMirroring(resourceGroupName, + privateCloudName, portMirroringId, this.innerModel(), Context.NONE); return this; } public WorkloadNetworkPortMirroring create(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getWorkloadNetworks() - .createPortMirroring(resourceGroupName, privateCloudName, portMirroringId, this.innerModel(), context); + this.innerObject = serviceManager.serviceClient().getWorkloadNetworks().createPortMirroring(resourceGroupName, + privateCloudName, portMirroringId, this.innerModel(), context); return this; } @@ -110,79 +109,95 @@ public WorkloadNetworkPortMirroring create(Context context) { } public WorkloadNetworkPortMirroringImpl update() { + this.updateWorkloadNetworkPortMirroring = new WorkloadNetworkPortMirroringUpdate(); return this; } public WorkloadNetworkPortMirroring apply() { - this.innerObject = - serviceManager - .serviceClient() - .getWorkloadNetworks() - .updatePortMirroring( - resourceGroupName, privateCloudName, portMirroringId, this.innerModel(), Context.NONE); + this.innerObject = serviceManager.serviceClient().getWorkloadNetworks().updatePortMirroring(resourceGroupName, + privateCloudName, portMirroringId, updateWorkloadNetworkPortMirroring, Context.NONE); return this; } public WorkloadNetworkPortMirroring apply(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getWorkloadNetworks() - .updatePortMirroring(resourceGroupName, privateCloudName, portMirroringId, this.innerModel(), context); + this.innerObject = serviceManager.serviceClient().getWorkloadNetworks().updatePortMirroring(resourceGroupName, + privateCloudName, portMirroringId, updateWorkloadNetworkPortMirroring, context); return this; } - WorkloadNetworkPortMirroringImpl( - WorkloadNetworkPortMirroringInner innerObject, com.azure.resourcemanager.avs.AvsManager serviceManager) { + WorkloadNetworkPortMirroringImpl(WorkloadNetworkPortMirroringInner innerObject, + com.azure.resourcemanager.avs.AvsManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; - this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups"); - this.privateCloudName = Utils.getValueFromIdByName(innerObject.id(), "privateClouds"); - this.portMirroringId = Utils.getValueFromIdByName(innerObject.id(), "portMirroringProfiles"); + this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); + this.privateCloudName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "privateClouds"); + this.portMirroringId = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "portMirroringProfiles"); } public WorkloadNetworkPortMirroring refresh() { - this.innerObject = - serviceManager - .serviceClient() - .getWorkloadNetworks() - .getPortMirroringWithResponse(resourceGroupName, privateCloudName, portMirroringId, Context.NONE) - .getValue(); + this.innerObject = serviceManager.serviceClient().getWorkloadNetworks() + .getPortMirroringWithResponse(resourceGroupName, privateCloudName, portMirroringId, Context.NONE) + .getValue(); return this; } public WorkloadNetworkPortMirroring refresh(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getWorkloadNetworks() - .getPortMirroringWithResponse(resourceGroupName, privateCloudName, portMirroringId, context) - .getValue(); + this.innerObject = serviceManager.serviceClient().getWorkloadNetworks() + .getPortMirroringWithResponse(resourceGroupName, privateCloudName, portMirroringId, context).getValue(); return this; } public WorkloadNetworkPortMirroringImpl withDisplayName(String displayName) { - this.innerModel().withDisplayName(displayName); - return this; + if (isInCreateMode()) { + this.innerModel().withDisplayName(displayName); + return this; + } else { + this.updateWorkloadNetworkPortMirroring.withDisplayName(displayName); + return this; + } } public WorkloadNetworkPortMirroringImpl withDirection(PortMirroringDirectionEnum direction) { - this.innerModel().withDirection(direction); - return this; + if (isInCreateMode()) { + this.innerModel().withDirection(direction); + return this; + } else { + this.updateWorkloadNetworkPortMirroring.withDirection(direction); + return this; + } } public WorkloadNetworkPortMirroringImpl withSource(String source) { - this.innerModel().withSource(source); - return this; + if (isInCreateMode()) { + this.innerModel().withSource(source); + return this; + } else { + this.updateWorkloadNetworkPortMirroring.withSource(source); + return this; + } } public WorkloadNetworkPortMirroringImpl withDestination(String destination) { - this.innerModel().withDestination(destination); - return this; + if (isInCreateMode()) { + this.innerModel().withDestination(destination); + return this; + } else { + this.updateWorkloadNetworkPortMirroring.withDestination(destination); + return this; + } } public WorkloadNetworkPortMirroringImpl withRevision(Long revision) { - this.innerModel().withRevision(revision); - return this; + if (isInCreateMode()) { + this.innerModel().withRevision(revision); + return this; + } else { + this.updateWorkloadNetworkPortMirroring.withRevision(revision); + return this; + } + } + + private boolean isInCreateMode() { + return this.innerModel().id() == null; } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkPublicIpImpl.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkPublicIpImpl.java index 705f280d41973..4888a11c79a44 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkPublicIpImpl.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkPublicIpImpl.java @@ -4,6 +4,7 @@ package com.azure.resourcemanager.avs.implementation; +import com.azure.core.management.SystemData; import com.azure.core.util.Context; import com.azure.resourcemanager.avs.fluent.models.WorkloadNetworkPublicIpInner; import com.azure.resourcemanager.avs.models.WorkloadNetworkPublicIp; @@ -14,8 +15,8 @@ public final class WorkloadNetworkPublicIpImpl implements WorkloadNetworkPublicI private final com.azure.resourcemanager.avs.AvsManager serviceManager; - WorkloadNetworkPublicIpImpl( - WorkloadNetworkPublicIpInner innerObject, com.azure.resourcemanager.avs.AvsManager serviceManager) { + WorkloadNetworkPublicIpImpl(WorkloadNetworkPublicIpInner innerObject, + com.azure.resourcemanager.avs.AvsManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; } @@ -32,6 +33,10 @@ public String type() { return this.innerModel().type(); } + public SystemData systemData() { + return this.innerModel().systemData(); + } + public String displayName() { return this.innerModel().displayName(); } @@ -69,20 +74,14 @@ public WorkloadNetworkPublicIpImpl withExistingPrivateCloud(String resourceGroup } public WorkloadNetworkPublicIp create() { - this.innerObject = - serviceManager - .serviceClient() - .getWorkloadNetworks() - .createPublicIp(resourceGroupName, privateCloudName, publicIpId, this.innerModel(), Context.NONE); + this.innerObject = serviceManager.serviceClient().getWorkloadNetworks().createPublicIp(resourceGroupName, + privateCloudName, publicIpId, this.innerModel(), Context.NONE); return this; } public WorkloadNetworkPublicIp create(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getWorkloadNetworks() - .createPublicIp(resourceGroupName, privateCloudName, publicIpId, this.innerModel(), context); + this.innerObject = serviceManager.serviceClient().getWorkloadNetworks().createPublicIp(resourceGroupName, + privateCloudName, publicIpId, this.innerModel(), context); return this; } @@ -93,22 +92,14 @@ public WorkloadNetworkPublicIp create(Context context) { } public WorkloadNetworkPublicIp refresh() { - this.innerObject = - serviceManager - .serviceClient() - .getWorkloadNetworks() - .getPublicIpWithResponse(resourceGroupName, privateCloudName, publicIpId, Context.NONE) - .getValue(); + this.innerObject = serviceManager.serviceClient().getWorkloadNetworks() + .getPublicIpWithResponse(resourceGroupName, privateCloudName, publicIpId, Context.NONE).getValue(); return this; } public WorkloadNetworkPublicIp refresh(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getWorkloadNetworks() - .getPublicIpWithResponse(resourceGroupName, privateCloudName, publicIpId, context) - .getValue(); + this.innerObject = serviceManager.serviceClient().getWorkloadNetworks() + .getPublicIpWithResponse(resourceGroupName, privateCloudName, publicIpId, context).getValue(); return this; } diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkSegmentImpl.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkSegmentImpl.java index 51469b95435c6..ba237835c5d56 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkSegmentImpl.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkSegmentImpl.java @@ -4,6 +4,7 @@ package com.azure.resourcemanager.avs.implementation; +import com.azure.core.management.SystemData; import com.azure.core.util.Context; import com.azure.resourcemanager.avs.fluent.models.WorkloadNetworkSegmentInner; import com.azure.resourcemanager.avs.models.SegmentStatusEnum; @@ -11,6 +12,7 @@ import com.azure.resourcemanager.avs.models.WorkloadNetworkSegmentPortVif; import com.azure.resourcemanager.avs.models.WorkloadNetworkSegmentProvisioningState; import com.azure.resourcemanager.avs.models.WorkloadNetworkSegmentSubnet; +import com.azure.resourcemanager.avs.models.WorkloadNetworkSegmentUpdate; import java.util.Collections; import java.util.List; @@ -32,6 +34,10 @@ public String type() { return this.innerModel().type(); } + public SystemData systemData() { + return this.innerModel().systemData(); + } + public String displayName() { return this.innerModel().displayName(); } @@ -83,6 +89,8 @@ private com.azure.resourcemanager.avs.AvsManager manager() { private String segmentId; + private WorkloadNetworkSegmentUpdate updateWorkloadNetworkSegment; + public WorkloadNetworkSegmentImpl withExistingPrivateCloud(String resourceGroupName, String privateCloudName) { this.resourceGroupName = resourceGroupName; this.privateCloudName = privateCloudName; @@ -90,20 +98,14 @@ public WorkloadNetworkSegmentImpl withExistingPrivateCloud(String resourceGroupN } public WorkloadNetworkSegment create() { - this.innerObject = - serviceManager - .serviceClient() - .getWorkloadNetworks() - .createSegments(resourceGroupName, privateCloudName, segmentId, this.innerModel(), Context.NONE); + this.innerObject = serviceManager.serviceClient().getWorkloadNetworks().createSegments(resourceGroupName, + privateCloudName, segmentId, this.innerModel(), Context.NONE); return this; } public WorkloadNetworkSegment create(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getWorkloadNetworks() - .createSegments(resourceGroupName, privateCloudName, segmentId, this.innerModel(), context); + this.innerObject = serviceManager.serviceClient().getWorkloadNetworks().createSegments(resourceGroupName, + privateCloudName, segmentId, this.innerModel(), context); return this; } @@ -114,73 +116,84 @@ public WorkloadNetworkSegment create(Context context) { } public WorkloadNetworkSegmentImpl update() { + this.updateWorkloadNetworkSegment = new WorkloadNetworkSegmentUpdate(); return this; } public WorkloadNetworkSegment apply() { - this.innerObject = - serviceManager - .serviceClient() - .getWorkloadNetworks() - .updateSegments(resourceGroupName, privateCloudName, segmentId, this.innerModel(), Context.NONE); + this.innerObject = serviceManager.serviceClient().getWorkloadNetworks().updateSegments(resourceGroupName, + privateCloudName, segmentId, updateWorkloadNetworkSegment, Context.NONE); return this; } public WorkloadNetworkSegment apply(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getWorkloadNetworks() - .updateSegments(resourceGroupName, privateCloudName, segmentId, this.innerModel(), context); + this.innerObject = serviceManager.serviceClient().getWorkloadNetworks().updateSegments(resourceGroupName, + privateCloudName, segmentId, updateWorkloadNetworkSegment, context); return this; } - WorkloadNetworkSegmentImpl( - WorkloadNetworkSegmentInner innerObject, com.azure.resourcemanager.avs.AvsManager serviceManager) { + WorkloadNetworkSegmentImpl(WorkloadNetworkSegmentInner innerObject, + com.azure.resourcemanager.avs.AvsManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; - this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups"); - this.privateCloudName = Utils.getValueFromIdByName(innerObject.id(), "privateClouds"); - this.segmentId = Utils.getValueFromIdByName(innerObject.id(), "segments"); + this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); + this.privateCloudName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "privateClouds"); + this.segmentId = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "segments"); } public WorkloadNetworkSegment refresh() { - this.innerObject = - serviceManager - .serviceClient() - .getWorkloadNetworks() - .getSegmentWithResponse(resourceGroupName, privateCloudName, segmentId, Context.NONE) - .getValue(); + this.innerObject = serviceManager.serviceClient().getWorkloadNetworks() + .getSegmentWithResponse(resourceGroupName, privateCloudName, segmentId, Context.NONE).getValue(); return this; } public WorkloadNetworkSegment refresh(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getWorkloadNetworks() - .getSegmentWithResponse(resourceGroupName, privateCloudName, segmentId, context) - .getValue(); + this.innerObject = serviceManager.serviceClient().getWorkloadNetworks() + .getSegmentWithResponse(resourceGroupName, privateCloudName, segmentId, context).getValue(); return this; } public WorkloadNetworkSegmentImpl withDisplayName(String displayName) { - this.innerModel().withDisplayName(displayName); - return this; + if (isInCreateMode()) { + this.innerModel().withDisplayName(displayName); + return this; + } else { + this.updateWorkloadNetworkSegment.withDisplayName(displayName); + return this; + } } public WorkloadNetworkSegmentImpl withConnectedGateway(String connectedGateway) { - this.innerModel().withConnectedGateway(connectedGateway); - return this; + if (isInCreateMode()) { + this.innerModel().withConnectedGateway(connectedGateway); + return this; + } else { + this.updateWorkloadNetworkSegment.withConnectedGateway(connectedGateway); + return this; + } } public WorkloadNetworkSegmentImpl withSubnet(WorkloadNetworkSegmentSubnet subnet) { - this.innerModel().withSubnet(subnet); - return this; + if (isInCreateMode()) { + this.innerModel().withSubnet(subnet); + return this; + } else { + this.updateWorkloadNetworkSegment.withSubnet(subnet); + return this; + } } public WorkloadNetworkSegmentImpl withRevision(Long revision) { - this.innerModel().withRevision(revision); - return this; + if (isInCreateMode()) { + this.innerModel().withRevision(revision); + return this; + } else { + this.updateWorkloadNetworkSegment.withRevision(revision); + return this; + } + } + + private boolean isInCreateMode() { + return this.innerModel().id() == null; } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkVMGroupImpl.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkVMGroupImpl.java index 14b1f2f8e1b19..c0e9efb3a2ada 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkVMGroupImpl.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkVMGroupImpl.java @@ -4,11 +4,13 @@ package com.azure.resourcemanager.avs.implementation; +import com.azure.core.management.SystemData; import com.azure.core.util.Context; import com.azure.resourcemanager.avs.fluent.models.WorkloadNetworkVMGroupInner; import com.azure.resourcemanager.avs.models.VMGroupStatusEnum; import com.azure.resourcemanager.avs.models.WorkloadNetworkVMGroup; import com.azure.resourcemanager.avs.models.WorkloadNetworkVMGroupProvisioningState; +import com.azure.resourcemanager.avs.models.WorkloadNetworkVMGroupUpdate; import java.util.Collections; import java.util.List; @@ -30,6 +32,10 @@ public String type() { return this.innerModel().type(); } + public SystemData systemData() { + return this.innerModel().systemData(); + } + public String displayName() { return this.innerModel().displayName(); } @@ -73,6 +79,8 @@ private com.azure.resourcemanager.avs.AvsManager manager() { private String vmGroupId; + private WorkloadNetworkVMGroupUpdate updateWorkloadNetworkVMGroup; + public WorkloadNetworkVMGroupImpl withExistingPrivateCloud(String resourceGroupName, String privateCloudName) { this.resourceGroupName = resourceGroupName; this.privateCloudName = privateCloudName; @@ -80,20 +88,14 @@ public WorkloadNetworkVMGroupImpl withExistingPrivateCloud(String resourceGroupN } public WorkloadNetworkVMGroup create() { - this.innerObject = - serviceManager - .serviceClient() - .getWorkloadNetworks() - .createVMGroup(resourceGroupName, privateCloudName, vmGroupId, this.innerModel(), Context.NONE); + this.innerObject = serviceManager.serviceClient().getWorkloadNetworks().createVMGroup(resourceGroupName, + privateCloudName, vmGroupId, this.innerModel(), Context.NONE); return this; } public WorkloadNetworkVMGroup create(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getWorkloadNetworks() - .createVMGroup(resourceGroupName, privateCloudName, vmGroupId, this.innerModel(), context); + this.innerObject = serviceManager.serviceClient().getWorkloadNetworks().createVMGroup(resourceGroupName, + privateCloudName, vmGroupId, this.innerModel(), context); return this; } @@ -104,68 +106,74 @@ public WorkloadNetworkVMGroup create(Context context) { } public WorkloadNetworkVMGroupImpl update() { + this.updateWorkloadNetworkVMGroup = new WorkloadNetworkVMGroupUpdate(); return this; } public WorkloadNetworkVMGroup apply() { - this.innerObject = - serviceManager - .serviceClient() - .getWorkloadNetworks() - .updateVMGroup(resourceGroupName, privateCloudName, vmGroupId, this.innerModel(), Context.NONE); + this.innerObject = serviceManager.serviceClient().getWorkloadNetworks().updateVMGroup(resourceGroupName, + privateCloudName, vmGroupId, updateWorkloadNetworkVMGroup, Context.NONE); return this; } public WorkloadNetworkVMGroup apply(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getWorkloadNetworks() - .updateVMGroup(resourceGroupName, privateCloudName, vmGroupId, this.innerModel(), context); + this.innerObject = serviceManager.serviceClient().getWorkloadNetworks().updateVMGroup(resourceGroupName, + privateCloudName, vmGroupId, updateWorkloadNetworkVMGroup, context); return this; } - WorkloadNetworkVMGroupImpl( - WorkloadNetworkVMGroupInner innerObject, com.azure.resourcemanager.avs.AvsManager serviceManager) { + WorkloadNetworkVMGroupImpl(WorkloadNetworkVMGroupInner innerObject, + com.azure.resourcemanager.avs.AvsManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; - this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups"); - this.privateCloudName = Utils.getValueFromIdByName(innerObject.id(), "privateClouds"); - this.vmGroupId = Utils.getValueFromIdByName(innerObject.id(), "vmGroups"); + this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); + this.privateCloudName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "privateClouds"); + this.vmGroupId = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "vmGroups"); } public WorkloadNetworkVMGroup refresh() { - this.innerObject = - serviceManager - .serviceClient() - .getWorkloadNetworks() - .getVMGroupWithResponse(resourceGroupName, privateCloudName, vmGroupId, Context.NONE) - .getValue(); + this.innerObject = serviceManager.serviceClient().getWorkloadNetworks() + .getVMGroupWithResponse(resourceGroupName, privateCloudName, vmGroupId, Context.NONE).getValue(); return this; } public WorkloadNetworkVMGroup refresh(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getWorkloadNetworks() - .getVMGroupWithResponse(resourceGroupName, privateCloudName, vmGroupId, context) - .getValue(); + this.innerObject = serviceManager.serviceClient().getWorkloadNetworks() + .getVMGroupWithResponse(resourceGroupName, privateCloudName, vmGroupId, context).getValue(); return this; } public WorkloadNetworkVMGroupImpl withDisplayName(String displayName) { - this.innerModel().withDisplayName(displayName); - return this; + if (isInCreateMode()) { + this.innerModel().withDisplayName(displayName); + return this; + } else { + this.updateWorkloadNetworkVMGroup.withDisplayName(displayName); + return this; + } } public WorkloadNetworkVMGroupImpl withMembers(List members) { - this.innerModel().withMembers(members); - return this; + if (isInCreateMode()) { + this.innerModel().withMembers(members); + return this; + } else { + this.updateWorkloadNetworkVMGroup.withMembers(members); + return this; + } } public WorkloadNetworkVMGroupImpl withRevision(Long revision) { - this.innerModel().withRevision(revision); - return this; + if (isInCreateMode()) { + this.innerModel().withRevision(revision); + return this; + } else { + this.updateWorkloadNetworkVMGroup.withRevision(revision); + return this; + } + } + + private boolean isInCreateMode() { + return this.innerModel().id() == null; } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkVirtualMachineImpl.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkVirtualMachineImpl.java index 97a8bb2ea3bff..14b6a9cdacef0 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkVirtualMachineImpl.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworkVirtualMachineImpl.java @@ -4,8 +4,10 @@ package com.azure.resourcemanager.avs.implementation; +import com.azure.core.management.SystemData; import com.azure.resourcemanager.avs.fluent.models.WorkloadNetworkVirtualMachineInner; import com.azure.resourcemanager.avs.models.VMTypeEnum; +import com.azure.resourcemanager.avs.models.WorkloadNetworkProvisioningState; import com.azure.resourcemanager.avs.models.WorkloadNetworkVirtualMachine; public final class WorkloadNetworkVirtualMachineImpl implements WorkloadNetworkVirtualMachine { @@ -13,8 +15,8 @@ public final class WorkloadNetworkVirtualMachineImpl implements WorkloadNetworkV private final com.azure.resourcemanager.avs.AvsManager serviceManager; - WorkloadNetworkVirtualMachineImpl( - WorkloadNetworkVirtualMachineInner innerObject, com.azure.resourcemanager.avs.AvsManager serviceManager) { + WorkloadNetworkVirtualMachineImpl(WorkloadNetworkVirtualMachineInner innerObject, + com.azure.resourcemanager.avs.AvsManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; } @@ -31,6 +33,14 @@ public String type() { return this.innerModel().type(); } + public SystemData systemData() { + return this.innerModel().systemData(); + } + + public WorkloadNetworkProvisioningState provisioningState() { + return this.innerModel().provisioningState(); + } + public String displayName() { return this.innerModel().displayName(); } diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworksClientImpl.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworksClientImpl.java index e0664ce6c9c62..032a51e7dfe98 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworksClientImpl.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworksClientImpl.java @@ -43,37 +43,48 @@ import com.azure.resourcemanager.avs.fluent.models.WorkloadNetworkSegmentInner; import com.azure.resourcemanager.avs.fluent.models.WorkloadNetworkVMGroupInner; import com.azure.resourcemanager.avs.fluent.models.WorkloadNetworkVirtualMachineInner; -import com.azure.resourcemanager.avs.models.WorkloadNetworkDhcpList; -import com.azure.resourcemanager.avs.models.WorkloadNetworkDnsServicesList; -import com.azure.resourcemanager.avs.models.WorkloadNetworkDnsZonesList; -import com.azure.resourcemanager.avs.models.WorkloadNetworkGatewayList; -import com.azure.resourcemanager.avs.models.WorkloadNetworkList; -import com.azure.resourcemanager.avs.models.WorkloadNetworkName; -import com.azure.resourcemanager.avs.models.WorkloadNetworkPortMirroringList; -import com.azure.resourcemanager.avs.models.WorkloadNetworkPublicIPsList; -import com.azure.resourcemanager.avs.models.WorkloadNetworkSegmentsList; -import com.azure.resourcemanager.avs.models.WorkloadNetworkVMGroupsList; -import com.azure.resourcemanager.avs.models.WorkloadNetworkVirtualMachinesList; +import com.azure.resourcemanager.avs.models.WorkloadNetworkDhcpListResult; +import com.azure.resourcemanager.avs.models.WorkloadNetworkDhcpUpdate; +import com.azure.resourcemanager.avs.models.WorkloadNetworkDnsServiceListResult; +import com.azure.resourcemanager.avs.models.WorkloadNetworkDnsServiceUpdate; +import com.azure.resourcemanager.avs.models.WorkloadNetworkDnsZoneListResult; +import com.azure.resourcemanager.avs.models.WorkloadNetworkDnsZoneUpdate; +import com.azure.resourcemanager.avs.models.WorkloadNetworkGatewayListResult; +import com.azure.resourcemanager.avs.models.WorkloadNetworkListResult; +import com.azure.resourcemanager.avs.models.WorkloadNetworkPortMirroringListResult; +import com.azure.resourcemanager.avs.models.WorkloadNetworkPortMirroringUpdate; +import com.azure.resourcemanager.avs.models.WorkloadNetworkPublicIpListResult; +import com.azure.resourcemanager.avs.models.WorkloadNetworkSegmentListResult; +import com.azure.resourcemanager.avs.models.WorkloadNetworkSegmentUpdate; +import com.azure.resourcemanager.avs.models.WorkloadNetworkVMGroupListResult; +import com.azure.resourcemanager.avs.models.WorkloadNetworkVMGroupUpdate; +import com.azure.resourcemanager.avs.models.WorkloadNetworkVirtualMachineListResult; 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 WorkloadNetworksClient. */ +/** + * An instance of this class provides access to all the operations defined in WorkloadNetworksClient. + */ public final class WorkloadNetworksClientImpl implements WorkloadNetworksClient { - /** The proxy service used to perform REST calls. */ + /** + * The proxy service used to perform REST calls. + */ private final WorkloadNetworksService service; - /** The service client containing this operation class. */ + /** + * The service client containing this operation class. + */ private final AvsClientImpl client; /** * Initializes an instance of WorkloadNetworksClientImpl. - * + * * @param client the instance of the service client containing this operation class. */ WorkloadNetworksClientImpl(AvsClientImpl client) { - this.service = - RestProxy.create(WorkloadNetworksService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.service + = RestProxy.create(WorkloadNetworksService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } @@ -84,735 +95,526 @@ public final class WorkloadNetworksClientImpl implements WorkloadNetworksClient @Host("{$host}") @ServiceInterface(name = "AvsClientWorkloadNet") public interface WorkloadNetworksService { - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/{workloadNetworkName}") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono> list(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, - @QueryParam("api-version") String apiVersion, - @PathParam("privateCloudName") String privateCloudName, - @PathParam("workloadNetworkName") WorkloadNetworkName workloadNetworkName, - @HeaderParam("Accept") String accept, + @PathParam("privateCloudName") String privateCloudName, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono> get(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, - @QueryParam("api-version") String apiVersion, - @PathParam("privateCloudName") String privateCloudName, - @HeaderParam("Accept") String accept, + @PathParam("privateCloudName") String privateCloudName, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/segments") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/dhcpConfigurations") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listSegments( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono> listDhcp(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, - @QueryParam("api-version") String apiVersion, - @PathParam("privateCloudName") String privateCloudName, - @HeaderParam("Accept") String accept, + @PathParam("privateCloudName") String privateCloudName, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/segments/{segmentId}") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/dhcpConfigurations/{dhcpId}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> getSegment( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @QueryParam("api-version") String apiVersion, - @PathParam("privateCloudName") String privateCloudName, - @PathParam("segmentId") String segmentId, - @HeaderParam("Accept") String accept, + Mono> getDhcp(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("dhcpId") String dhcpId, + @PathParam("privateCloudName") String privateCloudName, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/segments/{segmentId}") - @ExpectedResponses({200, 201}) + @Headers({ "Content-Type: application/json" }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/dhcpConfigurations/{dhcpId}") + @ExpectedResponses({ 200, 201 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createSegments( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono>> createDhcp(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, - @QueryParam("api-version") String apiVersion, - @PathParam("privateCloudName") String privateCloudName, - @PathParam("segmentId") String segmentId, - @BodyParam("application/json") WorkloadNetworkSegmentInner workloadNetworkSegment, - @HeaderParam("Accept") String accept, - Context context); + @PathParam("privateCloudName") String privateCloudName, @PathParam("dhcpId") String dhcpId, + @BodyParam("application/json") WorkloadNetworkDhcpInner workloadNetworkDhcp, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Patch( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/segments/{segmentId}") - @ExpectedResponses({200, 202}) + @Headers({ "Content-Type: application/json" }) + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/dhcpConfigurations/{dhcpId}") + @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> updateSegments( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono>> updateDhcp(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, - @QueryParam("api-version") String apiVersion, - @PathParam("privateCloudName") String privateCloudName, - @PathParam("segmentId") String segmentId, - @BodyParam("application/json") WorkloadNetworkSegmentInner workloadNetworkSegment, - @HeaderParam("Accept") String accept, - Context context); + @PathParam("privateCloudName") String privateCloudName, @PathParam("dhcpId") String dhcpId, + @BodyParam("application/json") WorkloadNetworkDhcpUpdate workloadNetworkDhcp, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Delete( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/segments/{segmentId}") - @ExpectedResponses({200, 202, 204}) + @Headers({ "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/dhcpConfigurations/{dhcpId}") + @ExpectedResponses({ 200, 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> deleteSegment( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono>> deleteDhcp(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, - @QueryParam("api-version") String apiVersion, - @PathParam("privateCloudName") String privateCloudName, - @PathParam("segmentId") String segmentId, - @HeaderParam("Accept") String accept, - Context context); + @PathParam("privateCloudName") String privateCloudName, @PathParam("dhcpId") String dhcpId, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/dhcpConfigurations") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/dnsServices") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listDhcp( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono> listDnsServices(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, - @QueryParam("api-version") String apiVersion, - @PathParam("privateCloudName") String privateCloudName, - @HeaderParam("Accept") String accept, + @PathParam("privateCloudName") String privateCloudName, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/dhcpConfigurations/{dhcpId}") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/dnsServices/{dnsServiceId}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> getDhcp( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono> getDnsService(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, - @QueryParam("api-version") String apiVersion, - @PathParam("dhcpId") String dhcpId, - @PathParam("privateCloudName") String privateCloudName, - @HeaderParam("Accept") String accept, - Context context); + @PathParam("privateCloudName") String privateCloudName, @PathParam("dnsServiceId") String dnsServiceId, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/dhcpConfigurations/{dhcpId}") - @ExpectedResponses({200, 201}) + @Headers({ "Content-Type: application/json" }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/dnsServices/{dnsServiceId}") + @ExpectedResponses({ 200, 201 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createDhcp( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono>> createDnsService(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, - @QueryParam("api-version") String apiVersion, - @PathParam("privateCloudName") String privateCloudName, - @PathParam("dhcpId") String dhcpId, - @BodyParam("application/json") WorkloadNetworkDhcpInner workloadNetworkDhcp, - @HeaderParam("Accept") String accept, - Context context); + @PathParam("privateCloudName") String privateCloudName, @PathParam("dnsServiceId") String dnsServiceId, + @BodyParam("application/json") WorkloadNetworkDnsServiceInner workloadNetworkDnsService, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Patch( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/dhcpConfigurations/{dhcpId}") - @ExpectedResponses({200, 202}) + @Headers({ "Content-Type: application/json" }) + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/dnsServices/{dnsServiceId}") + @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> updateDhcp( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono>> updateDnsService(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, - @QueryParam("api-version") String apiVersion, - @PathParam("privateCloudName") String privateCloudName, - @PathParam("dhcpId") String dhcpId, - @BodyParam("application/json") WorkloadNetworkDhcpInner workloadNetworkDhcp, - @HeaderParam("Accept") String accept, - Context context); + @PathParam("privateCloudName") String privateCloudName, @PathParam("dnsServiceId") String dnsServiceId, + @BodyParam("application/json") WorkloadNetworkDnsServiceUpdate workloadNetworkDnsService, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Delete( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/dhcpConfigurations/{dhcpId}") - @ExpectedResponses({200, 202, 204}) + @Headers({ "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/dnsServices/{dnsServiceId}") + @ExpectedResponses({ 200, 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> deleteDhcp( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @QueryParam("api-version") String apiVersion, - @PathParam("privateCloudName") String privateCloudName, - @PathParam("dhcpId") String dhcpId, - @HeaderParam("Accept") String accept, + Mono>> deleteDnsService(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("dnsServiceId") String dnsServiceId, + @PathParam("privateCloudName") String privateCloudName, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/gateways") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/dnsZones") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listGateways( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono> listDnsZones(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, - @QueryParam("api-version") String apiVersion, - @PathParam("privateCloudName") String privateCloudName, - @HeaderParam("Accept") String accept, + @PathParam("privateCloudName") String privateCloudName, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/gateways/{gatewayId}") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/dnsZones/{dnsZoneId}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> getGateway( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono> getDnsZone(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, - @QueryParam("api-version") String apiVersion, - @PathParam("privateCloudName") String privateCloudName, - @PathParam("gatewayId") String gatewayId, - @HeaderParam("Accept") String accept, - Context context); + @PathParam("privateCloudName") String privateCloudName, @PathParam("dnsZoneId") String dnsZoneId, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/portMirroringProfiles") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/dnsZones/{dnsZoneId}") + @ExpectedResponses({ 200, 201 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listPortMirroring( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono>> createDnsZone(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, - @QueryParam("api-version") String apiVersion, - @PathParam("privateCloudName") String privateCloudName, - @HeaderParam("Accept") String accept, - Context context); + @PathParam("privateCloudName") String privateCloudName, @PathParam("dnsZoneId") String dnsZoneId, + @BodyParam("application/json") WorkloadNetworkDnsZoneInner workloadNetworkDnsZone, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/portMirroringProfiles/{portMirroringId}") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/dnsZones/{dnsZoneId}") + @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> getPortMirroring( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono>> updateDnsZone(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, - @QueryParam("api-version") String apiVersion, - @PathParam("privateCloudName") String privateCloudName, - @PathParam("portMirroringId") String portMirroringId, - @HeaderParam("Accept") String accept, - Context context); + @PathParam("privateCloudName") String privateCloudName, @PathParam("dnsZoneId") String dnsZoneId, + @BodyParam("application/json") WorkloadNetworkDnsZoneUpdate workloadNetworkDnsZone, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/portMirroringProfiles/{portMirroringId}") - @ExpectedResponses({200, 201}) + @Headers({ "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/dnsZones/{dnsZoneId}") + @ExpectedResponses({ 200, 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createPortMirroring( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @QueryParam("api-version") String apiVersion, - @PathParam("privateCloudName") String privateCloudName, - @PathParam("portMirroringId") String portMirroringId, - @BodyParam("application/json") WorkloadNetworkPortMirroringInner workloadNetworkPortMirroring, - @HeaderParam("Accept") String accept, + Mono>> deleteDnsZone(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("dnsZoneId") String dnsZoneId, + @PathParam("privateCloudName") String privateCloudName, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Patch( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/portMirroringProfiles/{portMirroringId}") - @ExpectedResponses({200, 202}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/gateways") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> updatePortMirroring( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono> listGateways(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, - @QueryParam("api-version") String apiVersion, - @PathParam("privateCloudName") String privateCloudName, - @PathParam("portMirroringId") String portMirroringId, - @BodyParam("application/json") WorkloadNetworkPortMirroringInner workloadNetworkPortMirroring, - @HeaderParam("Accept") String accept, + @PathParam("privateCloudName") String privateCloudName, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Delete( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/portMirroringProfiles/{portMirroringId}") - @ExpectedResponses({200, 202, 204}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/gateways/{gatewayId}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> deletePortMirroring( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono> getGateway(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, - @QueryParam("api-version") String apiVersion, - @PathParam("portMirroringId") String portMirroringId, - @PathParam("privateCloudName") String privateCloudName, - @HeaderParam("Accept") String accept, - Context context); + @PathParam("privateCloudName") String privateCloudName, @PathParam("gatewayId") String gatewayId, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/vmGroups") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/portMirroringProfiles") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listVMGroups( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono> listPortMirroring(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, - @QueryParam("api-version") String apiVersion, - @PathParam("privateCloudName") String privateCloudName, - @HeaderParam("Accept") String accept, + @PathParam("privateCloudName") String privateCloudName, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/vmGroups/{vmGroupId}") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/portMirroringProfiles/{portMirroringId}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> getVMGroup( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono> getPortMirroring(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, - @QueryParam("api-version") String apiVersion, @PathParam("privateCloudName") String privateCloudName, - @PathParam("vmGroupId") String vmGroupId, - @HeaderParam("Accept") String accept, + @PathParam("portMirroringId") String portMirroringId, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/vmGroups/{vmGroupId}") - @ExpectedResponses({200, 201}) + @Headers({ "Content-Type: application/json" }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/portMirroringProfiles/{portMirroringId}") + @ExpectedResponses({ 200, 201 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createVMGroup( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono>> createPortMirroring(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, - @QueryParam("api-version") String apiVersion, @PathParam("privateCloudName") String privateCloudName, - @PathParam("vmGroupId") String vmGroupId, - @BodyParam("application/json") WorkloadNetworkVMGroupInner workloadNetworkVMGroup, - @HeaderParam("Accept") String accept, - Context context); + @PathParam("portMirroringId") String portMirroringId, + @BodyParam("application/json") WorkloadNetworkPortMirroringInner workloadNetworkPortMirroring, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Patch( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/vmGroups/{vmGroupId}") - @ExpectedResponses({200, 202}) + @Headers({ "Content-Type: application/json" }) + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/portMirroringProfiles/{portMirroringId}") + @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> updateVMGroup( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono>> updatePortMirroring(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, - @QueryParam("api-version") String apiVersion, @PathParam("privateCloudName") String privateCloudName, - @PathParam("vmGroupId") String vmGroupId, - @BodyParam("application/json") WorkloadNetworkVMGroupInner workloadNetworkVMGroup, - @HeaderParam("Accept") String accept, - Context context); + @PathParam("portMirroringId") String portMirroringId, + @BodyParam("application/json") WorkloadNetworkPortMirroringUpdate workloadNetworkPortMirroring, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Delete( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/vmGroups/{vmGroupId}") - @ExpectedResponses({200, 202, 204}) + @Headers({ "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/portMirroringProfiles/{portMirroringId}") + @ExpectedResponses({ 200, 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> deleteVMGroup( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono>> deletePortMirroring(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, - @QueryParam("api-version") String apiVersion, - @PathParam("vmGroupId") String vmGroupId, - @PathParam("privateCloudName") String privateCloudName, - @HeaderParam("Accept") String accept, + @PathParam("portMirroringId") String portMirroringId, + @PathParam("privateCloudName") String privateCloudName, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/virtualMachines") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/publicIPs") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listVirtualMachines( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono> listPublicIPs(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, - @QueryParam("api-version") String apiVersion, - @PathParam("privateCloudName") String privateCloudName, - @HeaderParam("Accept") String accept, + @PathParam("privateCloudName") String privateCloudName, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/virtualMachines/{virtualMachineId}") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/publicIPs/{publicIPId}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> getVirtualMachine( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono> getPublicIp(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, - @QueryParam("api-version") String apiVersion, - @PathParam("privateCloudName") String privateCloudName, - @PathParam("virtualMachineId") String virtualMachineId, - @HeaderParam("Accept") String accept, - Context context); + @PathParam("privateCloudName") String privateCloudName, @PathParam("publicIPId") String publicIpId, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/dnsServices") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/publicIPs/{publicIPId}") + @ExpectedResponses({ 200, 201 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listDnsServices( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono>> createPublicIp(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, - @QueryParam("api-version") String apiVersion, - @PathParam("privateCloudName") String privateCloudName, - @HeaderParam("Accept") String accept, - Context context); + @PathParam("privateCloudName") String privateCloudName, @PathParam("publicIPId") String publicIpId, + @BodyParam("application/json") WorkloadNetworkPublicIpInner workloadNetworkPublicIp, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/dnsServices/{dnsServiceId}") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/publicIPs/{publicIPId}") + @ExpectedResponses({ 200, 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> getDnsService( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @QueryParam("api-version") String apiVersion, - @PathParam("privateCloudName") String privateCloudName, - @PathParam("dnsServiceId") String dnsServiceId, - @HeaderParam("Accept") String accept, + Mono>> deletePublicIp(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("publicIPId") String publicIpId, + @PathParam("privateCloudName") String privateCloudName, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/dnsServices/{dnsServiceId}") - @ExpectedResponses({200, 201}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/segments") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createDnsService( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono> listSegments(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, - @QueryParam("api-version") String apiVersion, - @PathParam("privateCloudName") String privateCloudName, - @PathParam("dnsServiceId") String dnsServiceId, - @BodyParam("application/json") WorkloadNetworkDnsServiceInner workloadNetworkDnsService, - @HeaderParam("Accept") String accept, + @PathParam("privateCloudName") String privateCloudName, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Patch( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/dnsServices/{dnsServiceId}") - @ExpectedResponses({200, 202}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/segments/{segmentId}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> updateDnsService( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono> getSegment(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, - @QueryParam("api-version") String apiVersion, - @PathParam("privateCloudName") String privateCloudName, - @PathParam("dnsServiceId") String dnsServiceId, - @BodyParam("application/json") WorkloadNetworkDnsServiceInner workloadNetworkDnsService, - @HeaderParam("Accept") String accept, - Context context); + @PathParam("privateCloudName") String privateCloudName, @PathParam("segmentId") String segmentId, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Delete( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/dnsServices/{dnsServiceId}") - @ExpectedResponses({200, 202, 204}) + @Headers({ "Content-Type: application/json" }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/segments/{segmentId}") + @ExpectedResponses({ 200, 201 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> deleteDnsService( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono>> createSegments(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, - @QueryParam("api-version") String apiVersion, - @PathParam("dnsServiceId") String dnsServiceId, - @PathParam("privateCloudName") String privateCloudName, - @HeaderParam("Accept") String accept, - Context context); + @PathParam("privateCloudName") String privateCloudName, @PathParam("segmentId") String segmentId, + @BodyParam("application/json") WorkloadNetworkSegmentInner workloadNetworkSegment, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/dnsZones") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/segments/{segmentId}") + @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listDnsZones( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono>> updateSegments(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, - @QueryParam("api-version") String apiVersion, - @PathParam("privateCloudName") String privateCloudName, - @HeaderParam("Accept") String accept, - Context context); + @PathParam("privateCloudName") String privateCloudName, @PathParam("segmentId") String segmentId, + @BodyParam("application/json") WorkloadNetworkSegmentUpdate workloadNetworkSegment, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/dnsZones/{dnsZoneId}") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/segments/{segmentId}") + @ExpectedResponses({ 200, 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> getDnsZone( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono>> deleteSegment(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, - @QueryParam("api-version") String apiVersion, - @PathParam("privateCloudName") String privateCloudName, - @PathParam("dnsZoneId") String dnsZoneId, - @HeaderParam("Accept") String accept, - Context context); + @PathParam("privateCloudName") String privateCloudName, @PathParam("segmentId") String segmentId, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/dnsZones/{dnsZoneId}") - @ExpectedResponses({200, 201}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/virtualMachines") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createDnsZone( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono> listVirtualMachines(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, - @QueryParam("api-version") String apiVersion, - @PathParam("privateCloudName") String privateCloudName, - @PathParam("dnsZoneId") String dnsZoneId, - @BodyParam("application/json") WorkloadNetworkDnsZoneInner workloadNetworkDnsZone, - @HeaderParam("Accept") String accept, + @PathParam("privateCloudName") String privateCloudName, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Patch( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/dnsZones/{dnsZoneId}") - @ExpectedResponses({200, 202}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/virtualMachines/{virtualMachineId}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> updateDnsZone( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono> getVirtualMachine(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, - @QueryParam("api-version") String apiVersion, @PathParam("privateCloudName") String privateCloudName, - @PathParam("dnsZoneId") String dnsZoneId, - @BodyParam("application/json") WorkloadNetworkDnsZoneInner workloadNetworkDnsZone, - @HeaderParam("Accept") String accept, + @PathParam("virtualMachineId") String virtualMachineId, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Delete( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/dnsZones/{dnsZoneId}") - @ExpectedResponses({200, 202, 204}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/vmGroups") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> deleteDnsZone( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono> listVMGroups(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, - @QueryParam("api-version") String apiVersion, - @PathParam("dnsZoneId") String dnsZoneId, - @PathParam("privateCloudName") String privateCloudName, - @HeaderParam("Accept") String accept, + @PathParam("privateCloudName") String privateCloudName, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/publicIPs") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/vmGroups/{vmGroupId}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listPublicIPs( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono> getVMGroup(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, - @QueryParam("api-version") String apiVersion, - @PathParam("privateCloudName") String privateCloudName, - @HeaderParam("Accept") String accept, - Context context); + @PathParam("privateCloudName") String privateCloudName, @PathParam("vmGroupId") String vmGroupId, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/publicIPs/{publicIPId}") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/vmGroups/{vmGroupId}") + @ExpectedResponses({ 200, 201 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> getPublicIp( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono>> createVMGroup(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, - @QueryParam("api-version") String apiVersion, - @PathParam("privateCloudName") String privateCloudName, - @PathParam("publicIPId") String publicIpId, - @HeaderParam("Accept") String accept, - Context context); + @PathParam("privateCloudName") String privateCloudName, @PathParam("vmGroupId") String vmGroupId, + @BodyParam("application/json") WorkloadNetworkVMGroupInner workloadNetworkVMGroup, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/publicIPs/{publicIPId}") - @ExpectedResponses({200, 201}) + @Headers({ "Content-Type: application/json" }) + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/vmGroups/{vmGroupId}") + @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createPublicIp( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono>> updateVMGroup(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, - @QueryParam("api-version") String apiVersion, - @PathParam("privateCloudName") String privateCloudName, - @PathParam("publicIPId") String publicIpId, - @BodyParam("application/json") WorkloadNetworkPublicIpInner workloadNetworkPublicIp, - @HeaderParam("Accept") String accept, - Context context); + @PathParam("privateCloudName") String privateCloudName, @PathParam("vmGroupId") String vmGroupId, + @BodyParam("application/json") WorkloadNetworkVMGroupUpdate workloadNetworkVMGroup, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Delete( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/publicIPs/{publicIPId}") - @ExpectedResponses({200, 202, 204}) + @Headers({ "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/workloadNetworks/default/vmGroups/{vmGroupId}") + @ExpectedResponses({ 200, 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> deletePublicIp( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @QueryParam("api-version") String apiVersion, - @PathParam("publicIPId") String publicIpId, - @PathParam("privateCloudName") String privateCloudName, - @HeaderParam("Accept") String accept, + Mono>> deleteVMGroup(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("vmGroupId") String vmGroupId, + @PathParam("privateCloudName") String privateCloudName, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + Mono> listNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listSegmentsNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + Mono> listDhcpNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listDhcpNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + Mono> listDnsServicesNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listGatewaysNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + Mono> listDnsZonesNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listPortMirroringNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + Mono> listGatewaysNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listVMGroupsNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + Mono> listPortMirroringNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listVirtualMachinesNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + Mono> listPublicIPsNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listDnsServicesNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + Mono> listSegmentsNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listDnsZonesNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + Mono> listVirtualMachinesNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listPublicIPsNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + Mono> listVMGroupsNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); } /** - * Get a private cloud workload network. - * + * List WorkloadNetwork resources by PrivateCloud. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param workloadNetworkName Name for the workload network in the private cloud. * @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 private cloud workload network along with {@link Response} on successful completion of {@link Mono}. + * @return the response of a WorkloadNetwork list operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String privateCloudName, WorkloadNetworkName workloadNetworkName) { + private Mono> listSinglePageAsync(String resourceGroupName, + String privateCloudName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -822,53 +624,37 @@ private Mono> getWithResponseAsync( return Mono .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); } - if (workloadNetworkName == null) { - return Mono - .error(new IllegalArgumentException("Parameter workloadNetworkName is required and cannot be null.")); - } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .get( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - this.client.getApiVersion(), - privateCloudName, - workloadNetworkName, - accept, - context)) + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, 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 a private cloud workload network. - * + * List WorkloadNetwork resources by PrivateCloud. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param workloadNetworkName Name for the workload network in the private cloud. * @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 a private cloud workload network along with {@link Response} on successful completion of {@link Mono}. + * @return the response of a WorkloadNetwork list operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String privateCloudName, WorkloadNetworkName workloadNetworkName, Context context) { + private Mono> listSinglePageAsync(String resourceGroupName, + String privateCloudName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -878,101 +664,101 @@ private Mono> getWithResponseAsync( return Mono .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); } - if (workloadNetworkName == null) { - return Mono - .error(new IllegalArgumentException("Parameter workloadNetworkName is required and cannot be null.")); - } final String accept = "application/json"; context = this.client.mergeContext(context); return service - .get( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - this.client.getApiVersion(), - privateCloudName, - workloadNetworkName, - accept, - context); + .list(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, privateCloudName, accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** - * Get a private cloud workload network. - * + * List WorkloadNetwork resources by PrivateCloud. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param workloadNetworkName Name for the workload network in the private cloud. * @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 private cloud workload network on successful completion of {@link Mono}. + * @return the response of a WorkloadNetwork list operation as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync( - String resourceGroupName, String privateCloudName, WorkloadNetworkName workloadNetworkName) { - return getWithResponseAsync(resourceGroupName, privateCloudName, workloadNetworkName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String resourceGroupName, String privateCloudName) { + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, privateCloudName), + nextLink -> listNextSinglePageAsync(nextLink)); } /** - * Get a private cloud workload network. - * + * List WorkloadNetwork resources by PrivateCloud. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param workloadNetworkName Name for the workload network in the private cloud. * @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 a private cloud workload network along with {@link Response}. + * @return the response of a WorkloadNetwork list operation as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, String privateCloudName, WorkloadNetworkName workloadNetworkName, Context context) { - return getWithResponseAsync(resourceGroupName, privateCloudName, workloadNetworkName, context).block(); + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String resourceGroupName, String privateCloudName, + Context context) { + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, privateCloudName, context), + nextLink -> listNextSinglePageAsync(nextLink, context)); } /** - * Get a private cloud workload network. - * + * List WorkloadNetwork resources by PrivateCloud. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param workloadNetworkName Name for the workload network in the private cloud. * @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 private cloud workload network. + * @return the response of a WorkloadNetwork list operation as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public WorkloadNetworkInner get( - String resourceGroupName, String privateCloudName, WorkloadNetworkName workloadNetworkName) { - return getWithResponse(resourceGroupName, privateCloudName, workloadNetworkName, Context.NONE).getValue(); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String resourceGroupName, String privateCloudName) { + return new PagedIterable<>(listAsync(resourceGroupName, privateCloudName)); + } + + /** + * List WorkloadNetwork resources by PrivateCloud. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @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 of a WorkloadNetwork list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String resourceGroupName, String privateCloudName, + Context context) { + return new PagedIterable<>(listAsync(resourceGroupName, privateCloudName, context)); } /** - * List of workload networks in a private cloud. - * + * Get a WorkloadNetwork. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. * @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 list of workload networks along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return a WorkloadNetwork along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync( - String resourceGroupName, String privateCloudName) { + private Mono> getWithResponseAsync(String resourceGroupName, + String privateCloudName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -984,54 +770,32 @@ private Mono> listSinglePageAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .list( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - this.client.getApiVersion(), - privateCloudName, - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * List of workload networks in a private cloud. - * + * Get a WorkloadNetwork. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. * @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 a list of workload networks along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return a WorkloadNetwork along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync( - String resourceGroupName, String privateCloudName, Context context) { + private Mono> getWithResponseAsync(String resourceGroupName, String privateCloudName, + Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1043,118 +807,79 @@ private Mono> listSinglePageAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .list( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - this.client.getApiVersion(), - privateCloudName, - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.get(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, privateCloudName, accept, context); } /** - * List of workload networks in a private cloud. - * + * Get a WorkloadNetwork. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. * @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 list of workload networks as paginated response with {@link PagedFlux}. + * @return a WorkloadNetwork on successful completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String privateCloudName) { - return new PagedFlux<>( - () -> listSinglePageAsync(resourceGroupName, privateCloudName), - nextLink -> listNextSinglePageAsync(nextLink)); + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getAsync(String resourceGroupName, String privateCloudName) { + return getWithResponseAsync(resourceGroupName, privateCloudName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** - * List of workload networks in a private cloud. - * + * Get a WorkloadNetwork. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. * @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 a list of workload networks as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync( - String resourceGroupName, String privateCloudName, Context context) { - return new PagedFlux<>( - () -> listSinglePageAsync(resourceGroupName, privateCloudName, context), - nextLink -> listNextSinglePageAsync(nextLink, context)); - } - - /** - * List of workload networks in a private cloud. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @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 list of workload networks as paginated response with {@link PagedIterable}. + * @return a WorkloadNetwork along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String privateCloudName) { - return new PagedIterable<>(listAsync(resourceGroupName, privateCloudName)); + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse(String resourceGroupName, String privateCloudName, + Context context) { + return getWithResponseAsync(resourceGroupName, privateCloudName, context).block(); } /** - * List of workload networks in a private cloud. - * + * Get a WorkloadNetwork. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @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 a list of workload networks as paginated response with {@link PagedIterable}. + * @return a WorkloadNetwork. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list( - String resourceGroupName, String privateCloudName, Context context) { - return new PagedIterable<>(listAsync(resourceGroupName, privateCloudName, context)); + @ServiceMethod(returns = ReturnType.SINGLE) + public WorkloadNetworkInner get(String resourceGroupName, String privateCloudName) { + return getWithResponse(resourceGroupName, privateCloudName, Context.NONE).getValue(); } /** - * List of segments in a private cloud workload network. - * + * List WorkloadNetworkDhcp resources by WorkloadNetwork. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. * @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 list of NSX Segments along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return the response of a WorkloadNetworkDhcp list operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSegmentsSinglePageAsync( - String resourceGroupName, String privateCloudName) { + private Mono> listDhcpSinglePageAsync(String resourceGroupName, + String privateCloudName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1166,54 +891,35 @@ private Mono> listSegmentsSinglePageA } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .listSegments( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - this.client.getApiVersion(), - privateCloudName, - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .withContext(context -> service.listDhcp(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, 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 of segments in a private cloud workload network. - * + * List WorkloadNetworkDhcp resources by WorkloadNetwork. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. * @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 a list of NSX Segments along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return the response of a WorkloadNetworkDhcp list operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSegmentsSinglePageAsync( - String resourceGroupName, String privateCloudName, Context context) { + private Mono> listDhcpSinglePageAsync(String resourceGroupName, + String privateCloudName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1226,283 +932,232 @@ private Mono> listSegmentsSinglePageA final String accept = "application/json"; context = this.client.mergeContext(context); return service - .listSegments( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - this.client.getApiVersion(), - privateCloudName, - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + .listDhcp(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, privateCloudName, accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** - * List of segments in a private cloud workload network. - * + * List WorkloadNetworkDhcp resources by WorkloadNetwork. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. * @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 list of NSX Segments as paginated response with {@link PagedFlux}. + * @return the response of a WorkloadNetworkDhcp list operation as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listSegmentsAsync( - String resourceGroupName, String privateCloudName) { - return new PagedFlux<>( - () -> listSegmentsSinglePageAsync(resourceGroupName, privateCloudName), - nextLink -> listSegmentsNextSinglePageAsync(nextLink)); + private PagedFlux listDhcpAsync(String resourceGroupName, String privateCloudName) { + return new PagedFlux<>(() -> listDhcpSinglePageAsync(resourceGroupName, privateCloudName), + nextLink -> listDhcpNextSinglePageAsync(nextLink)); } /** - * List of segments in a private cloud workload network. - * + * List WorkloadNetworkDhcp resources by WorkloadNetwork. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. * @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 a list of NSX Segments as paginated response with {@link PagedFlux}. + * @return the response of a WorkloadNetworkDhcp list operation as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listSegmentsAsync( - String resourceGroupName, String privateCloudName, Context context) { - return new PagedFlux<>( - () -> listSegmentsSinglePageAsync(resourceGroupName, privateCloudName, context), - nextLink -> listSegmentsNextSinglePageAsync(nextLink, context)); + private PagedFlux listDhcpAsync(String resourceGroupName, String privateCloudName, + Context context) { + return new PagedFlux<>(() -> listDhcpSinglePageAsync(resourceGroupName, privateCloudName, context), + nextLink -> listDhcpNextSinglePageAsync(nextLink, context)); } /** - * List of segments in a private cloud workload network. - * + * List WorkloadNetworkDhcp resources by WorkloadNetwork. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. * @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 list of NSX Segments as paginated response with {@link PagedIterable}. + * @return the response of a WorkloadNetworkDhcp list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listSegments(String resourceGroupName, String privateCloudName) { - return new PagedIterable<>(listSegmentsAsync(resourceGroupName, privateCloudName)); + public PagedIterable listDhcp(String resourceGroupName, String privateCloudName) { + return new PagedIterable<>(listDhcpAsync(resourceGroupName, privateCloudName)); } /** - * List of segments in a private cloud workload network. - * + * List WorkloadNetworkDhcp resources by WorkloadNetwork. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. * @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 a list of NSX Segments as paginated response with {@link PagedIterable}. + * @return the response of a WorkloadNetworkDhcp list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listSegments( - String resourceGroupName, String privateCloudName, Context context) { - return new PagedIterable<>(listSegmentsAsync(resourceGroupName, privateCloudName, context)); + public PagedIterable listDhcp(String resourceGroupName, String privateCloudName, + Context context) { + return new PagedIterable<>(listDhcpAsync(resourceGroupName, privateCloudName, context)); } /** - * Get a segment by id in a private cloud workload network. - * + * Get a WorkloadNetworkDhcp. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dhcpId The ID of the DHCP configuration. * @param privateCloudName Name of the private cloud. - * @param segmentId NSX Segment identifier. Generally the same as the Segment's display name. * @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 segment by id in a private cloud workload network along with {@link Response} on successful completion - * of {@link Mono}. + * @return a WorkloadNetworkDhcp along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getSegmentWithResponseAsync( - String resourceGroupName, String privateCloudName, String segmentId) { + private Mono> getDhcpWithResponseAsync(String resourceGroupName, String dhcpId, + String privateCloudName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + 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 (dhcpId == null) { + return Mono.error(new IllegalArgumentException("Parameter dhcpId is required and cannot be null.")); + } if (privateCloudName == null) { return Mono .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); } - if (segmentId == null) { - return Mono.error(new IllegalArgumentException("Parameter segmentId is required and cannot be null.")); - } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .getSegment( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - this.client.getApiVersion(), - privateCloudName, - segmentId, - accept, - context)) + .withContext(context -> service.getDhcp(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, dhcpId, privateCloudName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Get a segment by id in a private cloud workload network. - * + * Get a WorkloadNetworkDhcp. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dhcpId The ID of the DHCP configuration. * @param privateCloudName Name of the private cloud. - * @param segmentId NSX Segment identifier. Generally the same as the Segment's display name. * @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 a segment by id in a private cloud workload network along with {@link Response} on successful completion - * of {@link Mono}. + * @return a WorkloadNetworkDhcp along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getSegmentWithResponseAsync( - String resourceGroupName, String privateCloudName, String segmentId, Context context) { + private Mono> getDhcpWithResponseAsync(String resourceGroupName, String dhcpId, + String privateCloudName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + 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 (dhcpId == null) { + return Mono.error(new IllegalArgumentException("Parameter dhcpId is required and cannot be null.")); + } if (privateCloudName == null) { return Mono .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); } - if (segmentId == null) { - return Mono.error(new IllegalArgumentException("Parameter segmentId is required and cannot be null.")); - } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .getSegment( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - this.client.getApiVersion(), - privateCloudName, - segmentId, - accept, - context); + return service.getDhcp(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, dhcpId, privateCloudName, accept, context); } /** - * Get a segment by id in a private cloud workload network. - * + * Get a WorkloadNetworkDhcp. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dhcpId The ID of the DHCP configuration. * @param privateCloudName Name of the private cloud. - * @param segmentId NSX Segment identifier. Generally the same as the Segment's display name. * @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 segment by id in a private cloud workload network on successful completion of {@link Mono}. + * @return a WorkloadNetworkDhcp on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getSegmentAsync( - String resourceGroupName, String privateCloudName, String segmentId) { - return getSegmentWithResponseAsync(resourceGroupName, privateCloudName, segmentId) + private Mono getDhcpAsync(String resourceGroupName, String dhcpId, + String privateCloudName) { + return getDhcpWithResponseAsync(resourceGroupName, dhcpId, privateCloudName) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** - * Get a segment by id in a private cloud workload network. - * + * Get a WorkloadNetworkDhcp. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dhcpId The ID of the DHCP configuration. * @param privateCloudName Name of the private cloud. - * @param segmentId NSX Segment identifier. Generally the same as the Segment's display name. * @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 a segment by id in a private cloud workload network along with {@link Response}. + * @return a WorkloadNetworkDhcp along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getSegmentWithResponse( - String resourceGroupName, String privateCloudName, String segmentId, Context context) { - return getSegmentWithResponseAsync(resourceGroupName, privateCloudName, segmentId, context).block(); + public Response getDhcpWithResponse(String resourceGroupName, String dhcpId, + String privateCloudName, Context context) { + return getDhcpWithResponseAsync(resourceGroupName, dhcpId, privateCloudName, context).block(); } /** - * Get a segment by id in a private cloud workload network. - * + * Get a WorkloadNetworkDhcp. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dhcpId The ID of the DHCP configuration. * @param privateCloudName Name of the private cloud. - * @param segmentId NSX Segment identifier. Generally the same as the Segment's display name. * @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 segment by id in a private cloud workload network. + * @return a WorkloadNetworkDhcp. */ @ServiceMethod(returns = ReturnType.SINGLE) - public WorkloadNetworkSegmentInner getSegment(String resourceGroupName, String privateCloudName, String segmentId) { - return getSegmentWithResponse(resourceGroupName, privateCloudName, segmentId, Context.NONE).getValue(); + public WorkloadNetworkDhcpInner getDhcp(String resourceGroupName, String dhcpId, String privateCloudName) { + return getDhcpWithResponse(resourceGroupName, dhcpId, privateCloudName, Context.NONE).getValue(); } /** - * Create a segment by id in a private cloud workload network. - * + * Create a WorkloadNetworkDhcp. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param segmentId NSX Segment identifier. Generally the same as the Segment's display name. - * @param workloadNetworkSegment NSX Segment. + * @param dhcpId The ID of the DHCP configuration. + * @param workloadNetworkDhcp Resource create parameters. * @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 nSX Segment along with {@link Response} on successful completion of {@link Mono}. + * @return nSX DHCP along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createSegmentsWithResponseAsync( - String resourceGroupName, - String privateCloudName, - String segmentId, - WorkloadNetworkSegmentInner workloadNetworkSegment) { + private Mono>> createDhcpWithResponseAsync(String resourceGroupName, + String privateCloudName, String dhcpId, WorkloadNetworkDhcpInner workloadNetworkDhcp) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1512,65 +1167,46 @@ private Mono>> createSegmentsWithResponseAsync( return Mono .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); } - if (segmentId == null) { - return Mono.error(new IllegalArgumentException("Parameter segmentId is required and cannot be null.")); + if (dhcpId == null) { + return Mono.error(new IllegalArgumentException("Parameter dhcpId is required and cannot be null.")); } - if (workloadNetworkSegment == null) { + if (workloadNetworkDhcp == null) { return Mono - .error( - new IllegalArgumentException("Parameter workloadNetworkSegment is required and cannot be null.")); + .error(new IllegalArgumentException("Parameter workloadNetworkDhcp is required and cannot be null.")); } else { - workloadNetworkSegment.validate(); + workloadNetworkDhcp.validate(); } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .createSegments( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - this.client.getApiVersion(), - privateCloudName, - segmentId, - workloadNetworkSegment, - accept, - context)) + .withContext(context -> service.createDhcp(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, dhcpId, workloadNetworkDhcp, + accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Create a segment by id in a private cloud workload network. - * + * Create a WorkloadNetworkDhcp. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param segmentId NSX Segment identifier. Generally the same as the Segment's display name. - * @param workloadNetworkSegment NSX Segment. + * @param dhcpId The ID of the DHCP configuration. + * @param workloadNetworkDhcp Resource create parameters. * @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 nSX Segment along with {@link Response} on successful completion of {@link Mono}. + * @return nSX DHCP along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createSegmentsWithResponseAsync( - String resourceGroupName, - String privateCloudName, - String segmentId, - WorkloadNetworkSegmentInner workloadNetworkSegment, - Context context) { + private Mono>> createDhcpWithResponseAsync(String resourceGroupName, + String privateCloudName, String dhcpId, WorkloadNetworkDhcpInner workloadNetworkDhcp, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1580,265 +1216,208 @@ private Mono>> createSegmentsWithResponseAsync( return Mono .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); } - if (segmentId == null) { - return Mono.error(new IllegalArgumentException("Parameter segmentId is required and cannot be null.")); + if (dhcpId == null) { + return Mono.error(new IllegalArgumentException("Parameter dhcpId is required and cannot be null.")); } - if (workloadNetworkSegment == null) { + if (workloadNetworkDhcp == null) { return Mono - .error( - new IllegalArgumentException("Parameter workloadNetworkSegment is required and cannot be null.")); + .error(new IllegalArgumentException("Parameter workloadNetworkDhcp is required and cannot be null.")); } else { - workloadNetworkSegment.validate(); + workloadNetworkDhcp.validate(); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .createSegments( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - this.client.getApiVersion(), - privateCloudName, - segmentId, - workloadNetworkSegment, - accept, - context); + return service.createDhcp(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, dhcpId, workloadNetworkDhcp, accept, + context); } /** - * Create a segment by id in a private cloud workload network. - * + * Create a WorkloadNetworkDhcp. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param segmentId NSX Segment identifier. Generally the same as the Segment's display name. - * @param workloadNetworkSegment NSX Segment. + * @param dhcpId The ID of the DHCP configuration. + * @param workloadNetworkDhcp Resource create parameters. * @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 nSX Segment. + * @return the {@link PollerFlux} for polling of nSX DHCP. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, WorkloadNetworkSegmentInner> beginCreateSegmentsAsync( - String resourceGroupName, - String privateCloudName, - String segmentId, - WorkloadNetworkSegmentInner workloadNetworkSegment) { - Mono>> mono = - createSegmentsWithResponseAsync(resourceGroupName, privateCloudName, segmentId, workloadNetworkSegment); - return this - .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - WorkloadNetworkSegmentInner.class, - WorkloadNetworkSegmentInner.class, - this.client.getContext()); + private PollerFlux, WorkloadNetworkDhcpInner> beginCreateDhcpAsync( + String resourceGroupName, String privateCloudName, String dhcpId, + WorkloadNetworkDhcpInner workloadNetworkDhcp) { + Mono>> mono + = createDhcpWithResponseAsync(resourceGroupName, privateCloudName, dhcpId, workloadNetworkDhcp); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), WorkloadNetworkDhcpInner.class, WorkloadNetworkDhcpInner.class, + this.client.getContext()); } /** - * Create a segment by id in a private cloud workload network. - * + * Create a WorkloadNetworkDhcp. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param segmentId NSX Segment identifier. Generally the same as the Segment's display name. - * @param workloadNetworkSegment NSX Segment. + * @param dhcpId The ID of the DHCP configuration. + * @param workloadNetworkDhcp Resource create parameters. * @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 nSX Segment. + * @return the {@link PollerFlux} for polling of nSX DHCP. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, WorkloadNetworkSegmentInner> beginCreateSegmentsAsync( - String resourceGroupName, - String privateCloudName, - String segmentId, - WorkloadNetworkSegmentInner workloadNetworkSegment, + private PollerFlux, WorkloadNetworkDhcpInner> beginCreateDhcpAsync( + String resourceGroupName, String privateCloudName, String dhcpId, WorkloadNetworkDhcpInner workloadNetworkDhcp, Context context) { context = this.client.mergeContext(context); - Mono>> mono = - createSegmentsWithResponseAsync( - resourceGroupName, privateCloudName, segmentId, workloadNetworkSegment, context); - return this - .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - WorkloadNetworkSegmentInner.class, - WorkloadNetworkSegmentInner.class, - context); + Mono>> mono + = createDhcpWithResponseAsync(resourceGroupName, privateCloudName, dhcpId, workloadNetworkDhcp, context); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), WorkloadNetworkDhcpInner.class, WorkloadNetworkDhcpInner.class, context); } /** - * Create a segment by id in a private cloud workload network. - * + * Create a WorkloadNetworkDhcp. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param segmentId NSX Segment identifier. Generally the same as the Segment's display name. - * @param workloadNetworkSegment NSX Segment. + * @param dhcpId The ID of the DHCP configuration. + * @param workloadNetworkDhcp Resource create parameters. * @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 nSX Segment. + * @return the {@link SyncPoller} for polling of nSX DHCP. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, WorkloadNetworkSegmentInner> beginCreateSegments( - String resourceGroupName, - String privateCloudName, - String segmentId, - WorkloadNetworkSegmentInner workloadNetworkSegment) { - return this - .beginCreateSegmentsAsync(resourceGroupName, privateCloudName, segmentId, workloadNetworkSegment) + public SyncPoller, WorkloadNetworkDhcpInner> beginCreateDhcp( + String resourceGroupName, String privateCloudName, String dhcpId, + WorkloadNetworkDhcpInner workloadNetworkDhcp) { + return this.beginCreateDhcpAsync(resourceGroupName, privateCloudName, dhcpId, workloadNetworkDhcp) .getSyncPoller(); } /** - * Create a segment by id in a private cloud workload network. - * + * Create a WorkloadNetworkDhcp. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param segmentId NSX Segment identifier. Generally the same as the Segment's display name. - * @param workloadNetworkSegment NSX Segment. + * @param dhcpId The ID of the DHCP configuration. + * @param workloadNetworkDhcp Resource create parameters. * @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 nSX Segment. + * @return the {@link SyncPoller} for polling of nSX DHCP. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, WorkloadNetworkSegmentInner> beginCreateSegments( - String resourceGroupName, - String privateCloudName, - String segmentId, - WorkloadNetworkSegmentInner workloadNetworkSegment, + public SyncPoller, WorkloadNetworkDhcpInner> beginCreateDhcp( + String resourceGroupName, String privateCloudName, String dhcpId, WorkloadNetworkDhcpInner workloadNetworkDhcp, Context context) { - return this - .beginCreateSegmentsAsync(resourceGroupName, privateCloudName, segmentId, workloadNetworkSegment, context) + return this.beginCreateDhcpAsync(resourceGroupName, privateCloudName, dhcpId, workloadNetworkDhcp, context) .getSyncPoller(); } /** - * Create a segment by id in a private cloud workload network. - * + * Create a WorkloadNetworkDhcp. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param segmentId NSX Segment identifier. Generally the same as the Segment's display name. - * @param workloadNetworkSegment NSX Segment. + * @param dhcpId The ID of the DHCP configuration. + * @param workloadNetworkDhcp Resource create parameters. * @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 nSX Segment on successful completion of {@link Mono}. + * @return nSX DHCP on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createSegmentsAsync( - String resourceGroupName, - String privateCloudName, - String segmentId, - WorkloadNetworkSegmentInner workloadNetworkSegment) { - return beginCreateSegmentsAsync(resourceGroupName, privateCloudName, segmentId, workloadNetworkSegment) - .last() + private Mono createDhcpAsync(String resourceGroupName, String privateCloudName, + String dhcpId, WorkloadNetworkDhcpInner workloadNetworkDhcp) { + return beginCreateDhcpAsync(resourceGroupName, privateCloudName, dhcpId, workloadNetworkDhcp).last() .flatMap(this.client::getLroFinalResultOrError); } /** - * Create a segment by id in a private cloud workload network. - * + * Create a WorkloadNetworkDhcp. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param segmentId NSX Segment identifier. Generally the same as the Segment's display name. - * @param workloadNetworkSegment NSX Segment. + * @param dhcpId The ID of the DHCP configuration. + * @param workloadNetworkDhcp Resource create parameters. * @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 nSX Segment on successful completion of {@link Mono}. + * @return nSX DHCP on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createSegmentsAsync( - String resourceGroupName, - String privateCloudName, - String segmentId, - WorkloadNetworkSegmentInner workloadNetworkSegment, - Context context) { - return beginCreateSegmentsAsync(resourceGroupName, privateCloudName, segmentId, workloadNetworkSegment, context) - .last() + private Mono createDhcpAsync(String resourceGroupName, String privateCloudName, + String dhcpId, WorkloadNetworkDhcpInner workloadNetworkDhcp, Context context) { + return beginCreateDhcpAsync(resourceGroupName, privateCloudName, dhcpId, workloadNetworkDhcp, context).last() .flatMap(this.client::getLroFinalResultOrError); } /** - * Create a segment by id in a private cloud workload network. - * + * Create a WorkloadNetworkDhcp. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param segmentId NSX Segment identifier. Generally the same as the Segment's display name. - * @param workloadNetworkSegment NSX Segment. + * @param dhcpId The ID of the DHCP configuration. + * @param workloadNetworkDhcp Resource create parameters. * @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 nSX Segment. + * @return nSX DHCP. */ @ServiceMethod(returns = ReturnType.SINGLE) - public WorkloadNetworkSegmentInner createSegments( - String resourceGroupName, - String privateCloudName, - String segmentId, - WorkloadNetworkSegmentInner workloadNetworkSegment) { - return createSegmentsAsync(resourceGroupName, privateCloudName, segmentId, workloadNetworkSegment).block(); + public WorkloadNetworkDhcpInner createDhcp(String resourceGroupName, String privateCloudName, String dhcpId, + WorkloadNetworkDhcpInner workloadNetworkDhcp) { + return createDhcpAsync(resourceGroupName, privateCloudName, dhcpId, workloadNetworkDhcp).block(); } /** - * Create a segment by id in a private cloud workload network. - * + * Create a WorkloadNetworkDhcp. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param segmentId NSX Segment identifier. Generally the same as the Segment's display name. - * @param workloadNetworkSegment NSX Segment. + * @param dhcpId The ID of the DHCP configuration. + * @param workloadNetworkDhcp Resource create parameters. * @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 nSX Segment. + * @return nSX DHCP. */ @ServiceMethod(returns = ReturnType.SINGLE) - public WorkloadNetworkSegmentInner createSegments( - String resourceGroupName, - String privateCloudName, - String segmentId, - WorkloadNetworkSegmentInner workloadNetworkSegment, - Context context) { - return createSegmentsAsync(resourceGroupName, privateCloudName, segmentId, workloadNetworkSegment, context) - .block(); + public WorkloadNetworkDhcpInner createDhcp(String resourceGroupName, String privateCloudName, String dhcpId, + WorkloadNetworkDhcpInner workloadNetworkDhcp, Context context) { + return createDhcpAsync(resourceGroupName, privateCloudName, dhcpId, workloadNetworkDhcp, context).block(); } /** - * Create or update a segment by id in a private cloud workload network. - * + * Update a WorkloadNetworkDhcp. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param segmentId NSX Segment identifier. Generally the same as the Segment's display name. - * @param workloadNetworkSegment NSX Segment. + * @param dhcpId The ID of the DHCP configuration. + * @param workloadNetworkDhcp The resource properties to be updated. * @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 nSX Segment along with {@link Response} on successful completion of {@link Mono}. + * @return nSX DHCP along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateSegmentsWithResponseAsync( - String resourceGroupName, - String privateCloudName, - String segmentId, - WorkloadNetworkSegmentInner workloadNetworkSegment) { + private Mono>> updateDhcpWithResponseAsync(String resourceGroupName, + String privateCloudName, String dhcpId, WorkloadNetworkDhcpUpdate workloadNetworkDhcp) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1848,65 +1427,46 @@ private Mono>> updateSegmentsWithResponseAsync( return Mono .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); } - if (segmentId == null) { - return Mono.error(new IllegalArgumentException("Parameter segmentId is required and cannot be null.")); + if (dhcpId == null) { + return Mono.error(new IllegalArgumentException("Parameter dhcpId is required and cannot be null.")); } - if (workloadNetworkSegment == null) { + if (workloadNetworkDhcp == null) { return Mono - .error( - new IllegalArgumentException("Parameter workloadNetworkSegment is required and cannot be null.")); + .error(new IllegalArgumentException("Parameter workloadNetworkDhcp is required and cannot be null.")); } else { - workloadNetworkSegment.validate(); + workloadNetworkDhcp.validate(); } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .updateSegments( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - this.client.getApiVersion(), - privateCloudName, - segmentId, - workloadNetworkSegment, - accept, - context)) + .withContext(context -> service.updateDhcp(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, dhcpId, workloadNetworkDhcp, + accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Create or update a segment by id in a private cloud workload network. - * + * Update a WorkloadNetworkDhcp. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param segmentId NSX Segment identifier. Generally the same as the Segment's display name. - * @param workloadNetworkSegment NSX Segment. + * @param dhcpId The ID of the DHCP configuration. + * @param workloadNetworkDhcp The resource properties to be updated. * @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 nSX Segment along with {@link Response} on successful completion of {@link Mono}. + * @return nSX DHCP along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateSegmentsWithResponseAsync( - String resourceGroupName, - String privateCloudName, - String segmentId, - WorkloadNetworkSegmentInner workloadNetworkSegment, - Context context) { + private Mono>> updateDhcpWithResponseAsync(String resourceGroupName, + String privateCloudName, String dhcpId, WorkloadNetworkDhcpUpdate workloadNetworkDhcp, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1916,261 +1476,207 @@ private Mono>> updateSegmentsWithResponseAsync( return Mono .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); } - if (segmentId == null) { - return Mono.error(new IllegalArgumentException("Parameter segmentId is required and cannot be null.")); + if (dhcpId == null) { + return Mono.error(new IllegalArgumentException("Parameter dhcpId is required and cannot be null.")); } - if (workloadNetworkSegment == null) { + if (workloadNetworkDhcp == null) { return Mono - .error( - new IllegalArgumentException("Parameter workloadNetworkSegment is required and cannot be null.")); + .error(new IllegalArgumentException("Parameter workloadNetworkDhcp is required and cannot be null.")); } else { - workloadNetworkSegment.validate(); + workloadNetworkDhcp.validate(); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .updateSegments( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - this.client.getApiVersion(), - privateCloudName, - segmentId, - workloadNetworkSegment, - accept, - context); + return service.updateDhcp(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, dhcpId, workloadNetworkDhcp, accept, + context); } /** - * Create or update a segment by id in a private cloud workload network. - * + * Update a WorkloadNetworkDhcp. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param segmentId NSX Segment identifier. Generally the same as the Segment's display name. - * @param workloadNetworkSegment NSX Segment. + * @param dhcpId The ID of the DHCP configuration. + * @param workloadNetworkDhcp The resource properties to be updated. * @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 nSX Segment. + * @return the {@link PollerFlux} for polling of nSX DHCP. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, WorkloadNetworkSegmentInner> beginUpdateSegmentsAsync( - String resourceGroupName, - String privateCloudName, - String segmentId, - WorkloadNetworkSegmentInner workloadNetworkSegment) { - Mono>> mono = - updateSegmentsWithResponseAsync(resourceGroupName, privateCloudName, segmentId, workloadNetworkSegment); - return this - .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - WorkloadNetworkSegmentInner.class, - WorkloadNetworkSegmentInner.class, - this.client.getContext()); + private PollerFlux, WorkloadNetworkDhcpInner> beginUpdateDhcpAsync( + String resourceGroupName, String privateCloudName, String dhcpId, + WorkloadNetworkDhcpUpdate workloadNetworkDhcp) { + Mono>> mono + = updateDhcpWithResponseAsync(resourceGroupName, privateCloudName, dhcpId, workloadNetworkDhcp); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), WorkloadNetworkDhcpInner.class, WorkloadNetworkDhcpInner.class, + this.client.getContext()); } /** - * Create or update a segment by id in a private cloud workload network. - * + * Update a WorkloadNetworkDhcp. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param segmentId NSX Segment identifier. Generally the same as the Segment's display name. - * @param workloadNetworkSegment NSX Segment. + * @param dhcpId The ID of the DHCP configuration. + * @param workloadNetworkDhcp The resource properties to be updated. * @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 nSX Segment. + * @return the {@link PollerFlux} for polling of nSX DHCP. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, WorkloadNetworkSegmentInner> beginUpdateSegmentsAsync( - String resourceGroupName, - String privateCloudName, - String segmentId, - WorkloadNetworkSegmentInner workloadNetworkSegment, + private PollerFlux, WorkloadNetworkDhcpInner> beginUpdateDhcpAsync( + String resourceGroupName, String privateCloudName, String dhcpId, WorkloadNetworkDhcpUpdate workloadNetworkDhcp, Context context) { context = this.client.mergeContext(context); - Mono>> mono = - updateSegmentsWithResponseAsync( - resourceGroupName, privateCloudName, segmentId, workloadNetworkSegment, context); - return this - .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - WorkloadNetworkSegmentInner.class, - WorkloadNetworkSegmentInner.class, - context); + Mono>> mono + = updateDhcpWithResponseAsync(resourceGroupName, privateCloudName, dhcpId, workloadNetworkDhcp, context); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), WorkloadNetworkDhcpInner.class, WorkloadNetworkDhcpInner.class, context); } /** - * Create or update a segment by id in a private cloud workload network. - * + * Update a WorkloadNetworkDhcp. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param segmentId NSX Segment identifier. Generally the same as the Segment's display name. - * @param workloadNetworkSegment NSX Segment. + * @param dhcpId The ID of the DHCP configuration. + * @param workloadNetworkDhcp The resource properties to be updated. * @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 nSX Segment. + * @return the {@link SyncPoller} for polling of nSX DHCP. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, WorkloadNetworkSegmentInner> beginUpdateSegments( - String resourceGroupName, - String privateCloudName, - String segmentId, - WorkloadNetworkSegmentInner workloadNetworkSegment) { - return this - .beginUpdateSegmentsAsync(resourceGroupName, privateCloudName, segmentId, workloadNetworkSegment) + public SyncPoller, WorkloadNetworkDhcpInner> beginUpdateDhcp( + String resourceGroupName, String privateCloudName, String dhcpId, + WorkloadNetworkDhcpUpdate workloadNetworkDhcp) { + return this.beginUpdateDhcpAsync(resourceGroupName, privateCloudName, dhcpId, workloadNetworkDhcp) .getSyncPoller(); } /** - * Create or update a segment by id in a private cloud workload network. - * + * Update a WorkloadNetworkDhcp. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param segmentId NSX Segment identifier. Generally the same as the Segment's display name. - * @param workloadNetworkSegment NSX Segment. + * @param dhcpId The ID of the DHCP configuration. + * @param workloadNetworkDhcp The resource properties to be updated. * @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 nSX Segment. + * @return the {@link SyncPoller} for polling of nSX DHCP. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, WorkloadNetworkSegmentInner> beginUpdateSegments( - String resourceGroupName, - String privateCloudName, - String segmentId, - WorkloadNetworkSegmentInner workloadNetworkSegment, + public SyncPoller, WorkloadNetworkDhcpInner> beginUpdateDhcp( + String resourceGroupName, String privateCloudName, String dhcpId, WorkloadNetworkDhcpUpdate workloadNetworkDhcp, Context context) { - return this - .beginUpdateSegmentsAsync(resourceGroupName, privateCloudName, segmentId, workloadNetworkSegment, context) + return this.beginUpdateDhcpAsync(resourceGroupName, privateCloudName, dhcpId, workloadNetworkDhcp, context) .getSyncPoller(); } /** - * Create or update a segment by id in a private cloud workload network. - * + * Update a WorkloadNetworkDhcp. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param segmentId NSX Segment identifier. Generally the same as the Segment's display name. - * @param workloadNetworkSegment NSX Segment. + * @param dhcpId The ID of the DHCP configuration. + * @param workloadNetworkDhcp The resource properties to be updated. * @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 nSX Segment on successful completion of {@link Mono}. + * @return nSX DHCP on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateSegmentsAsync( - String resourceGroupName, - String privateCloudName, - String segmentId, - WorkloadNetworkSegmentInner workloadNetworkSegment) { - return beginUpdateSegmentsAsync(resourceGroupName, privateCloudName, segmentId, workloadNetworkSegment) - .last() + private Mono updateDhcpAsync(String resourceGroupName, String privateCloudName, + String dhcpId, WorkloadNetworkDhcpUpdate workloadNetworkDhcp) { + return beginUpdateDhcpAsync(resourceGroupName, privateCloudName, dhcpId, workloadNetworkDhcp).last() .flatMap(this.client::getLroFinalResultOrError); } /** - * Create or update a segment by id in a private cloud workload network. - * + * Update a WorkloadNetworkDhcp. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param segmentId NSX Segment identifier. Generally the same as the Segment's display name. - * @param workloadNetworkSegment NSX Segment. + * @param dhcpId The ID of the DHCP configuration. + * @param workloadNetworkDhcp The resource properties to be updated. * @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 nSX Segment on successful completion of {@link Mono}. + * @return nSX DHCP on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateSegmentsAsync( - String resourceGroupName, - String privateCloudName, - String segmentId, - WorkloadNetworkSegmentInner workloadNetworkSegment, - Context context) { - return beginUpdateSegmentsAsync(resourceGroupName, privateCloudName, segmentId, workloadNetworkSegment, context) - .last() + private Mono updateDhcpAsync(String resourceGroupName, String privateCloudName, + String dhcpId, WorkloadNetworkDhcpUpdate workloadNetworkDhcp, Context context) { + return beginUpdateDhcpAsync(resourceGroupName, privateCloudName, dhcpId, workloadNetworkDhcp, context).last() .flatMap(this.client::getLroFinalResultOrError); } /** - * Create or update a segment by id in a private cloud workload network. - * + * Update a WorkloadNetworkDhcp. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param segmentId NSX Segment identifier. Generally the same as the Segment's display name. - * @param workloadNetworkSegment NSX Segment. + * @param dhcpId The ID of the DHCP configuration. + * @param workloadNetworkDhcp The resource properties to be updated. * @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 nSX Segment. + * @return nSX DHCP. */ @ServiceMethod(returns = ReturnType.SINGLE) - public WorkloadNetworkSegmentInner updateSegments( - String resourceGroupName, - String privateCloudName, - String segmentId, - WorkloadNetworkSegmentInner workloadNetworkSegment) { - return updateSegmentsAsync(resourceGroupName, privateCloudName, segmentId, workloadNetworkSegment).block(); + public WorkloadNetworkDhcpInner updateDhcp(String resourceGroupName, String privateCloudName, String dhcpId, + WorkloadNetworkDhcpUpdate workloadNetworkDhcp) { + return updateDhcpAsync(resourceGroupName, privateCloudName, dhcpId, workloadNetworkDhcp).block(); } /** - * Create or update a segment by id in a private cloud workload network. - * + * Update a WorkloadNetworkDhcp. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param segmentId NSX Segment identifier. Generally the same as the Segment's display name. - * @param workloadNetworkSegment NSX Segment. + * @param dhcpId The ID of the DHCP configuration. + * @param workloadNetworkDhcp The resource properties to be updated. * @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 nSX Segment. + * @return nSX DHCP. */ @ServiceMethod(returns = ReturnType.SINGLE) - public WorkloadNetworkSegmentInner updateSegments( - String resourceGroupName, - String privateCloudName, - String segmentId, - WorkloadNetworkSegmentInner workloadNetworkSegment, - Context context) { - return updateSegmentsAsync(resourceGroupName, privateCloudName, segmentId, workloadNetworkSegment, context) - .block(); + public WorkloadNetworkDhcpInner updateDhcp(String resourceGroupName, String privateCloudName, String dhcpId, + WorkloadNetworkDhcpUpdate workloadNetworkDhcp, Context context) { + return updateDhcpAsync(resourceGroupName, privateCloudName, dhcpId, workloadNetworkDhcp, context).block(); } /** - * Delete a segment by id in a private cloud workload network. - * + * Delete a WorkloadNetworkDhcp. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param segmentId NSX Segment identifier. Generally the same as the Segment's display name. + * @param dhcpId The ID of the DHCP configuration. * @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>> deleteSegmentWithResponseAsync( - String resourceGroupName, String privateCloudName, String segmentId) { + private Mono>> deleteDhcpWithResponseAsync(String resourceGroupName, + String privateCloudName, String dhcpId) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -2180,32 +1686,22 @@ private Mono>> deleteSegmentWithResponseAsync( return Mono .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); } - if (segmentId == null) { - return Mono.error(new IllegalArgumentException("Parameter segmentId is required and cannot be null.")); + if (dhcpId == null) { + return Mono.error(new IllegalArgumentException("Parameter dhcpId is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .deleteSegment( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - this.client.getApiVersion(), - privateCloudName, - segmentId, - accept, - context)) + .withContext(context -> service.deleteDhcp(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, dhcpId, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Delete a segment by id in a private cloud workload network. - * + * Delete a WorkloadNetworkDhcp. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param segmentId NSX Segment identifier. Generally the same as the Segment's display name. + * @param dhcpId The ID of the DHCP configuration. * @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. @@ -2213,19 +1709,15 @@ private Mono>> deleteSegmentWithResponseAsync( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteSegmentWithResponseAsync( - String resourceGroupName, String privateCloudName, String segmentId, Context context) { + private Mono>> deleteDhcpWithResponseAsync(String resourceGroupName, + String privateCloudName, String dhcpId, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -2235,51 +1727,41 @@ private Mono>> deleteSegmentWithResponseAsync( return Mono .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); } - if (segmentId == null) { - return Mono.error(new IllegalArgumentException("Parameter segmentId is required and cannot be null.")); + if (dhcpId == null) { + return Mono.error(new IllegalArgumentException("Parameter dhcpId is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .deleteSegment( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - this.client.getApiVersion(), - privateCloudName, - segmentId, - accept, - context); + return service.deleteDhcp(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, dhcpId, accept, context); } /** - * Delete a segment by id in a private cloud workload network. - * + * Delete a WorkloadNetworkDhcp. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param segmentId NSX Segment identifier. Generally the same as the Segment's display name. + * @param dhcpId The ID of the DHCP configuration. * @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 long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteSegmentAsync( - String resourceGroupName, String privateCloudName, String segmentId) { - Mono>> mono = - deleteSegmentWithResponseAsync(resourceGroupName, privateCloudName, segmentId); - return this - .client - .getLroResult( - mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); + private PollerFlux, Void> beginDeleteDhcpAsync(String resourceGroupName, String privateCloudName, + String dhcpId) { + Mono>> mono + = deleteDhcpWithResponseAsync(resourceGroupName, privateCloudName, dhcpId); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); } /** - * Delete a segment by id in a private cloud workload network. - * + * Delete a WorkloadNetworkDhcp. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param segmentId NSX Segment identifier. Generally the same as the Segment's display name. + * @param dhcpId The ID of the DHCP configuration. * @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. @@ -2287,39 +1769,38 @@ private PollerFlux, Void> beginDeleteSegmentAsync( * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteSegmentAsync( - String resourceGroupName, String privateCloudName, String segmentId, Context context) { + private PollerFlux, Void> beginDeleteDhcpAsync(String resourceGroupName, String privateCloudName, + String dhcpId, Context context) { context = this.client.mergeContext(context); - Mono>> mono = - deleteSegmentWithResponseAsync(resourceGroupName, privateCloudName, segmentId, context); - return this - .client - .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); + Mono>> mono + = deleteDhcpWithResponseAsync(resourceGroupName, privateCloudName, dhcpId, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + context); } /** - * Delete a segment by id in a private cloud workload network. - * + * Delete a WorkloadNetworkDhcp. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param segmentId NSX Segment identifier. Generally the same as the Segment's display name. + * @param dhcpId The ID of the DHCP configuration. * @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 long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDeleteSegment( - String resourceGroupName, String privateCloudName, String segmentId) { - return this.beginDeleteSegmentAsync(resourceGroupName, privateCloudName, segmentId).getSyncPoller(); + public SyncPoller, Void> beginDeleteDhcp(String resourceGroupName, String privateCloudName, + String dhcpId) { + return this.beginDeleteDhcpAsync(resourceGroupName, privateCloudName, dhcpId).getSyncPoller(); } /** - * Delete a segment by id in a private cloud workload network. - * + * Delete a WorkloadNetworkDhcp. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param segmentId NSX Segment identifier. Generally the same as the Segment's display name. + * @param dhcpId The ID of the DHCP configuration. * @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. @@ -2327,35 +1808,34 @@ public SyncPoller, Void> beginDeleteSegment( * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDeleteSegment( - String resourceGroupName, String privateCloudName, String segmentId, Context context) { - return this.beginDeleteSegmentAsync(resourceGroupName, privateCloudName, segmentId, context).getSyncPoller(); + public SyncPoller, Void> beginDeleteDhcp(String resourceGroupName, String privateCloudName, + String dhcpId, Context context) { + return this.beginDeleteDhcpAsync(resourceGroupName, privateCloudName, dhcpId, context).getSyncPoller(); } /** - * Delete a segment by id in a private cloud workload network. - * + * Delete a WorkloadNetworkDhcp. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param segmentId NSX Segment identifier. Generally the same as the Segment's display name. + * @param dhcpId The ID of the DHCP configuration. * @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 deleteSegmentAsync(String resourceGroupName, String privateCloudName, String segmentId) { - return beginDeleteSegmentAsync(resourceGroupName, privateCloudName, segmentId) - .last() + private Mono deleteDhcpAsync(String resourceGroupName, String privateCloudName, String dhcpId) { + return beginDeleteDhcpAsync(resourceGroupName, privateCloudName, dhcpId).last() .flatMap(this.client::getLroFinalResultOrError); } /** - * Delete a segment by id in a private cloud workload network. - * + * Delete a WorkloadNetworkDhcp. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param segmentId NSX Segment identifier. Generally the same as the Segment's display name. + * @param dhcpId The ID of the DHCP configuration. * @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. @@ -2363,68 +1843,64 @@ private Mono deleteSegmentAsync(String resourceGroupName, String privateCl * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteSegmentAsync( - String resourceGroupName, String privateCloudName, String segmentId, Context context) { - return beginDeleteSegmentAsync(resourceGroupName, privateCloudName, segmentId, context) - .last() + private Mono deleteDhcpAsync(String resourceGroupName, String privateCloudName, String dhcpId, + Context context) { + return beginDeleteDhcpAsync(resourceGroupName, privateCloudName, dhcpId, context).last() .flatMap(this.client::getLroFinalResultOrError); } /** - * Delete a segment by id in a private cloud workload network. - * + * Delete a WorkloadNetworkDhcp. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param segmentId NSX Segment identifier. Generally the same as the Segment's display name. + * @param dhcpId The ID of the DHCP configuration. * @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 deleteSegment(String resourceGroupName, String privateCloudName, String segmentId) { - deleteSegmentAsync(resourceGroupName, privateCloudName, segmentId).block(); + public void deleteDhcp(String resourceGroupName, String privateCloudName, String dhcpId) { + deleteDhcpAsync(resourceGroupName, privateCloudName, dhcpId).block(); } /** - * Delete a segment by id in a private cloud workload network. - * + * Delete a WorkloadNetworkDhcp. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param segmentId NSX Segment identifier. Generally the same as the Segment's display name. + * @param dhcpId The ID of the DHCP configuration. * @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. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void deleteSegment(String resourceGroupName, String privateCloudName, String segmentId, Context context) { - deleteSegmentAsync(resourceGroupName, privateCloudName, segmentId, context).block(); + public void deleteDhcp(String resourceGroupName, String privateCloudName, String dhcpId, Context context) { + deleteDhcpAsync(resourceGroupName, privateCloudName, dhcpId, context).block(); } /** - * List dhcp in a private cloud workload network. - * + * List WorkloadNetworkDnsService resources by WorkloadNetwork. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. * @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 list of NSX dhcp entities along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return the response of a WorkloadNetworkDnsService list operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listDhcpSinglePageAsync( - String resourceGroupName, String privateCloudName) { + private Mono> listDnsServicesSinglePageAsync(String resourceGroupName, + String privateCloudName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -2436,54 +1912,35 @@ private Mono> listDhcpSinglePageAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .listDhcp( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - this.client.getApiVersion(), - privateCloudName, - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .withContext(context -> service.listDnsServices(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, 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 dhcp in a private cloud workload network. - * + * List WorkloadNetworkDnsService resources by WorkloadNetwork. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. * @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 a list of NSX dhcp entities along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return the response of a WorkloadNetworkDnsService list operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listDhcpSinglePageAsync( - String resourceGroupName, String privateCloudName, Context context) { + private Mono> listDnsServicesSinglePageAsync(String resourceGroupName, + String privateCloudName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -2496,282 +1953,237 @@ private Mono> listDhcpSinglePageAsync( final String accept = "application/json"; context = this.client.mergeContext(context); return service - .listDhcp( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - this.client.getApiVersion(), - privateCloudName, - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + .listDnsServices(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, privateCloudName, accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** - * List dhcp in a private cloud workload network. - * + * List WorkloadNetworkDnsService resources by WorkloadNetwork. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. * @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 list of NSX dhcp entities as paginated response with {@link PagedFlux}. + * @return the response of a WorkloadNetworkDnsService list operation as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listDhcpAsync(String resourceGroupName, String privateCloudName) { - return new PagedFlux<>( - () -> listDhcpSinglePageAsync(resourceGroupName, privateCloudName), - nextLink -> listDhcpNextSinglePageAsync(nextLink)); + private PagedFlux listDnsServicesAsync(String resourceGroupName, + String privateCloudName) { + return new PagedFlux<>(() -> listDnsServicesSinglePageAsync(resourceGroupName, privateCloudName), + nextLink -> listDnsServicesNextSinglePageAsync(nextLink)); } /** - * List dhcp in a private cloud workload network. - * + * List WorkloadNetworkDnsService resources by WorkloadNetwork. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. * @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 a list of NSX dhcp entities as paginated response with {@link PagedFlux}. + * @return the response of a WorkloadNetworkDnsService list operation as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listDhcpAsync( - String resourceGroupName, String privateCloudName, Context context) { - return new PagedFlux<>( - () -> listDhcpSinglePageAsync(resourceGroupName, privateCloudName, context), - nextLink -> listDhcpNextSinglePageAsync(nextLink, context)); + private PagedFlux listDnsServicesAsync(String resourceGroupName, + String privateCloudName, Context context) { + return new PagedFlux<>(() -> listDnsServicesSinglePageAsync(resourceGroupName, privateCloudName, context), + nextLink -> listDnsServicesNextSinglePageAsync(nextLink, context)); } /** - * List dhcp in a private cloud workload network. - * + * List WorkloadNetworkDnsService resources by WorkloadNetwork. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. * @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 list of NSX dhcp entities as paginated response with {@link PagedIterable}. + * @return the response of a WorkloadNetworkDnsService list operation as paginated response with + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listDhcp(String resourceGroupName, String privateCloudName) { - return new PagedIterable<>(listDhcpAsync(resourceGroupName, privateCloudName)); + public PagedIterable listDnsServices(String resourceGroupName, + String privateCloudName) { + return new PagedIterable<>(listDnsServicesAsync(resourceGroupName, privateCloudName)); } /** - * List dhcp in a private cloud workload network. - * + * List WorkloadNetworkDnsService resources by WorkloadNetwork. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. * @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 a list of NSX dhcp entities as paginated response with {@link PagedIterable}. + * @return the response of a WorkloadNetworkDnsService list operation as paginated response with + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listDhcp( - String resourceGroupName, String privateCloudName, Context context) { - return new PagedIterable<>(listDhcpAsync(resourceGroupName, privateCloudName, context)); + public PagedIterable listDnsServices(String resourceGroupName, + String privateCloudName, Context context) { + return new PagedIterable<>(listDnsServicesAsync(resourceGroupName, privateCloudName, context)); } /** - * Get dhcp by id in a private cloud workload network. - * + * Get a WorkloadNetworkDnsService. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dhcpId NSX DHCP identifier. Generally the same as the DHCP display name. * @param privateCloudName Name of the private cloud. + * @param dnsServiceId ID of the DNS service. * @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 dhcp by id in a private cloud workload network along with {@link Response} on successful completion of - * {@link Mono}. + * @return a WorkloadNetworkDnsService along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getDhcpWithResponseAsync( - String resourceGroupName, String dhcpId, String privateCloudName) { + private Mono> getDnsServiceWithResponseAsync(String resourceGroupName, + String privateCloudName, String dnsServiceId) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + 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 (dhcpId == null) { - return Mono.error(new IllegalArgumentException("Parameter dhcpId is required and cannot be null.")); - } if (privateCloudName == null) { return Mono .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); } + if (dnsServiceId == null) { + return Mono.error(new IllegalArgumentException("Parameter dnsServiceId is required and cannot be null.")); + } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .getDhcp( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - this.client.getApiVersion(), - dhcpId, - privateCloudName, - accept, - context)) + .withContext(context -> service.getDnsService(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, dnsServiceId, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Get dhcp by id in a private cloud workload network. - * + * Get a WorkloadNetworkDnsService. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dhcpId NSX DHCP identifier. Generally the same as the DHCP display name. * @param privateCloudName Name of the private cloud. + * @param dnsServiceId ID of the DNS service. * @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 dhcp by id in a private cloud workload network along with {@link Response} on successful completion of - * {@link Mono}. + * @return a WorkloadNetworkDnsService along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getDhcpWithResponseAsync( - String resourceGroupName, String dhcpId, String privateCloudName, Context context) { + private Mono> getDnsServiceWithResponseAsync(String resourceGroupName, + String privateCloudName, String dnsServiceId, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + 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 (dhcpId == null) { - return Mono.error(new IllegalArgumentException("Parameter dhcpId is required and cannot be null.")); - } if (privateCloudName == null) { return Mono .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); } + if (dnsServiceId == null) { + return Mono.error(new IllegalArgumentException("Parameter dnsServiceId is required and cannot be null.")); + } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .getDhcp( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - this.client.getApiVersion(), - dhcpId, - privateCloudName, - accept, - context); + return service.getDnsService(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, dnsServiceId, accept, context); } /** - * Get dhcp by id in a private cloud workload network. - * + * Get a WorkloadNetworkDnsService. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dhcpId NSX DHCP identifier. Generally the same as the DHCP display name. * @param privateCloudName Name of the private cloud. + * @param dnsServiceId ID of the DNS service. * @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 dhcp by id in a private cloud workload network on successful completion of {@link Mono}. + * @return a WorkloadNetworkDnsService on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getDhcpAsync( - String resourceGroupName, String dhcpId, String privateCloudName) { - return getDhcpWithResponseAsync(resourceGroupName, dhcpId, privateCloudName) + private Mono getDnsServiceAsync(String resourceGroupName, String privateCloudName, + String dnsServiceId) { + return getDnsServiceWithResponseAsync(resourceGroupName, privateCloudName, dnsServiceId) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** - * Get dhcp by id in a private cloud workload network. - * + * Get a WorkloadNetworkDnsService. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dhcpId NSX DHCP identifier. Generally the same as the DHCP display name. * @param privateCloudName Name of the private cloud. + * @param dnsServiceId ID of the DNS service. * @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 dhcp by id in a private cloud workload network along with {@link Response}. + * @return a WorkloadNetworkDnsService along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getDhcpWithResponse( - String resourceGroupName, String dhcpId, String privateCloudName, Context context) { - return getDhcpWithResponseAsync(resourceGroupName, dhcpId, privateCloudName, context).block(); + public Response getDnsServiceWithResponse(String resourceGroupName, + String privateCloudName, String dnsServiceId, Context context) { + return getDnsServiceWithResponseAsync(resourceGroupName, privateCloudName, dnsServiceId, context).block(); } /** - * Get dhcp by id in a private cloud workload network. - * + * Get a WorkloadNetworkDnsService. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dhcpId NSX DHCP identifier. Generally the same as the DHCP display name. * @param privateCloudName Name of the private cloud. + * @param dnsServiceId ID of the DNS service. * @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 dhcp by id in a private cloud workload network. + * @return a WorkloadNetworkDnsService. */ @ServiceMethod(returns = ReturnType.SINGLE) - public WorkloadNetworkDhcpInner getDhcp(String resourceGroupName, String dhcpId, String privateCloudName) { - return getDhcpWithResponse(resourceGroupName, dhcpId, privateCloudName, Context.NONE).getValue(); + public WorkloadNetworkDnsServiceInner getDnsService(String resourceGroupName, String privateCloudName, + String dnsServiceId) { + return getDnsServiceWithResponse(resourceGroupName, privateCloudName, dnsServiceId, Context.NONE).getValue(); } /** - * Create dhcp by id in a private cloud workload network. - * + * Create a WorkloadNetworkDnsService. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param dhcpId NSX DHCP identifier. Generally the same as the DHCP display name. - * @param workloadNetworkDhcp NSX DHCP. + * @param dnsServiceId ID of the DNS service. + * @param workloadNetworkDnsService Resource create parameters. * @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 nSX DHCP along with {@link Response} on successful completion of {@link Mono}. + * @return nSX DNS Service along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createDhcpWithResponseAsync( - String resourceGroupName, - String privateCloudName, - String dhcpId, - WorkloadNetworkDhcpInner workloadNetworkDhcp) { + private Mono>> createDnsServiceWithResponseAsync(String resourceGroupName, + String privateCloudName, String dnsServiceId, WorkloadNetworkDnsServiceInner workloadNetworkDnsService) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -2781,64 +2193,47 @@ private Mono>> createDhcpWithResponseAsync( return Mono .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); } - if (dhcpId == null) { - return Mono.error(new IllegalArgumentException("Parameter dhcpId is required and cannot be null.")); + if (dnsServiceId == null) { + return Mono.error(new IllegalArgumentException("Parameter dnsServiceId is required and cannot be null.")); } - if (workloadNetworkDhcp == null) { - return Mono - .error(new IllegalArgumentException("Parameter workloadNetworkDhcp is required and cannot be null.")); + if (workloadNetworkDnsService == null) { + return Mono.error( + new IllegalArgumentException("Parameter workloadNetworkDnsService is required and cannot be null.")); } else { - workloadNetworkDhcp.validate(); + workloadNetworkDnsService.validate(); } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .createDhcp( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - this.client.getApiVersion(), - privateCloudName, - dhcpId, - workloadNetworkDhcp, - accept, - context)) + .withContext(context -> service.createDnsService(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, dnsServiceId, + workloadNetworkDnsService, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Create dhcp by id in a private cloud workload network. - * + * Create a WorkloadNetworkDnsService. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param dhcpId NSX DHCP identifier. Generally the same as the DHCP display name. - * @param workloadNetworkDhcp NSX DHCP. + * @param dnsServiceId ID of the DNS service. + * @param workloadNetworkDnsService Resource create parameters. * @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 nSX DHCP along with {@link Response} on successful completion of {@link Mono}. + * @return nSX DNS Service along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createDhcpWithResponseAsync( - String resourceGroupName, - String privateCloudName, - String dhcpId, - WorkloadNetworkDhcpInner workloadNetworkDhcp, + private Mono>> createDnsServiceWithResponseAsync(String resourceGroupName, + String privateCloudName, String dnsServiceId, WorkloadNetworkDnsServiceInner workloadNetworkDnsService, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -2848,262 +2243,213 @@ private Mono>> createDhcpWithResponseAsync( return Mono .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); } - if (dhcpId == null) { - return Mono.error(new IllegalArgumentException("Parameter dhcpId is required and cannot be null.")); + if (dnsServiceId == null) { + return Mono.error(new IllegalArgumentException("Parameter dnsServiceId is required and cannot be null.")); } - if (workloadNetworkDhcp == null) { - return Mono - .error(new IllegalArgumentException("Parameter workloadNetworkDhcp is required and cannot be null.")); + if (workloadNetworkDnsService == null) { + return Mono.error( + new IllegalArgumentException("Parameter workloadNetworkDnsService is required and cannot be null.")); } else { - workloadNetworkDhcp.validate(); + workloadNetworkDnsService.validate(); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .createDhcp( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - this.client.getApiVersion(), - privateCloudName, - dhcpId, - workloadNetworkDhcp, - accept, - context); + return service.createDnsService(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, dnsServiceId, + workloadNetworkDnsService, accept, context); } /** - * Create dhcp by id in a private cloud workload network. - * + * Create a WorkloadNetworkDnsService. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param dhcpId NSX DHCP identifier. Generally the same as the DHCP display name. - * @param workloadNetworkDhcp NSX DHCP. + * @param dnsServiceId ID of the DNS service. + * @param workloadNetworkDnsService Resource create parameters. * @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 nSX DHCP. + * @return the {@link PollerFlux} for polling of nSX DNS Service. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, WorkloadNetworkDhcpInner> beginCreateDhcpAsync( - String resourceGroupName, - String privateCloudName, - String dhcpId, - WorkloadNetworkDhcpInner workloadNetworkDhcp) { - Mono>> mono = - createDhcpWithResponseAsync(resourceGroupName, privateCloudName, dhcpId, workloadNetworkDhcp); - return this - .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - WorkloadNetworkDhcpInner.class, - WorkloadNetworkDhcpInner.class, - this.client.getContext()); + private PollerFlux, WorkloadNetworkDnsServiceInner> + beginCreateDnsServiceAsync(String resourceGroupName, String privateCloudName, String dnsServiceId, + WorkloadNetworkDnsServiceInner workloadNetworkDnsService) { + Mono>> mono = createDnsServiceWithResponseAsync(resourceGroupName, privateCloudName, + dnsServiceId, workloadNetworkDnsService); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), WorkloadNetworkDnsServiceInner.class, WorkloadNetworkDnsServiceInner.class, + this.client.getContext()); } /** - * Create dhcp by id in a private cloud workload network. - * + * Create a WorkloadNetworkDnsService. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param dhcpId NSX DHCP identifier. Generally the same as the DHCP display name. - * @param workloadNetworkDhcp NSX DHCP. + * @param dnsServiceId ID of the DNS service. + * @param workloadNetworkDnsService Resource create parameters. * @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 nSX DHCP. + * @return the {@link PollerFlux} for polling of nSX DNS Service. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, WorkloadNetworkDhcpInner> beginCreateDhcpAsync( - String resourceGroupName, - String privateCloudName, - String dhcpId, - WorkloadNetworkDhcpInner workloadNetworkDhcp, - Context context) { + private PollerFlux, WorkloadNetworkDnsServiceInner> + beginCreateDnsServiceAsync(String resourceGroupName, String privateCloudName, String dnsServiceId, + WorkloadNetworkDnsServiceInner workloadNetworkDnsService, Context context) { context = this.client.mergeContext(context); - Mono>> mono = - createDhcpWithResponseAsync(resourceGroupName, privateCloudName, dhcpId, workloadNetworkDhcp, context); - return this - .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - WorkloadNetworkDhcpInner.class, - WorkloadNetworkDhcpInner.class, - context); + Mono>> mono = createDnsServiceWithResponseAsync(resourceGroupName, privateCloudName, + dnsServiceId, workloadNetworkDnsService, context); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), WorkloadNetworkDnsServiceInner.class, WorkloadNetworkDnsServiceInner.class, + context); } /** - * Create dhcp by id in a private cloud workload network. - * + * Create a WorkloadNetworkDnsService. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param dhcpId NSX DHCP identifier. Generally the same as the DHCP display name. - * @param workloadNetworkDhcp NSX DHCP. + * @param dnsServiceId ID of the DNS service. + * @param workloadNetworkDnsService Resource create parameters. * @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 nSX DHCP. + * @return the {@link SyncPoller} for polling of nSX DNS Service. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, WorkloadNetworkDhcpInner> beginCreateDhcp( - String resourceGroupName, - String privateCloudName, - String dhcpId, - WorkloadNetworkDhcpInner workloadNetworkDhcp) { + public SyncPoller, WorkloadNetworkDnsServiceInner> beginCreateDnsService( + String resourceGroupName, String privateCloudName, String dnsServiceId, + WorkloadNetworkDnsServiceInner workloadNetworkDnsService) { return this - .beginCreateDhcpAsync(resourceGroupName, privateCloudName, dhcpId, workloadNetworkDhcp) + .beginCreateDnsServiceAsync(resourceGroupName, privateCloudName, dnsServiceId, workloadNetworkDnsService) .getSyncPoller(); } /** - * Create dhcp by id in a private cloud workload network. - * + * Create a WorkloadNetworkDnsService. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param dhcpId NSX DHCP identifier. Generally the same as the DHCP display name. - * @param workloadNetworkDhcp NSX DHCP. + * @param dnsServiceId ID of the DNS service. + * @param workloadNetworkDnsService Resource create parameters. * @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 nSX DHCP. + * @return the {@link SyncPoller} for polling of nSX DNS Service. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, WorkloadNetworkDhcpInner> beginCreateDhcp( - String resourceGroupName, - String privateCloudName, - String dhcpId, - WorkloadNetworkDhcpInner workloadNetworkDhcp, - Context context) { - return this - .beginCreateDhcpAsync(resourceGroupName, privateCloudName, dhcpId, workloadNetworkDhcp, context) - .getSyncPoller(); + public SyncPoller, WorkloadNetworkDnsServiceInner> beginCreateDnsService( + String resourceGroupName, String privateCloudName, String dnsServiceId, + WorkloadNetworkDnsServiceInner workloadNetworkDnsService, Context context) { + return this.beginCreateDnsServiceAsync(resourceGroupName, privateCloudName, dnsServiceId, + workloadNetworkDnsService, context).getSyncPoller(); } /** - * Create dhcp by id in a private cloud workload network. - * + * Create a WorkloadNetworkDnsService. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param dhcpId NSX DHCP identifier. Generally the same as the DHCP display name. - * @param workloadNetworkDhcp NSX DHCP. + * @param dnsServiceId ID of the DNS service. + * @param workloadNetworkDnsService Resource create parameters. * @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 nSX DHCP on successful completion of {@link Mono}. + * @return nSX DNS Service on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createDhcpAsync( - String resourceGroupName, - String privateCloudName, - String dhcpId, - WorkloadNetworkDhcpInner workloadNetworkDhcp) { - return beginCreateDhcpAsync(resourceGroupName, privateCloudName, dhcpId, workloadNetworkDhcp) - .last() - .flatMap(this.client::getLroFinalResultOrError); + private Mono createDnsServiceAsync(String resourceGroupName, + String privateCloudName, String dnsServiceId, WorkloadNetworkDnsServiceInner workloadNetworkDnsService) { + return beginCreateDnsServiceAsync(resourceGroupName, privateCloudName, dnsServiceId, workloadNetworkDnsService) + .last().flatMap(this.client::getLroFinalResultOrError); } /** - * Create dhcp by id in a private cloud workload network. - * + * Create a WorkloadNetworkDnsService. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param dhcpId NSX DHCP identifier. Generally the same as the DHCP display name. - * @param workloadNetworkDhcp NSX DHCP. + * @param dnsServiceId ID of the DNS service. + * @param workloadNetworkDnsService Resource create parameters. * @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 nSX DHCP on successful completion of {@link Mono}. + * @return nSX DNS Service on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createDhcpAsync( - String resourceGroupName, - String privateCloudName, - String dhcpId, - WorkloadNetworkDhcpInner workloadNetworkDhcp, + private Mono createDnsServiceAsync(String resourceGroupName, + String privateCloudName, String dnsServiceId, WorkloadNetworkDnsServiceInner workloadNetworkDnsService, Context context) { - return beginCreateDhcpAsync(resourceGroupName, privateCloudName, dhcpId, workloadNetworkDhcp, context) - .last() - .flatMap(this.client::getLroFinalResultOrError); + return beginCreateDnsServiceAsync(resourceGroupName, privateCloudName, dnsServiceId, workloadNetworkDnsService, + context).last().flatMap(this.client::getLroFinalResultOrError); } /** - * Create dhcp by id in a private cloud workload network. - * + * Create a WorkloadNetworkDnsService. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param dhcpId NSX DHCP identifier. Generally the same as the DHCP display name. - * @param workloadNetworkDhcp NSX DHCP. + * @param dnsServiceId ID of the DNS service. + * @param workloadNetworkDnsService Resource create parameters. * @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 nSX DHCP. + * @return nSX DNS Service. */ @ServiceMethod(returns = ReturnType.SINGLE) - public WorkloadNetworkDhcpInner createDhcp( - String resourceGroupName, - String privateCloudName, - String dhcpId, - WorkloadNetworkDhcpInner workloadNetworkDhcp) { - return createDhcpAsync(resourceGroupName, privateCloudName, dhcpId, workloadNetworkDhcp).block(); + public WorkloadNetworkDnsServiceInner createDnsService(String resourceGroupName, String privateCloudName, + String dnsServiceId, WorkloadNetworkDnsServiceInner workloadNetworkDnsService) { + return createDnsServiceAsync(resourceGroupName, privateCloudName, dnsServiceId, workloadNetworkDnsService) + .block(); } /** - * Create dhcp by id in a private cloud workload network. - * + * Create a WorkloadNetworkDnsService. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param dhcpId NSX DHCP identifier. Generally the same as the DHCP display name. - * @param workloadNetworkDhcp NSX DHCP. + * @param dnsServiceId ID of the DNS service. + * @param workloadNetworkDnsService Resource create parameters. * @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 nSX DHCP. + * @return nSX DNS Service. */ @ServiceMethod(returns = ReturnType.SINGLE) - public WorkloadNetworkDhcpInner createDhcp( - String resourceGroupName, - String privateCloudName, - String dhcpId, - WorkloadNetworkDhcpInner workloadNetworkDhcp, - Context context) { - return createDhcpAsync(resourceGroupName, privateCloudName, dhcpId, workloadNetworkDhcp, context).block(); + public WorkloadNetworkDnsServiceInner createDnsService(String resourceGroupName, String privateCloudName, + String dnsServiceId, WorkloadNetworkDnsServiceInner workloadNetworkDnsService, Context context) { + return createDnsServiceAsync(resourceGroupName, privateCloudName, dnsServiceId, workloadNetworkDnsService, + context).block(); } /** - * Create or update dhcp by id in a private cloud workload network. - * + * Update a WorkloadNetworkDnsService. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param dhcpId NSX DHCP identifier. Generally the same as the DHCP display name. - * @param workloadNetworkDhcp NSX DHCP. + * @param dnsServiceId ID of the DNS service. + * @param workloadNetworkDnsService The resource properties to be updated. * @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 nSX DHCP along with {@link Response} on successful completion of {@link Mono}. + * @return nSX DNS Service along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateDhcpWithResponseAsync( - String resourceGroupName, - String privateCloudName, - String dhcpId, - WorkloadNetworkDhcpInner workloadNetworkDhcp) { + private Mono>> updateDnsServiceWithResponseAsync(String resourceGroupName, + String privateCloudName, String dnsServiceId, WorkloadNetworkDnsServiceUpdate workloadNetworkDnsService) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -3113,64 +2459,47 @@ private Mono>> updateDhcpWithResponseAsync( return Mono .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); } - if (dhcpId == null) { - return Mono.error(new IllegalArgumentException("Parameter dhcpId is required and cannot be null.")); + if (dnsServiceId == null) { + return Mono.error(new IllegalArgumentException("Parameter dnsServiceId is required and cannot be null.")); } - if (workloadNetworkDhcp == null) { - return Mono - .error(new IllegalArgumentException("Parameter workloadNetworkDhcp is required and cannot be null.")); + if (workloadNetworkDnsService == null) { + return Mono.error( + new IllegalArgumentException("Parameter workloadNetworkDnsService is required and cannot be null.")); } else { - workloadNetworkDhcp.validate(); + workloadNetworkDnsService.validate(); } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .updateDhcp( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - this.client.getApiVersion(), - privateCloudName, - dhcpId, - workloadNetworkDhcp, - accept, - context)) + .withContext(context -> service.updateDnsService(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, dnsServiceId, + workloadNetworkDnsService, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Create or update dhcp by id in a private cloud workload network. - * + * Update a WorkloadNetworkDnsService. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param dhcpId NSX DHCP identifier. Generally the same as the DHCP display name. - * @param workloadNetworkDhcp NSX DHCP. + * @param dnsServiceId ID of the DNS service. + * @param workloadNetworkDnsService The resource properties to be updated. * @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 nSX DHCP along with {@link Response} on successful completion of {@link Mono}. + * @return nSX DNS Service along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateDhcpWithResponseAsync( - String resourceGroupName, - String privateCloudName, - String dhcpId, - WorkloadNetworkDhcpInner workloadNetworkDhcp, + private Mono>> updateDnsServiceWithResponseAsync(String resourceGroupName, + String privateCloudName, String dnsServiceId, WorkloadNetworkDnsServiceUpdate workloadNetworkDnsService, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -3180,293 +2509,237 @@ private Mono>> updateDhcpWithResponseAsync( return Mono .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); } - if (dhcpId == null) { - return Mono.error(new IllegalArgumentException("Parameter dhcpId is required and cannot be null.")); + if (dnsServiceId == null) { + return Mono.error(new IllegalArgumentException("Parameter dnsServiceId is required and cannot be null.")); } - if (workloadNetworkDhcp == null) { - return Mono - .error(new IllegalArgumentException("Parameter workloadNetworkDhcp is required and cannot be null.")); + if (workloadNetworkDnsService == null) { + return Mono.error( + new IllegalArgumentException("Parameter workloadNetworkDnsService is required and cannot be null.")); } else { - workloadNetworkDhcp.validate(); + workloadNetworkDnsService.validate(); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .updateDhcp( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - this.client.getApiVersion(), - privateCloudName, - dhcpId, - workloadNetworkDhcp, - accept, - context); + return service.updateDnsService(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, dnsServiceId, + workloadNetworkDnsService, accept, context); } /** - * Create or update dhcp by id in a private cloud workload network. - * + * Update a WorkloadNetworkDnsService. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param dhcpId NSX DHCP identifier. Generally the same as the DHCP display name. - * @param workloadNetworkDhcp NSX DHCP. + * @param dnsServiceId ID of the DNS service. + * @param workloadNetworkDnsService The resource properties to be updated. * @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 nSX DHCP. + * @return the {@link PollerFlux} for polling of nSX DNS Service. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, WorkloadNetworkDhcpInner> beginUpdateDhcpAsync( - String resourceGroupName, - String privateCloudName, - String dhcpId, - WorkloadNetworkDhcpInner workloadNetworkDhcp) { - Mono>> mono = - updateDhcpWithResponseAsync(resourceGroupName, privateCloudName, dhcpId, workloadNetworkDhcp); - return this - .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - WorkloadNetworkDhcpInner.class, - WorkloadNetworkDhcpInner.class, - this.client.getContext()); + private PollerFlux, WorkloadNetworkDnsServiceInner> + beginUpdateDnsServiceAsync(String resourceGroupName, String privateCloudName, String dnsServiceId, + WorkloadNetworkDnsServiceUpdate workloadNetworkDnsService) { + Mono>> mono = updateDnsServiceWithResponseAsync(resourceGroupName, privateCloudName, + dnsServiceId, workloadNetworkDnsService); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), WorkloadNetworkDnsServiceInner.class, WorkloadNetworkDnsServiceInner.class, + this.client.getContext()); } /** - * Create or update dhcp by id in a private cloud workload network. - * + * Update a WorkloadNetworkDnsService. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param dhcpId NSX DHCP identifier. Generally the same as the DHCP display name. - * @param workloadNetworkDhcp NSX DHCP. + * @param dnsServiceId ID of the DNS service. + * @param workloadNetworkDnsService The resource properties to be updated. * @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 nSX DHCP. + * @return the {@link PollerFlux} for polling of nSX DNS Service. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, WorkloadNetworkDhcpInner> beginUpdateDhcpAsync( - String resourceGroupName, - String privateCloudName, - String dhcpId, - WorkloadNetworkDhcpInner workloadNetworkDhcp, - Context context) { + private PollerFlux, WorkloadNetworkDnsServiceInner> + beginUpdateDnsServiceAsync(String resourceGroupName, String privateCloudName, String dnsServiceId, + WorkloadNetworkDnsServiceUpdate workloadNetworkDnsService, Context context) { context = this.client.mergeContext(context); - Mono>> mono = - updateDhcpWithResponseAsync(resourceGroupName, privateCloudName, dhcpId, workloadNetworkDhcp, context); - return this - .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - WorkloadNetworkDhcpInner.class, - WorkloadNetworkDhcpInner.class, - context); + Mono>> mono = updateDnsServiceWithResponseAsync(resourceGroupName, privateCloudName, + dnsServiceId, workloadNetworkDnsService, context); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), WorkloadNetworkDnsServiceInner.class, WorkloadNetworkDnsServiceInner.class, + context); } /** - * Create or update dhcp by id in a private cloud workload network. - * + * Update a WorkloadNetworkDnsService. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param dhcpId NSX DHCP identifier. Generally the same as the DHCP display name. - * @param workloadNetworkDhcp NSX DHCP. + * @param dnsServiceId ID of the DNS service. + * @param workloadNetworkDnsService The resource properties to be updated. * @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 nSX DHCP. + * @return the {@link SyncPoller} for polling of nSX DNS Service. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, WorkloadNetworkDhcpInner> beginUpdateDhcp( - String resourceGroupName, - String privateCloudName, - String dhcpId, - WorkloadNetworkDhcpInner workloadNetworkDhcp) { + public SyncPoller, WorkloadNetworkDnsServiceInner> beginUpdateDnsService( + String resourceGroupName, String privateCloudName, String dnsServiceId, + WorkloadNetworkDnsServiceUpdate workloadNetworkDnsService) { return this - .beginUpdateDhcpAsync(resourceGroupName, privateCloudName, dhcpId, workloadNetworkDhcp) + .beginUpdateDnsServiceAsync(resourceGroupName, privateCloudName, dnsServiceId, workloadNetworkDnsService) .getSyncPoller(); } /** - * Create or update dhcp by id in a private cloud workload network. - * + * Update a WorkloadNetworkDnsService. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param dhcpId NSX DHCP identifier. Generally the same as the DHCP display name. - * @param workloadNetworkDhcp NSX DHCP. + * @param dnsServiceId ID of the DNS service. + * @param workloadNetworkDnsService The resource properties to be updated. * @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 nSX DHCP. + * @return the {@link SyncPoller} for polling of nSX DNS Service. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, WorkloadNetworkDhcpInner> beginUpdateDhcp( - String resourceGroupName, - String privateCloudName, - String dhcpId, - WorkloadNetworkDhcpInner workloadNetworkDhcp, - Context context) { - return this - .beginUpdateDhcpAsync(resourceGroupName, privateCloudName, dhcpId, workloadNetworkDhcp, context) - .getSyncPoller(); + public SyncPoller, WorkloadNetworkDnsServiceInner> beginUpdateDnsService( + String resourceGroupName, String privateCloudName, String dnsServiceId, + WorkloadNetworkDnsServiceUpdate workloadNetworkDnsService, Context context) { + return this.beginUpdateDnsServiceAsync(resourceGroupName, privateCloudName, dnsServiceId, + workloadNetworkDnsService, context).getSyncPoller(); } /** - * Create or update dhcp by id in a private cloud workload network. - * + * Update a WorkloadNetworkDnsService. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param dhcpId NSX DHCP identifier. Generally the same as the DHCP display name. - * @param workloadNetworkDhcp NSX DHCP. + * @param dnsServiceId ID of the DNS service. + * @param workloadNetworkDnsService The resource properties to be updated. * @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 nSX DHCP on successful completion of {@link Mono}. + * @return nSX DNS Service on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateDhcpAsync( - String resourceGroupName, - String privateCloudName, - String dhcpId, - WorkloadNetworkDhcpInner workloadNetworkDhcp) { - return beginUpdateDhcpAsync(resourceGroupName, privateCloudName, dhcpId, workloadNetworkDhcp) - .last() - .flatMap(this.client::getLroFinalResultOrError); + private Mono updateDnsServiceAsync(String resourceGroupName, + String privateCloudName, String dnsServiceId, WorkloadNetworkDnsServiceUpdate workloadNetworkDnsService) { + return beginUpdateDnsServiceAsync(resourceGroupName, privateCloudName, dnsServiceId, workloadNetworkDnsService) + .last().flatMap(this.client::getLroFinalResultOrError); } /** - * Create or update dhcp by id in a private cloud workload network. - * + * Update a WorkloadNetworkDnsService. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param dhcpId NSX DHCP identifier. Generally the same as the DHCP display name. - * @param workloadNetworkDhcp NSX DHCP. + * @param dnsServiceId ID of the DNS service. + * @param workloadNetworkDnsService The resource properties to be updated. * @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 nSX DHCP on successful completion of {@link Mono}. + * @return nSX DNS Service on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateDhcpAsync( - String resourceGroupName, - String privateCloudName, - String dhcpId, - WorkloadNetworkDhcpInner workloadNetworkDhcp, + private Mono updateDnsServiceAsync(String resourceGroupName, + String privateCloudName, String dnsServiceId, WorkloadNetworkDnsServiceUpdate workloadNetworkDnsService, Context context) { - return beginUpdateDhcpAsync(resourceGroupName, privateCloudName, dhcpId, workloadNetworkDhcp, context) - .last() - .flatMap(this.client::getLroFinalResultOrError); + return beginUpdateDnsServiceAsync(resourceGroupName, privateCloudName, dnsServiceId, workloadNetworkDnsService, + context).last().flatMap(this.client::getLroFinalResultOrError); } /** - * Create or update dhcp by id in a private cloud workload network. - * + * Update a WorkloadNetworkDnsService. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param dhcpId NSX DHCP identifier. Generally the same as the DHCP display name. - * @param workloadNetworkDhcp NSX DHCP. + * @param dnsServiceId ID of the DNS service. + * @param workloadNetworkDnsService The resource properties to be updated. * @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 nSX DHCP. + * @return nSX DNS Service. */ @ServiceMethod(returns = ReturnType.SINGLE) - public WorkloadNetworkDhcpInner updateDhcp( - String resourceGroupName, - String privateCloudName, - String dhcpId, - WorkloadNetworkDhcpInner workloadNetworkDhcp) { - return updateDhcpAsync(resourceGroupName, privateCloudName, dhcpId, workloadNetworkDhcp).block(); + public WorkloadNetworkDnsServiceInner updateDnsService(String resourceGroupName, String privateCloudName, + String dnsServiceId, WorkloadNetworkDnsServiceUpdate workloadNetworkDnsService) { + return updateDnsServiceAsync(resourceGroupName, privateCloudName, dnsServiceId, workloadNetworkDnsService) + .block(); } /** - * Create or update dhcp by id in a private cloud workload network. - * + * Update a WorkloadNetworkDnsService. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param dhcpId NSX DHCP identifier. Generally the same as the DHCP display name. - * @param workloadNetworkDhcp NSX DHCP. + * @param dnsServiceId ID of the DNS service. + * @param workloadNetworkDnsService The resource properties to be updated. * @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 nSX DHCP. + * @return nSX DNS Service. */ @ServiceMethod(returns = ReturnType.SINGLE) - public WorkloadNetworkDhcpInner updateDhcp( - String resourceGroupName, - String privateCloudName, - String dhcpId, - WorkloadNetworkDhcpInner workloadNetworkDhcp, - Context context) { - return updateDhcpAsync(resourceGroupName, privateCloudName, dhcpId, workloadNetworkDhcp, context).block(); + public WorkloadNetworkDnsServiceInner updateDnsService(String resourceGroupName, String privateCloudName, + String dnsServiceId, WorkloadNetworkDnsServiceUpdate workloadNetworkDnsService, Context context) { + return updateDnsServiceAsync(resourceGroupName, privateCloudName, dnsServiceId, workloadNetworkDnsService, + context).block(); } /** - * Delete dhcp by id in a private cloud workload network. - * + * Delete a WorkloadNetworkDnsService. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dnsServiceId ID of the DNS service. * @param privateCloudName Name of the private cloud. - * @param dhcpId NSX DHCP identifier. Generally the same as the DHCP display name. * @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>> deleteDhcpWithResponseAsync( - String resourceGroupName, String privateCloudName, String dhcpId) { + private Mono>> deleteDnsServiceWithResponseAsync(String resourceGroupName, + String dnsServiceId, String privateCloudName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + 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 (dnsServiceId == null) { + return Mono.error(new IllegalArgumentException("Parameter dnsServiceId is required and cannot be null.")); + } if (privateCloudName == null) { return Mono .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); } - if (dhcpId == null) { - return Mono.error(new IllegalArgumentException("Parameter dhcpId is required and cannot be null.")); - } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .deleteDhcp( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - this.client.getApiVersion(), - privateCloudName, - dhcpId, - accept, - context)) + .withContext(context -> service.deleteDnsService(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, dnsServiceId, privateCloudName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Delete dhcp by id in a private cloud workload network. - * + * Delete a WorkloadNetworkDnsService. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dnsServiceId ID of the DNS service. * @param privateCloudName Name of the private cloud. - * @param dhcpId NSX DHCP identifier. Generally the same as the DHCP display name. * @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. @@ -3474,73 +2747,59 @@ private Mono>> deleteDhcpWithResponseAsync( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteDhcpWithResponseAsync( - String resourceGroupName, String privateCloudName, String dhcpId, Context context) { + private Mono>> deleteDnsServiceWithResponseAsync(String resourceGroupName, + String dnsServiceId, String privateCloudName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + 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 (dnsServiceId == null) { + return Mono.error(new IllegalArgumentException("Parameter dnsServiceId is required and cannot be null.")); + } if (privateCloudName == null) { return Mono .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); } - if (dhcpId == null) { - return Mono.error(new IllegalArgumentException("Parameter dhcpId is required and cannot be null.")); - } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .deleteDhcp( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - this.client.getApiVersion(), - privateCloudName, - dhcpId, - accept, - context); + return service.deleteDnsService(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, dnsServiceId, privateCloudName, accept, context); } /** - * Delete dhcp by id in a private cloud workload network. - * + * Delete a WorkloadNetworkDnsService. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dnsServiceId ID of the DNS service. * @param privateCloudName Name of the private cloud. - * @param dhcpId NSX DHCP identifier. Generally the same as the DHCP display name. * @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 long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteDhcpAsync( - String resourceGroupName, String privateCloudName, String dhcpId) { - Mono>> mono = - deleteDhcpWithResponseAsync(resourceGroupName, privateCloudName, dhcpId); - return this - .client - .getLroResult( - mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); + private PollerFlux, Void> beginDeleteDnsServiceAsync(String resourceGroupName, String dnsServiceId, + String privateCloudName) { + Mono>> mono + = deleteDnsServiceWithResponseAsync(resourceGroupName, dnsServiceId, privateCloudName); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); } /** - * Delete dhcp by id in a private cloud workload network. - * + * Delete a WorkloadNetworkDnsService. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dnsServiceId ID of the DNS service. * @param privateCloudName Name of the private cloud. - * @param dhcpId NSX DHCP identifier. Generally the same as the DHCP display name. * @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. @@ -3548,39 +2807,38 @@ private PollerFlux, Void> beginDeleteDhcpAsync( * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteDhcpAsync( - String resourceGroupName, String privateCloudName, String dhcpId, Context context) { + private PollerFlux, Void> beginDeleteDnsServiceAsync(String resourceGroupName, String dnsServiceId, + String privateCloudName, Context context) { context = this.client.mergeContext(context); - Mono>> mono = - deleteDhcpWithResponseAsync(resourceGroupName, privateCloudName, dhcpId, context); - return this - .client - .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); + Mono>> mono + = deleteDnsServiceWithResponseAsync(resourceGroupName, dnsServiceId, privateCloudName, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + context); } /** - * Delete dhcp by id in a private cloud workload network. - * + * Delete a WorkloadNetworkDnsService. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dnsServiceId ID of the DNS service. * @param privateCloudName Name of the private cloud. - * @param dhcpId NSX DHCP identifier. Generally the same as the DHCP display name. * @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 long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDeleteDhcp( - String resourceGroupName, String privateCloudName, String dhcpId) { - return this.beginDeleteDhcpAsync(resourceGroupName, privateCloudName, dhcpId).getSyncPoller(); + public SyncPoller, Void> beginDeleteDnsService(String resourceGroupName, String dnsServiceId, + String privateCloudName) { + return this.beginDeleteDnsServiceAsync(resourceGroupName, dnsServiceId, privateCloudName).getSyncPoller(); } /** - * Delete dhcp by id in a private cloud workload network. - * + * Delete a WorkloadNetworkDnsService. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dnsServiceId ID of the DNS service. * @param privateCloudName Name of the private cloud. - * @param dhcpId NSX DHCP identifier. Generally the same as the DHCP display name. * @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. @@ -3588,35 +2846,35 @@ public SyncPoller, Void> beginDeleteDhcp( * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDeleteDhcp( - String resourceGroupName, String privateCloudName, String dhcpId, Context context) { - return this.beginDeleteDhcpAsync(resourceGroupName, privateCloudName, dhcpId, context).getSyncPoller(); + public SyncPoller, Void> beginDeleteDnsService(String resourceGroupName, String dnsServiceId, + String privateCloudName, Context context) { + return this.beginDeleteDnsServiceAsync(resourceGroupName, dnsServiceId, privateCloudName, context) + .getSyncPoller(); } /** - * Delete dhcp by id in a private cloud workload network. - * + * Delete a WorkloadNetworkDnsService. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dnsServiceId ID of the DNS service. * @param privateCloudName Name of the private cloud. - * @param dhcpId NSX DHCP identifier. Generally the same as the DHCP display name. * @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 deleteDhcpAsync(String resourceGroupName, String privateCloudName, String dhcpId) { - return beginDeleteDhcpAsync(resourceGroupName, privateCloudName, dhcpId) - .last() + private Mono deleteDnsServiceAsync(String resourceGroupName, String dnsServiceId, String privateCloudName) { + return beginDeleteDnsServiceAsync(resourceGroupName, dnsServiceId, privateCloudName).last() .flatMap(this.client::getLroFinalResultOrError); } /** - * Delete dhcp by id in a private cloud workload network. - * + * Delete a WorkloadNetworkDnsService. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dnsServiceId ID of the DNS service. * @param privateCloudName Name of the private cloud. - * @param dhcpId NSX DHCP identifier. Generally the same as the DHCP display name. * @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. @@ -3624,68 +2882,65 @@ private Mono deleteDhcpAsync(String resourceGroupName, String privateCloud * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteDhcpAsync( - String resourceGroupName, String privateCloudName, String dhcpId, Context context) { - return beginDeleteDhcpAsync(resourceGroupName, privateCloudName, dhcpId, context) - .last() + private Mono deleteDnsServiceAsync(String resourceGroupName, String dnsServiceId, String privateCloudName, + Context context) { + return beginDeleteDnsServiceAsync(resourceGroupName, dnsServiceId, privateCloudName, context).last() .flatMap(this.client::getLroFinalResultOrError); } /** - * Delete dhcp by id in a private cloud workload network. - * + * Delete a WorkloadNetworkDnsService. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dnsServiceId ID of the DNS service. * @param privateCloudName Name of the private cloud. - * @param dhcpId NSX DHCP identifier. Generally the same as the DHCP display name. * @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 deleteDhcp(String resourceGroupName, String privateCloudName, String dhcpId) { - deleteDhcpAsync(resourceGroupName, privateCloudName, dhcpId).block(); + public void deleteDnsService(String resourceGroupName, String dnsServiceId, String privateCloudName) { + deleteDnsServiceAsync(resourceGroupName, dnsServiceId, privateCloudName).block(); } /** - * Delete dhcp by id in a private cloud workload network. - * + * Delete a WorkloadNetworkDnsService. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dnsServiceId ID of the DNS service. * @param privateCloudName Name of the private cloud. - * @param dhcpId NSX DHCP identifier. Generally the same as the DHCP display name. * @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. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void deleteDhcp(String resourceGroupName, String privateCloudName, String dhcpId, Context context) { - deleteDhcpAsync(resourceGroupName, privateCloudName, dhcpId, context).block(); + public void deleteDnsService(String resourceGroupName, String dnsServiceId, String privateCloudName, + Context context) { + deleteDnsServiceAsync(resourceGroupName, dnsServiceId, privateCloudName, context).block(); } /** - * List of gateways in a private cloud workload network. - * + * List WorkloadNetworkDnsZone resources by WorkloadNetwork. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. * @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 list of NSX Gateways along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return the response of a WorkloadNetworkDnsZone list operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listGatewaysSinglePageAsync( - String resourceGroupName, String privateCloudName) { + private Mono> listDnsZonesSinglePageAsync(String resourceGroupName, + String privateCloudName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -3697,54 +2952,35 @@ private Mono> listGatewaysSinglePageA } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .listGateways( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - this.client.getApiVersion(), - privateCloudName, - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .withContext(context -> service.listDnsZones(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, 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 of gateways in a private cloud workload network. - * + * List WorkloadNetworkDnsZone resources by WorkloadNetwork. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. * @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 a list of NSX Gateways along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return the response of a WorkloadNetworkDnsZone list operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listGatewaysSinglePageAsync( - String resourceGroupName, String privateCloudName, Context context) { + private Mono> listDnsZonesSinglePageAsync(String resourceGroupName, + String privateCloudName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -3757,120 +2993,100 @@ private Mono> listGatewaysSinglePageA final String accept = "application/json"; context = this.client.mergeContext(context); return service - .listGateways( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - this.client.getApiVersion(), - privateCloudName, - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + .listDnsZones(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, privateCloudName, accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** - * List of gateways in a private cloud workload network. - * + * List WorkloadNetworkDnsZone resources by WorkloadNetwork. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. * @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 list of NSX Gateways as paginated response with {@link PagedFlux}. + * @return the response of a WorkloadNetworkDnsZone list operation as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listGatewaysAsync( - String resourceGroupName, String privateCloudName) { - return new PagedFlux<>( - () -> listGatewaysSinglePageAsync(resourceGroupName, privateCloudName), - nextLink -> listGatewaysNextSinglePageAsync(nextLink)); + private PagedFlux listDnsZonesAsync(String resourceGroupName, + String privateCloudName) { + return new PagedFlux<>(() -> listDnsZonesSinglePageAsync(resourceGroupName, privateCloudName), + nextLink -> listDnsZonesNextSinglePageAsync(nextLink)); } /** - * List of gateways in a private cloud workload network. - * + * List WorkloadNetworkDnsZone resources by WorkloadNetwork. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. * @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 a list of NSX Gateways as paginated response with {@link PagedFlux}. + * @return the response of a WorkloadNetworkDnsZone list operation as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listGatewaysAsync( - String resourceGroupName, String privateCloudName, Context context) { - return new PagedFlux<>( - () -> listGatewaysSinglePageAsync(resourceGroupName, privateCloudName, context), - nextLink -> listGatewaysNextSinglePageAsync(nextLink, context)); + private PagedFlux listDnsZonesAsync(String resourceGroupName, String privateCloudName, + Context context) { + return new PagedFlux<>(() -> listDnsZonesSinglePageAsync(resourceGroupName, privateCloudName, context), + nextLink -> listDnsZonesNextSinglePageAsync(nextLink, context)); } /** - * List of gateways in a private cloud workload network. - * + * List WorkloadNetworkDnsZone resources by WorkloadNetwork. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. * @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 list of NSX Gateways as paginated response with {@link PagedIterable}. + * @return the response of a WorkloadNetworkDnsZone list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listGateways(String resourceGroupName, String privateCloudName) { - return new PagedIterable<>(listGatewaysAsync(resourceGroupName, privateCloudName)); + public PagedIterable listDnsZones(String resourceGroupName, String privateCloudName) { + return new PagedIterable<>(listDnsZonesAsync(resourceGroupName, privateCloudName)); } /** - * List of gateways in a private cloud workload network. - * + * List WorkloadNetworkDnsZone resources by WorkloadNetwork. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. * @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 a list of NSX Gateways as paginated response with {@link PagedIterable}. + * @return the response of a WorkloadNetworkDnsZone list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listGateways( - String resourceGroupName, String privateCloudName, Context context) { - return new PagedIterable<>(listGatewaysAsync(resourceGroupName, privateCloudName, context)); + public PagedIterable listDnsZones(String resourceGroupName, String privateCloudName, + Context context) { + return new PagedIterable<>(listDnsZonesAsync(resourceGroupName, privateCloudName, context)); } /** - * Get a gateway by id in a private cloud workload network. - * + * Get a WorkloadNetworkDnsZone. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param gatewayId NSX Gateway identifier. Generally the same as the Gateway's display name. + * @param dnsZoneId ID of the DNS zone. * @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 gateway by id in a private cloud workload network along with {@link Response} on successful completion - * of {@link Mono}. + * @return a WorkloadNetworkDnsZone along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getGatewayWithResponseAsync( - String resourceGroupName, String privateCloudName, String gatewayId) { + private Mono> getDnsZoneWithResponseAsync(String resourceGroupName, + String privateCloudName, String dnsZoneId) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -3880,53 +3096,38 @@ private Mono> getGatewayWithResponseAsync( return Mono .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); } - if (gatewayId == null) { - return Mono.error(new IllegalArgumentException("Parameter gatewayId is required and cannot be null.")); + if (dnsZoneId == null) { + return Mono.error(new IllegalArgumentException("Parameter dnsZoneId is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .getGateway( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - this.client.getApiVersion(), - privateCloudName, - gatewayId, - accept, - context)) + .withContext(context -> service.getDnsZone(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, dnsZoneId, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Get a gateway by id in a private cloud workload network. - * + * Get a WorkloadNetworkDnsZone. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param gatewayId NSX Gateway identifier. Generally the same as the Gateway's display name. + * @param dnsZoneId ID of the DNS zone. * @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 a gateway by id in a private cloud workload network along with {@link Response} on successful completion - * of {@link Mono}. + * @return a WorkloadNetworkDnsZone along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getGatewayWithResponseAsync( - String resourceGroupName, String privateCloudName, String gatewayId, Context context) { + private Mono> getDnsZoneWithResponseAsync(String resourceGroupName, + String privateCloudName, String dnsZoneId, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -3936,99 +3137,89 @@ private Mono> getGatewayWithResponseAsync( return Mono .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); } - if (gatewayId == null) { - return Mono.error(new IllegalArgumentException("Parameter gatewayId is required and cannot be null.")); + if (dnsZoneId == null) { + return Mono.error(new IllegalArgumentException("Parameter dnsZoneId is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .getGateway( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - this.client.getApiVersion(), - privateCloudName, - gatewayId, - accept, - context); + return service.getDnsZone(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, dnsZoneId, accept, context); } /** - * Get a gateway by id in a private cloud workload network. - * + * Get a WorkloadNetworkDnsZone. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param gatewayId NSX Gateway identifier. Generally the same as the Gateway's display name. + * @param dnsZoneId ID of the DNS zone. * @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 gateway by id in a private cloud workload network on successful completion of {@link Mono}. + * @return a WorkloadNetworkDnsZone on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getGatewayAsync( - String resourceGroupName, String privateCloudName, String gatewayId) { - return getGatewayWithResponseAsync(resourceGroupName, privateCloudName, gatewayId) + private Mono getDnsZoneAsync(String resourceGroupName, String privateCloudName, + String dnsZoneId) { + return getDnsZoneWithResponseAsync(resourceGroupName, privateCloudName, dnsZoneId) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** - * Get a gateway by id in a private cloud workload network. - * + * Get a WorkloadNetworkDnsZone. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param gatewayId NSX Gateway identifier. Generally the same as the Gateway's display name. + * @param dnsZoneId ID of the DNS zone. * @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 a gateway by id in a private cloud workload network along with {@link Response}. + * @return a WorkloadNetworkDnsZone along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getGatewayWithResponse( - String resourceGroupName, String privateCloudName, String gatewayId, Context context) { - return getGatewayWithResponseAsync(resourceGroupName, privateCloudName, gatewayId, context).block(); + public Response getDnsZoneWithResponse(String resourceGroupName, + String privateCloudName, String dnsZoneId, Context context) { + return getDnsZoneWithResponseAsync(resourceGroupName, privateCloudName, dnsZoneId, context).block(); } /** - * Get a gateway by id in a private cloud workload network. - * + * Get a WorkloadNetworkDnsZone. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param gatewayId NSX Gateway identifier. Generally the same as the Gateway's display name. + * @param dnsZoneId ID of the DNS zone. * @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 gateway by id in a private cloud workload network. + * @return a WorkloadNetworkDnsZone. */ @ServiceMethod(returns = ReturnType.SINGLE) - public WorkloadNetworkGatewayInner getGateway(String resourceGroupName, String privateCloudName, String gatewayId) { - return getGatewayWithResponse(resourceGroupName, privateCloudName, gatewayId, Context.NONE).getValue(); + public WorkloadNetworkDnsZoneInner getDnsZone(String resourceGroupName, String privateCloudName, String dnsZoneId) { + return getDnsZoneWithResponse(resourceGroupName, privateCloudName, dnsZoneId, Context.NONE).getValue(); } /** - * List of port mirroring profiles in a private cloud workload network. - * + * Create a WorkloadNetworkDnsZone. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param dnsZoneId ID of the DNS zone. + * @param workloadNetworkDnsZone Resource create parameters. * @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 list of NSX Port Mirroring along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return nSX DNS Zone along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listPortMirroringSinglePageAsync( - String resourceGroupName, String privateCloudName) { + private Mono>> createDnsZoneWithResponseAsync(String resourceGroupName, + String privateCloudName, String dnsZoneId, WorkloadNetworkDnsZoneInner workloadNetworkDnsZone) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -4038,56 +3229,47 @@ private Mono> listPortMirroring return Mono .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); } + if (dnsZoneId == null) { + return Mono.error(new IllegalArgumentException("Parameter dnsZoneId is required and cannot be null.")); + } + if (workloadNetworkDnsZone == null) { + return Mono.error( + new IllegalArgumentException("Parameter workloadNetworkDnsZone is required and cannot be null.")); + } else { + workloadNetworkDnsZone.validate(); + } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .listPortMirroring( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - this.client.getApiVersion(), - privateCloudName, - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .withContext(context -> service.createDnsZone(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, dnsZoneId, workloadNetworkDnsZone, + accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * List of port mirroring profiles in a private cloud workload network. - * + * Create a WorkloadNetworkDnsZone. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param dnsZoneId ID of the DNS zone. + * @param workloadNetworkDnsZone Resource create parameters. * @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 a list of NSX Port Mirroring along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return nSX DNS Zone along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listPortMirroringSinglePageAsync( - String resourceGroupName, String privateCloudName, Context context) { + private Mono>> createDnsZoneWithResponseAsync(String resourceGroupName, + String privateCloudName, String dnsZoneId, WorkloadNetworkDnsZoneInner workloadNetworkDnsZone, + Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -4097,292 +3279,211 @@ private Mono> listPortMirroring return Mono .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); } + if (dnsZoneId == null) { + return Mono.error(new IllegalArgumentException("Parameter dnsZoneId is required and cannot be null.")); + } + if (workloadNetworkDnsZone == null) { + return Mono.error( + new IllegalArgumentException("Parameter workloadNetworkDnsZone is required and cannot be null.")); + } else { + workloadNetworkDnsZone.validate(); + } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .listPortMirroring( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - this.client.getApiVersion(), - privateCloudName, - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.createDnsZone(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, dnsZoneId, workloadNetworkDnsZone, + accept, context); } /** - * List of port mirroring profiles in a private cloud workload network. - * + * Create a WorkloadNetworkDnsZone. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param dnsZoneId ID of the DNS zone. + * @param workloadNetworkDnsZone Resource create parameters. * @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 list of NSX Port Mirroring as paginated response with {@link PagedFlux}. + * @return the {@link PollerFlux} for polling of nSX DNS Zone. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listPortMirroringAsync( - String resourceGroupName, String privateCloudName) { - return new PagedFlux<>( - () -> listPortMirroringSinglePageAsync(resourceGroupName, privateCloudName), - nextLink -> listPortMirroringNextSinglePageAsync(nextLink)); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, WorkloadNetworkDnsZoneInner> beginCreateDnsZoneAsync( + String resourceGroupName, String privateCloudName, String dnsZoneId, + WorkloadNetworkDnsZoneInner workloadNetworkDnsZone) { + Mono>> mono + = createDnsZoneWithResponseAsync(resourceGroupName, privateCloudName, dnsZoneId, workloadNetworkDnsZone); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), WorkloadNetworkDnsZoneInner.class, WorkloadNetworkDnsZoneInner.class, + this.client.getContext()); } /** - * List of port mirroring profiles in a private cloud workload network. - * + * Create a WorkloadNetworkDnsZone. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param dnsZoneId ID of the DNS zone. + * @param workloadNetworkDnsZone Resource create parameters. * @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 a list of NSX Port Mirroring as paginated response with {@link PagedFlux}. + * @return the {@link PollerFlux} for polling of nSX DNS Zone. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listPortMirroringAsync( - String resourceGroupName, String privateCloudName, Context context) { - return new PagedFlux<>( - () -> listPortMirroringSinglePageAsync(resourceGroupName, privateCloudName, context), - nextLink -> listPortMirroringNextSinglePageAsync(nextLink, context)); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, WorkloadNetworkDnsZoneInner> beginCreateDnsZoneAsync( + String resourceGroupName, String privateCloudName, String dnsZoneId, + WorkloadNetworkDnsZoneInner workloadNetworkDnsZone, Context context) { + context = this.client.mergeContext(context); + Mono>> mono = createDnsZoneWithResponseAsync(resourceGroupName, privateCloudName, + dnsZoneId, workloadNetworkDnsZone, context); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), WorkloadNetworkDnsZoneInner.class, WorkloadNetworkDnsZoneInner.class, + context); } /** - * List of port mirroring profiles in a private cloud workload network. - * + * Create a WorkloadNetworkDnsZone. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param dnsZoneId ID of the DNS zone. + * @param workloadNetworkDnsZone Resource create parameters. * @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 list of NSX Port Mirroring as paginated response with {@link PagedIterable}. + * @return the {@link SyncPoller} for polling of nSX DNS Zone. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listPortMirroring( - String resourceGroupName, String privateCloudName) { - return new PagedIterable<>(listPortMirroringAsync(resourceGroupName, privateCloudName)); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, WorkloadNetworkDnsZoneInner> beginCreateDnsZone( + String resourceGroupName, String privateCloudName, String dnsZoneId, + WorkloadNetworkDnsZoneInner workloadNetworkDnsZone) { + return this.beginCreateDnsZoneAsync(resourceGroupName, privateCloudName, dnsZoneId, workloadNetworkDnsZone) + .getSyncPoller(); } /** - * List of port mirroring profiles in a private cloud workload network. - * + * Create a WorkloadNetworkDnsZone. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param dnsZoneId ID of the DNS zone. + * @param workloadNetworkDnsZone Resource create parameters. * @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 a list of NSX Port Mirroring as paginated response with {@link PagedIterable}. + * @return the {@link SyncPoller} for polling of nSX DNS Zone. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listPortMirroring( - String resourceGroupName, String privateCloudName, Context context) { - return new PagedIterable<>(listPortMirroringAsync(resourceGroupName, privateCloudName, context)); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, WorkloadNetworkDnsZoneInner> beginCreateDnsZone( + String resourceGroupName, String privateCloudName, String dnsZoneId, + WorkloadNetworkDnsZoneInner workloadNetworkDnsZone, Context context) { + return this + .beginCreateDnsZoneAsync(resourceGroupName, privateCloudName, dnsZoneId, workloadNetworkDnsZone, context) + .getSyncPoller(); } /** - * Get a port mirroring profile by id in a private cloud workload network. - * + * Create a WorkloadNetworkDnsZone. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param portMirroringId NSX Port Mirroring identifier. Generally the same as the Port Mirroring display name. + * @param dnsZoneId ID of the DNS zone. + * @param workloadNetworkDnsZone Resource create parameters. * @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 port mirroring profile by id in a private cloud workload network along with {@link Response} on - * successful completion of {@link Mono}. + * @return nSX DNS Zone on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getPortMirroringWithResponseAsync( - String resourceGroupName, String privateCloudName, String portMirroringId) { - 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 (privateCloudName == null) { - return Mono - .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); - } - if (portMirroringId == null) { - return Mono - .error(new IllegalArgumentException("Parameter portMirroringId is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .getPortMirroring( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - this.client.getApiVersion(), - privateCloudName, - portMirroringId, - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + private Mono createDnsZoneAsync(String resourceGroupName, String privateCloudName, + String dnsZoneId, WorkloadNetworkDnsZoneInner workloadNetworkDnsZone) { + return beginCreateDnsZoneAsync(resourceGroupName, privateCloudName, dnsZoneId, workloadNetworkDnsZone).last() + .flatMap(this.client::getLroFinalResultOrError); } /** - * Get a port mirroring profile by id in a private cloud workload network. - * + * Create a WorkloadNetworkDnsZone. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param portMirroringId NSX Port Mirroring identifier. Generally the same as the Port Mirroring display name. + * @param dnsZoneId ID of the DNS zone. + * @param workloadNetworkDnsZone Resource create parameters. * @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 a port mirroring profile by id in a private cloud workload network along with {@link Response} on - * successful completion of {@link Mono}. + * @return nSX DNS Zone on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getPortMirroringWithResponseAsync( - String resourceGroupName, String privateCloudName, String portMirroringId, 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 (privateCloudName == null) { - return Mono - .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); - } - if (portMirroringId == null) { - return Mono - .error(new IllegalArgumentException("Parameter portMirroringId is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .getPortMirroring( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - this.client.getApiVersion(), - privateCloudName, - portMirroringId, - accept, - context); + private Mono createDnsZoneAsync(String resourceGroupName, String privateCloudName, + String dnsZoneId, WorkloadNetworkDnsZoneInner workloadNetworkDnsZone, Context context) { + return beginCreateDnsZoneAsync(resourceGroupName, privateCloudName, dnsZoneId, workloadNetworkDnsZone, context) + .last().flatMap(this.client::getLroFinalResultOrError); } /** - * Get a port mirroring profile by id in a private cloud workload network. - * + * Create a WorkloadNetworkDnsZone. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param portMirroringId NSX Port Mirroring identifier. Generally the same as the Port Mirroring display name. + * @param dnsZoneId ID of the DNS zone. + * @param workloadNetworkDnsZone Resource create parameters. * @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 port mirroring profile by id in a private cloud workload network on successful completion of {@link - * Mono}. + * @return nSX DNS Zone. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getPortMirroringAsync( - String resourceGroupName, String privateCloudName, String portMirroringId) { - return getPortMirroringWithResponseAsync(resourceGroupName, privateCloudName, portMirroringId) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); + public WorkloadNetworkDnsZoneInner createDnsZone(String resourceGroupName, String privateCloudName, + String dnsZoneId, WorkloadNetworkDnsZoneInner workloadNetworkDnsZone) { + return createDnsZoneAsync(resourceGroupName, privateCloudName, dnsZoneId, workloadNetworkDnsZone).block(); } /** - * Get a port mirroring profile by id in a private cloud workload network. - * + * Create a WorkloadNetworkDnsZone. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param portMirroringId NSX Port Mirroring identifier. Generally the same as the Port Mirroring display name. + * @param dnsZoneId ID of the DNS zone. + * @param workloadNetworkDnsZone Resource create parameters. * @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 a port mirroring profile by id in a private cloud workload network along with {@link Response}. + * @return nSX DNS Zone. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getPortMirroringWithResponse( - String resourceGroupName, String privateCloudName, String portMirroringId, Context context) { - return getPortMirroringWithResponseAsync(resourceGroupName, privateCloudName, portMirroringId, context).block(); + public WorkloadNetworkDnsZoneInner createDnsZone(String resourceGroupName, String privateCloudName, + String dnsZoneId, WorkloadNetworkDnsZoneInner workloadNetworkDnsZone, Context context) { + return createDnsZoneAsync(resourceGroupName, privateCloudName, dnsZoneId, workloadNetworkDnsZone, context) + .block(); } /** - * Get a port mirroring profile by id in a private cloud workload network. - * + * Update a WorkloadNetworkDnsZone. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param portMirroringId NSX Port Mirroring identifier. Generally the same as the Port Mirroring display name. + * @param dnsZoneId ID of the DNS zone. + * @param workloadNetworkDnsZone The resource properties to be updated. * @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 port mirroring profile by id in a private cloud workload network. + * @return nSX DNS Zone along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public WorkloadNetworkPortMirroringInner getPortMirroring( - String resourceGroupName, String privateCloudName, String portMirroringId) { - return getPortMirroringWithResponse(resourceGroupName, privateCloudName, portMirroringId, Context.NONE) - .getValue(); - } - - /** - * Create a port mirroring profile by id in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param portMirroringId NSX Port Mirroring identifier. Generally the same as the Port Mirroring display name. - * @param workloadNetworkPortMirroring NSX port mirroring. - * @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 nSX Port Mirroring along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createPortMirroringWithResponseAsync( - String resourceGroupName, - String privateCloudName, - String portMirroringId, - WorkloadNetworkPortMirroringInner workloadNetworkPortMirroring) { + private Mono>> updateDnsZoneWithResponseAsync(String resourceGroupName, + String privateCloudName, String dnsZoneId, WorkloadNetworkDnsZoneUpdate workloadNetworkDnsZone) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -4392,67 +3493,47 @@ private Mono>> createPortMirroringWithResponseAsync( return Mono .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); } - if (portMirroringId == null) { - return Mono - .error(new IllegalArgumentException("Parameter portMirroringId is required and cannot be null.")); + if (dnsZoneId == null) { + return Mono.error(new IllegalArgumentException("Parameter dnsZoneId is required and cannot be null.")); } - if (workloadNetworkPortMirroring == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter workloadNetworkPortMirroring is required and cannot be null.")); + if (workloadNetworkDnsZone == null) { + return Mono.error( + new IllegalArgumentException("Parameter workloadNetworkDnsZone is required and cannot be null.")); } else { - workloadNetworkPortMirroring.validate(); + workloadNetworkDnsZone.validate(); } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .createPortMirroring( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - this.client.getApiVersion(), - privateCloudName, - portMirroringId, - workloadNetworkPortMirroring, - accept, - context)) + .withContext(context -> service.updateDnsZone(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, dnsZoneId, workloadNetworkDnsZone, + accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Create a port mirroring profile by id in a private cloud workload network. - * + * Update a WorkloadNetworkDnsZone. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param portMirroringId NSX Port Mirroring identifier. Generally the same as the Port Mirroring display name. - * @param workloadNetworkPortMirroring NSX port mirroring. + * @param dnsZoneId ID of the DNS zone. + * @param workloadNetworkDnsZone The resource properties to be updated. * @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 nSX Port Mirroring along with {@link Response} on successful completion of {@link Mono}. + * @return nSX DNS Zone along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createPortMirroringWithResponseAsync( - String resourceGroupName, - String privateCloudName, - String portMirroringId, - WorkloadNetworkPortMirroringInner workloadNetworkPortMirroring, + private Mono>> updateDnsZoneWithResponseAsync(String resourceGroupName, + String privateCloudName, String dnsZoneId, WorkloadNetworkDnsZoneUpdate workloadNetworkDnsZone, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -4462,692 +3543,479 @@ private Mono>> createPortMirroringWithResponseAsync( return Mono .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); } - if (portMirroringId == null) { - return Mono - .error(new IllegalArgumentException("Parameter portMirroringId is required and cannot be null.")); + if (dnsZoneId == null) { + return Mono.error(new IllegalArgumentException("Parameter dnsZoneId is required and cannot be null.")); } - if (workloadNetworkPortMirroring == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter workloadNetworkPortMirroring is required and cannot be null.")); + if (workloadNetworkDnsZone == null) { + return Mono.error( + new IllegalArgumentException("Parameter workloadNetworkDnsZone is required and cannot be null.")); } else { - workloadNetworkPortMirroring.validate(); + workloadNetworkDnsZone.validate(); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .createPortMirroring( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - this.client.getApiVersion(), - privateCloudName, - portMirroringId, - workloadNetworkPortMirroring, - accept, - context); + return service.updateDnsZone(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, dnsZoneId, workloadNetworkDnsZone, + accept, context); } /** - * Create a port mirroring profile by id in a private cloud workload network. - * + * Update a WorkloadNetworkDnsZone. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param portMirroringId NSX Port Mirroring identifier. Generally the same as the Port Mirroring display name. - * @param workloadNetworkPortMirroring NSX port mirroring. + * @param dnsZoneId ID of the DNS zone. + * @param workloadNetworkDnsZone The resource properties to be updated. * @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 nSX Port Mirroring. + * @return the {@link PollerFlux} for polling of nSX DNS Zone. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, WorkloadNetworkPortMirroringInner> - beginCreatePortMirroringAsync( - String resourceGroupName, - String privateCloudName, - String portMirroringId, - WorkloadNetworkPortMirroringInner workloadNetworkPortMirroring) { - Mono>> mono = - createPortMirroringWithResponseAsync( - resourceGroupName, privateCloudName, portMirroringId, workloadNetworkPortMirroring); - return this - .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - WorkloadNetworkPortMirroringInner.class, - WorkloadNetworkPortMirroringInner.class, - this.client.getContext()); + private PollerFlux, WorkloadNetworkDnsZoneInner> beginUpdateDnsZoneAsync( + String resourceGroupName, String privateCloudName, String dnsZoneId, + WorkloadNetworkDnsZoneUpdate workloadNetworkDnsZone) { + Mono>> mono + = updateDnsZoneWithResponseAsync(resourceGroupName, privateCloudName, dnsZoneId, workloadNetworkDnsZone); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), WorkloadNetworkDnsZoneInner.class, WorkloadNetworkDnsZoneInner.class, + this.client.getContext()); } /** - * Create a port mirroring profile by id in a private cloud workload network. - * + * Update a WorkloadNetworkDnsZone. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param portMirroringId NSX Port Mirroring identifier. Generally the same as the Port Mirroring display name. - * @param workloadNetworkPortMirroring NSX port mirroring. + * @param dnsZoneId ID of the DNS zone. + * @param workloadNetworkDnsZone The resource properties to be updated. * @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 nSX Port Mirroring. + * @return the {@link PollerFlux} for polling of nSX DNS Zone. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, WorkloadNetworkPortMirroringInner> - beginCreatePortMirroringAsync( - String resourceGroupName, - String privateCloudName, - String portMirroringId, - WorkloadNetworkPortMirroringInner workloadNetworkPortMirroring, - Context context) { + private PollerFlux, WorkloadNetworkDnsZoneInner> beginUpdateDnsZoneAsync( + String resourceGroupName, String privateCloudName, String dnsZoneId, + WorkloadNetworkDnsZoneUpdate workloadNetworkDnsZone, Context context) { context = this.client.mergeContext(context); - Mono>> mono = - createPortMirroringWithResponseAsync( - resourceGroupName, privateCloudName, portMirroringId, workloadNetworkPortMirroring, context); - return this - .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - WorkloadNetworkPortMirroringInner.class, - WorkloadNetworkPortMirroringInner.class, - context); + Mono>> mono = updateDnsZoneWithResponseAsync(resourceGroupName, privateCloudName, + dnsZoneId, workloadNetworkDnsZone, context); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), WorkloadNetworkDnsZoneInner.class, WorkloadNetworkDnsZoneInner.class, + context); } /** - * Create a port mirroring profile by id in a private cloud workload network. - * + * Update a WorkloadNetworkDnsZone. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param portMirroringId NSX Port Mirroring identifier. Generally the same as the Port Mirroring display name. - * @param workloadNetworkPortMirroring NSX port mirroring. + * @param dnsZoneId ID of the DNS zone. + * @param workloadNetworkDnsZone The resource properties to be updated. * @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 nSX Port Mirroring. + * @return the {@link SyncPoller} for polling of nSX DNS Zone. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, WorkloadNetworkPortMirroringInner> - beginCreatePortMirroring( - String resourceGroupName, - String privateCloudName, - String portMirroringId, - WorkloadNetworkPortMirroringInner workloadNetworkPortMirroring) { - return this - .beginCreatePortMirroringAsync( - resourceGroupName, privateCloudName, portMirroringId, workloadNetworkPortMirroring) + public SyncPoller, WorkloadNetworkDnsZoneInner> beginUpdateDnsZone( + String resourceGroupName, String privateCloudName, String dnsZoneId, + WorkloadNetworkDnsZoneUpdate workloadNetworkDnsZone) { + return this.beginUpdateDnsZoneAsync(resourceGroupName, privateCloudName, dnsZoneId, workloadNetworkDnsZone) .getSyncPoller(); } /** - * Create a port mirroring profile by id in a private cloud workload network. - * + * Update a WorkloadNetworkDnsZone. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param portMirroringId NSX Port Mirroring identifier. Generally the same as the Port Mirroring display name. - * @param workloadNetworkPortMirroring NSX port mirroring. + * @param dnsZoneId ID of the DNS zone. + * @param workloadNetworkDnsZone The resource properties to be updated. * @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 nSX Port Mirroring. + * @return the {@link SyncPoller} for polling of nSX DNS Zone. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, WorkloadNetworkPortMirroringInner> - beginCreatePortMirroring( - String resourceGroupName, - String privateCloudName, - String portMirroringId, - WorkloadNetworkPortMirroringInner workloadNetworkPortMirroring, - Context context) { + public SyncPoller, WorkloadNetworkDnsZoneInner> beginUpdateDnsZone( + String resourceGroupName, String privateCloudName, String dnsZoneId, + WorkloadNetworkDnsZoneUpdate workloadNetworkDnsZone, Context context) { return this - .beginCreatePortMirroringAsync( - resourceGroupName, privateCloudName, portMirroringId, workloadNetworkPortMirroring, context) + .beginUpdateDnsZoneAsync(resourceGroupName, privateCloudName, dnsZoneId, workloadNetworkDnsZone, context) .getSyncPoller(); } /** - * Create a port mirroring profile by id in a private cloud workload network. - * + * Update a WorkloadNetworkDnsZone. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param portMirroringId NSX Port Mirroring identifier. Generally the same as the Port Mirroring display name. - * @param workloadNetworkPortMirroring NSX port mirroring. + * @param dnsZoneId ID of the DNS zone. + * @param workloadNetworkDnsZone The resource properties to be updated. * @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 nSX Port Mirroring on successful completion of {@link Mono}. + * @return nSX DNS Zone on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createPortMirroringAsync( - String resourceGroupName, - String privateCloudName, - String portMirroringId, - WorkloadNetworkPortMirroringInner workloadNetworkPortMirroring) { - return beginCreatePortMirroringAsync( - resourceGroupName, privateCloudName, portMirroringId, workloadNetworkPortMirroring) - .last() + private Mono updateDnsZoneAsync(String resourceGroupName, String privateCloudName, + String dnsZoneId, WorkloadNetworkDnsZoneUpdate workloadNetworkDnsZone) { + return beginUpdateDnsZoneAsync(resourceGroupName, privateCloudName, dnsZoneId, workloadNetworkDnsZone).last() .flatMap(this.client::getLroFinalResultOrError); } /** - * Create a port mirroring profile by id in a private cloud workload network. - * + * Update a WorkloadNetworkDnsZone. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param portMirroringId NSX Port Mirroring identifier. Generally the same as the Port Mirroring display name. - * @param workloadNetworkPortMirroring NSX port mirroring. + * @param dnsZoneId ID of the DNS zone. + * @param workloadNetworkDnsZone The resource properties to be updated. * @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 nSX Port Mirroring on successful completion of {@link Mono}. + * @return nSX DNS Zone on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createPortMirroringAsync( - String resourceGroupName, - String privateCloudName, - String portMirroringId, - WorkloadNetworkPortMirroringInner workloadNetworkPortMirroring, - Context context) { - return beginCreatePortMirroringAsync( - resourceGroupName, privateCloudName, portMirroringId, workloadNetworkPortMirroring, context) - .last() - .flatMap(this.client::getLroFinalResultOrError); + private Mono updateDnsZoneAsync(String resourceGroupName, String privateCloudName, + String dnsZoneId, WorkloadNetworkDnsZoneUpdate workloadNetworkDnsZone, Context context) { + return beginUpdateDnsZoneAsync(resourceGroupName, privateCloudName, dnsZoneId, workloadNetworkDnsZone, context) + .last().flatMap(this.client::getLroFinalResultOrError); } /** - * Create a port mirroring profile by id in a private cloud workload network. - * + * Update a WorkloadNetworkDnsZone. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param portMirroringId NSX Port Mirroring identifier. Generally the same as the Port Mirroring display name. - * @param workloadNetworkPortMirroring NSX port mirroring. + * @param dnsZoneId ID of the DNS zone. + * @param workloadNetworkDnsZone The resource properties to be updated. * @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 nSX Port Mirroring. + * @return nSX DNS Zone. */ @ServiceMethod(returns = ReturnType.SINGLE) - public WorkloadNetworkPortMirroringInner createPortMirroring( - String resourceGroupName, - String privateCloudName, - String portMirroringId, - WorkloadNetworkPortMirroringInner workloadNetworkPortMirroring) { - return createPortMirroringAsync( - resourceGroupName, privateCloudName, portMirroringId, workloadNetworkPortMirroring) - .block(); + public WorkloadNetworkDnsZoneInner updateDnsZone(String resourceGroupName, String privateCloudName, + String dnsZoneId, WorkloadNetworkDnsZoneUpdate workloadNetworkDnsZone) { + return updateDnsZoneAsync(resourceGroupName, privateCloudName, dnsZoneId, workloadNetworkDnsZone).block(); } /** - * Create a port mirroring profile by id in a private cloud workload network. - * + * Update a WorkloadNetworkDnsZone. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param portMirroringId NSX Port Mirroring identifier. Generally the same as the Port Mirroring display name. - * @param workloadNetworkPortMirroring NSX port mirroring. + * @param dnsZoneId ID of the DNS zone. + * @param workloadNetworkDnsZone The resource properties to be updated. * @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 nSX Port Mirroring. + * @return nSX DNS Zone. */ @ServiceMethod(returns = ReturnType.SINGLE) - public WorkloadNetworkPortMirroringInner createPortMirroring( - String resourceGroupName, - String privateCloudName, - String portMirroringId, - WorkloadNetworkPortMirroringInner workloadNetworkPortMirroring, - Context context) { - return createPortMirroringAsync( - resourceGroupName, privateCloudName, portMirroringId, workloadNetworkPortMirroring, context) + public WorkloadNetworkDnsZoneInner updateDnsZone(String resourceGroupName, String privateCloudName, + String dnsZoneId, WorkloadNetworkDnsZoneUpdate workloadNetworkDnsZone, Context context) { + return updateDnsZoneAsync(resourceGroupName, privateCloudName, dnsZoneId, workloadNetworkDnsZone, context) .block(); } /** - * Create or update a port mirroring profile by id in a private cloud workload network. - * + * Delete a WorkloadNetworkDnsZone. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dnsZoneId ID of the DNS zone. * @param privateCloudName Name of the private cloud. - * @param portMirroringId NSX Port Mirroring identifier. Generally the same as the Port Mirroring display name. - * @param workloadNetworkPortMirroring NSX port mirroring. * @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 nSX Port Mirroring along with {@link Response} on successful completion of {@link Mono}. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updatePortMirroringWithResponseAsync( - String resourceGroupName, - String privateCloudName, - String portMirroringId, - WorkloadNetworkPortMirroringInner workloadNetworkPortMirroring) { + private Mono>> deleteDnsZoneWithResponseAsync(String resourceGroupName, String dnsZoneId, + String privateCloudName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + 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 (dnsZoneId == null) { + return Mono.error(new IllegalArgumentException("Parameter dnsZoneId is required and cannot be null.")); + } if (privateCloudName == null) { return Mono .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); } - if (portMirroringId == null) { - return Mono - .error(new IllegalArgumentException("Parameter portMirroringId is required and cannot be null.")); - } - if (workloadNetworkPortMirroring == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter workloadNetworkPortMirroring is required and cannot be null.")); - } else { - workloadNetworkPortMirroring.validate(); - } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .updatePortMirroring( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - this.client.getApiVersion(), - privateCloudName, - portMirroringId, - workloadNetworkPortMirroring, - accept, - context)) + .withContext(context -> service.deleteDnsZone(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, dnsZoneId, privateCloudName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Create or update a port mirroring profile by id in a private cloud workload network. - * + * Delete a WorkloadNetworkDnsZone. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dnsZoneId ID of the DNS zone. * @param privateCloudName Name of the private cloud. - * @param portMirroringId NSX Port Mirroring identifier. Generally the same as the Port Mirroring display name. - * @param workloadNetworkPortMirroring NSX port mirroring. * @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 nSX Port Mirroring along with {@link Response} on successful completion of {@link Mono}. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updatePortMirroringWithResponseAsync( - String resourceGroupName, - String privateCloudName, - String portMirroringId, - WorkloadNetworkPortMirroringInner workloadNetworkPortMirroring, - Context context) { + private Mono>> deleteDnsZoneWithResponseAsync(String resourceGroupName, String dnsZoneId, + String privateCloudName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + 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 (dnsZoneId == null) { + return Mono.error(new IllegalArgumentException("Parameter dnsZoneId is required and cannot be null.")); + } if (privateCloudName == null) { return Mono .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); } - if (portMirroringId == null) { - return Mono - .error(new IllegalArgumentException("Parameter portMirroringId is required and cannot be null.")); - } - if (workloadNetworkPortMirroring == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter workloadNetworkPortMirroring is required and cannot be null.")); - } else { - workloadNetworkPortMirroring.validate(); - } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .updatePortMirroring( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - this.client.getApiVersion(), - privateCloudName, - portMirroringId, - workloadNetworkPortMirroring, - accept, - context); + return service.deleteDnsZone(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, dnsZoneId, privateCloudName, accept, context); } /** - * Create or update a port mirroring profile by id in a private cloud workload network. - * + * Delete a WorkloadNetworkDnsZone. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dnsZoneId ID of the DNS zone. * @param privateCloudName Name of the private cloud. - * @param portMirroringId NSX Port Mirroring identifier. Generally the same as the Port Mirroring display name. - * @param workloadNetworkPortMirroring NSX port mirroring. * @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 nSX Port Mirroring. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, WorkloadNetworkPortMirroringInner> - beginUpdatePortMirroringAsync( - String resourceGroupName, - String privateCloudName, - String portMirroringId, - WorkloadNetworkPortMirroringInner workloadNetworkPortMirroring) { - Mono>> mono = - updatePortMirroringWithResponseAsync( - resourceGroupName, privateCloudName, portMirroringId, workloadNetworkPortMirroring); - return this - .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - WorkloadNetworkPortMirroringInner.class, - WorkloadNetworkPortMirroringInner.class, - this.client.getContext()); + private PollerFlux, Void> beginDeleteDnsZoneAsync(String resourceGroupName, String dnsZoneId, + String privateCloudName) { + Mono>> mono + = deleteDnsZoneWithResponseAsync(resourceGroupName, dnsZoneId, privateCloudName); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); } /** - * Create or update a port mirroring profile by id in a private cloud workload network. - * + * Delete a WorkloadNetworkDnsZone. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dnsZoneId ID of the DNS zone. * @param privateCloudName Name of the private cloud. - * @param portMirroringId NSX Port Mirroring identifier. Generally the same as the Port Mirroring display name. - * @param workloadNetworkPortMirroring NSX port mirroring. * @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 nSX Port Mirroring. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, WorkloadNetworkPortMirroringInner> - beginUpdatePortMirroringAsync( - String resourceGroupName, - String privateCloudName, - String portMirroringId, - WorkloadNetworkPortMirroringInner workloadNetworkPortMirroring, - Context context) { + private PollerFlux, Void> beginDeleteDnsZoneAsync(String resourceGroupName, String dnsZoneId, + String privateCloudName, Context context) { context = this.client.mergeContext(context); - Mono>> mono = - updatePortMirroringWithResponseAsync( - resourceGroupName, privateCloudName, portMirroringId, workloadNetworkPortMirroring, context); - return this - .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - WorkloadNetworkPortMirroringInner.class, - WorkloadNetworkPortMirroringInner.class, - context); + Mono>> mono + = deleteDnsZoneWithResponseAsync(resourceGroupName, dnsZoneId, privateCloudName, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + context); } /** - * Create or update a port mirroring profile by id in a private cloud workload network. - * + * Delete a WorkloadNetworkDnsZone. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dnsZoneId ID of the DNS zone. * @param privateCloudName Name of the private cloud. - * @param portMirroringId NSX Port Mirroring identifier. Generally the same as the Port Mirroring display name. - * @param workloadNetworkPortMirroring NSX port mirroring. * @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 nSX Port Mirroring. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, WorkloadNetworkPortMirroringInner> - beginUpdatePortMirroring( - String resourceGroupName, - String privateCloudName, - String portMirroringId, - WorkloadNetworkPortMirroringInner workloadNetworkPortMirroring) { - return this - .beginUpdatePortMirroringAsync( - resourceGroupName, privateCloudName, portMirroringId, workloadNetworkPortMirroring) - .getSyncPoller(); + public SyncPoller, Void> beginDeleteDnsZone(String resourceGroupName, String dnsZoneId, + String privateCloudName) { + return this.beginDeleteDnsZoneAsync(resourceGroupName, dnsZoneId, privateCloudName).getSyncPoller(); } /** - * Create or update a port mirroring profile by id in a private cloud workload network. - * + * Delete a WorkloadNetworkDnsZone. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dnsZoneId ID of the DNS zone. * @param privateCloudName Name of the private cloud. - * @param portMirroringId NSX Port Mirroring identifier. Generally the same as the Port Mirroring display name. - * @param workloadNetworkPortMirroring NSX port mirroring. * @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 nSX Port Mirroring. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, WorkloadNetworkPortMirroringInner> - beginUpdatePortMirroring( - String resourceGroupName, - String privateCloudName, - String portMirroringId, - WorkloadNetworkPortMirroringInner workloadNetworkPortMirroring, - Context context) { - return this - .beginUpdatePortMirroringAsync( - resourceGroupName, privateCloudName, portMirroringId, workloadNetworkPortMirroring, context) - .getSyncPoller(); + public SyncPoller, Void> beginDeleteDnsZone(String resourceGroupName, String dnsZoneId, + String privateCloudName, Context context) { + return this.beginDeleteDnsZoneAsync(resourceGroupName, dnsZoneId, privateCloudName, context).getSyncPoller(); } /** - * Create or update a port mirroring profile by id in a private cloud workload network. - * + * Delete a WorkloadNetworkDnsZone. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dnsZoneId ID of the DNS zone. * @param privateCloudName Name of the private cloud. - * @param portMirroringId NSX Port Mirroring identifier. Generally the same as the Port Mirroring display name. - * @param workloadNetworkPortMirroring NSX port mirroring. * @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 nSX Port Mirroring on successful completion of {@link Mono}. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updatePortMirroringAsync( - String resourceGroupName, - String privateCloudName, - String portMirroringId, - WorkloadNetworkPortMirroringInner workloadNetworkPortMirroring) { - return beginUpdatePortMirroringAsync( - resourceGroupName, privateCloudName, portMirroringId, workloadNetworkPortMirroring) - .last() + private Mono deleteDnsZoneAsync(String resourceGroupName, String dnsZoneId, String privateCloudName) { + return beginDeleteDnsZoneAsync(resourceGroupName, dnsZoneId, privateCloudName).last() .flatMap(this.client::getLroFinalResultOrError); } /** - * Create or update a port mirroring profile by id in a private cloud workload network. - * + * Delete a WorkloadNetworkDnsZone. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dnsZoneId ID of the DNS zone. * @param privateCloudName Name of the private cloud. - * @param portMirroringId NSX Port Mirroring identifier. Generally the same as the Port Mirroring display name. - * @param workloadNetworkPortMirroring NSX port mirroring. * @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 nSX Port Mirroring on successful completion of {@link Mono}. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updatePortMirroringAsync( - String resourceGroupName, - String privateCloudName, - String portMirroringId, - WorkloadNetworkPortMirroringInner workloadNetworkPortMirroring, + private Mono deleteDnsZoneAsync(String resourceGroupName, String dnsZoneId, String privateCloudName, Context context) { - return beginUpdatePortMirroringAsync( - resourceGroupName, privateCloudName, portMirroringId, workloadNetworkPortMirroring, context) - .last() + return beginDeleteDnsZoneAsync(resourceGroupName, dnsZoneId, privateCloudName, context).last() .flatMap(this.client::getLroFinalResultOrError); } /** - * Create or update a port mirroring profile by id in a private cloud workload network. - * + * Delete a WorkloadNetworkDnsZone. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dnsZoneId ID of the DNS zone. * @param privateCloudName Name of the private cloud. - * @param portMirroringId NSX Port Mirroring identifier. Generally the same as the Port Mirroring display name. - * @param workloadNetworkPortMirroring NSX port mirroring. * @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 nSX Port Mirroring. */ @ServiceMethod(returns = ReturnType.SINGLE) - public WorkloadNetworkPortMirroringInner updatePortMirroring( - String resourceGroupName, - String privateCloudName, - String portMirroringId, - WorkloadNetworkPortMirroringInner workloadNetworkPortMirroring) { - return updatePortMirroringAsync( - resourceGroupName, privateCloudName, portMirroringId, workloadNetworkPortMirroring) - .block(); + public void deleteDnsZone(String resourceGroupName, String dnsZoneId, String privateCloudName) { + deleteDnsZoneAsync(resourceGroupName, dnsZoneId, privateCloudName).block(); } /** - * Create or update a port mirroring profile by id in a private cloud workload network. - * + * Delete a WorkloadNetworkDnsZone. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dnsZoneId ID of the DNS zone. * @param privateCloudName Name of the private cloud. - * @param portMirroringId NSX Port Mirroring identifier. Generally the same as the Port Mirroring display name. - * @param workloadNetworkPortMirroring NSX port mirroring. * @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 nSX Port Mirroring. */ @ServiceMethod(returns = ReturnType.SINGLE) - public WorkloadNetworkPortMirroringInner updatePortMirroring( - String resourceGroupName, - String privateCloudName, - String portMirroringId, - WorkloadNetworkPortMirroringInner workloadNetworkPortMirroring, - Context context) { - return updatePortMirroringAsync( - resourceGroupName, privateCloudName, portMirroringId, workloadNetworkPortMirroring, context) - .block(); + public void deleteDnsZone(String resourceGroupName, String dnsZoneId, String privateCloudName, Context context) { + deleteDnsZoneAsync(resourceGroupName, dnsZoneId, privateCloudName, context).block(); } /** - * Delete a port mirroring profile by id in a private cloud workload network. - * + * List WorkloadNetworkGateway resources by WorkloadNetwork. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param portMirroringId NSX Port Mirroring identifier. Generally the same as the Port Mirroring display name. * @param privateCloudName Name of the private cloud. * @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}. + * @return the response of a WorkloadNetworkGateway list operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deletePortMirroringWithResponseAsync( - String resourceGroupName, String portMirroringId, String privateCloudName) { + private Mono> listGatewaysSinglePageAsync(String resourceGroupName, + String privateCloudName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + 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 (portMirroringId == null) { - return Mono - .error(new IllegalArgumentException("Parameter portMirroringId is required and cannot be null.")); - } if (privateCloudName == null) { return Mono .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .deletePortMirroring( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - this.client.getApiVersion(), - portMirroringId, - privateCloudName, - accept, - context)) + .withContext(context -> service.listGateways(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, 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())); } /** - * Delete a port mirroring profile by id in a private cloud workload network. - * + * List WorkloadNetworkGateway resources by WorkloadNetwork. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param portMirroringId NSX Port Mirroring identifier. Generally the same as the Port Mirroring display name. * @param privateCloudName Name of the private cloud. * @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}. + * @return the response of a WorkloadNetworkGateway list operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deletePortMirroringWithResponseAsync( - String resourceGroupName, String portMirroringId, String privateCloudName, Context context) { + private Mono> listGatewaysSinglePageAsync(String resourceGroupName, + String privateCloudName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + 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 (portMirroringId == null) { - return Mono - .error(new IllegalArgumentException("Parameter portMirroringId is required and cannot be null.")); - } if (privateCloudName == null) { return Mono .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); @@ -5155,194 +4023,232 @@ private Mono>> deletePortMirroringWithResponseAsync( final String accept = "application/json"; context = this.client.mergeContext(context); return service - .deletePortMirroring( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - this.client.getApiVersion(), - portMirroringId, - privateCloudName, - accept, - context); + .listGateways(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, privateCloudName, accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** - * Delete a port mirroring profile by id in a private cloud workload network. - * + * List WorkloadNetworkGateway resources by WorkloadNetwork. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param portMirroringId NSX Port Mirroring identifier. Generally the same as the Port Mirroring display name. * @param privateCloudName Name of the private cloud. * @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 long-running operation. + * @return the response of a WorkloadNetworkGateway list operation as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeletePortMirroringAsync( - String resourceGroupName, String portMirroringId, String privateCloudName) { - Mono>> mono = - deletePortMirroringWithResponseAsync(resourceGroupName, portMirroringId, privateCloudName); - return this - .client - .getLroResult( - mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listGatewaysAsync(String resourceGroupName, + String privateCloudName) { + return new PagedFlux<>(() -> listGatewaysSinglePageAsync(resourceGroupName, privateCloudName), + nextLink -> listGatewaysNextSinglePageAsync(nextLink)); } /** - * Delete a port mirroring profile by id in a private cloud workload network. - * + * List WorkloadNetworkGateway resources by WorkloadNetwork. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param portMirroringId NSX Port Mirroring identifier. Generally the same as the Port Mirroring display name. * @param privateCloudName Name of the private cloud. * @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 long-running operation. + * @return the response of a WorkloadNetworkGateway list operation as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeletePortMirroringAsync( - String resourceGroupName, String portMirroringId, String privateCloudName, Context context) { - context = this.client.mergeContext(context); - Mono>> mono = - deletePortMirroringWithResponseAsync(resourceGroupName, portMirroringId, privateCloudName, context); - return this - .client - .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listGatewaysAsync(String resourceGroupName, String privateCloudName, + Context context) { + return new PagedFlux<>(() -> listGatewaysSinglePageAsync(resourceGroupName, privateCloudName, context), + nextLink -> listGatewaysNextSinglePageAsync(nextLink, context)); } /** - * Delete a port mirroring profile by id in a private cloud workload network. - * + * List WorkloadNetworkGateway resources by WorkloadNetwork. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param portMirroringId NSX Port Mirroring identifier. Generally the same as the Port Mirroring display name. * @param privateCloudName Name of the private cloud. * @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 long-running operation. + * @return the response of a WorkloadNetworkGateway list operation as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDeletePortMirroring( - String resourceGroupName, String portMirroringId, String privateCloudName) { - return this.beginDeletePortMirroringAsync(resourceGroupName, portMirroringId, privateCloudName).getSyncPoller(); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listGateways(String resourceGroupName, String privateCloudName) { + return new PagedIterable<>(listGatewaysAsync(resourceGroupName, privateCloudName)); } /** - * Delete a port mirroring profile by id in a private cloud workload network. - * + * List WorkloadNetworkGateway resources by WorkloadNetwork. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param portMirroringId NSX Port Mirroring identifier. Generally the same as the Port Mirroring display name. * @param privateCloudName Name of the private cloud. * @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 long-running operation. + * @return the response of a WorkloadNetworkGateway list operation as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDeletePortMirroring( - String resourceGroupName, String portMirroringId, String privateCloudName, Context context) { - return this - .beginDeletePortMirroringAsync(resourceGroupName, portMirroringId, privateCloudName, context) - .getSyncPoller(); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listGateways(String resourceGroupName, String privateCloudName, + Context context) { + return new PagedIterable<>(listGatewaysAsync(resourceGroupName, privateCloudName, context)); } /** - * Delete a port mirroring profile by id in a private cloud workload network. - * + * Get a WorkloadNetworkGateway. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param portMirroringId NSX Port Mirroring identifier. Generally the same as the Port Mirroring display name. * @param privateCloudName Name of the private cloud. + * @param gatewayId The ID of the NSX Gateway. * @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. + * @return a WorkloadNetworkGateway along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deletePortMirroringAsync( - String resourceGroupName, String portMirroringId, String privateCloudName) { - return beginDeletePortMirroringAsync(resourceGroupName, portMirroringId, privateCloudName) - .last() - .flatMap(this.client::getLroFinalResultOrError); + private Mono> getGatewayWithResponseAsync(String resourceGroupName, + String privateCloudName, String gatewayId) { + 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 (privateCloudName == null) { + return Mono + .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } + if (gatewayId == null) { + return Mono.error(new IllegalArgumentException("Parameter gatewayId is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.getGateway(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, gatewayId, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Delete a port mirroring profile by id in a private cloud workload network. - * + * Get a WorkloadNetworkGateway. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param portMirroringId NSX Port Mirroring identifier. Generally the same as the Port Mirroring display name. * @param privateCloudName Name of the private cloud. + * @param gatewayId The ID of the NSX Gateway. * @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 A {@link Mono} that completes when a successful response is received. + * @return a WorkloadNetworkGateway along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deletePortMirroringAsync( - String resourceGroupName, String portMirroringId, String privateCloudName, Context context) { - return beginDeletePortMirroringAsync(resourceGroupName, portMirroringId, privateCloudName, context) - .last() - .flatMap(this.client::getLroFinalResultOrError); + private Mono> getGatewayWithResponseAsync(String resourceGroupName, + String privateCloudName, String gatewayId, 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 (privateCloudName == null) { + return Mono + .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } + if (gatewayId == null) { + return Mono.error(new IllegalArgumentException("Parameter gatewayId is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.getGateway(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, gatewayId, accept, context); } /** - * Delete a port mirroring profile by id in a private cloud workload network. - * + * Get a WorkloadNetworkGateway. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param portMirroringId NSX Port Mirroring identifier. Generally the same as the Port Mirroring display name. * @param privateCloudName Name of the private cloud. + * @param gatewayId The ID of the NSX Gateway. * @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 WorkloadNetworkGateway on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void deletePortMirroring(String resourceGroupName, String portMirroringId, String privateCloudName) { - deletePortMirroringAsync(resourceGroupName, portMirroringId, privateCloudName).block(); + private Mono getGatewayAsync(String resourceGroupName, String privateCloudName, + String gatewayId) { + return getGatewayWithResponseAsync(resourceGroupName, privateCloudName, gatewayId) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** - * Delete a port mirroring profile by id in a private cloud workload network. - * + * Get a WorkloadNetworkGateway. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param portMirroringId NSX Port Mirroring identifier. Generally the same as the Port Mirroring display name. * @param privateCloudName Name of the private cloud. + * @param gatewayId The ID of the NSX Gateway. * @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 a WorkloadNetworkGateway along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void deletePortMirroring( - String resourceGroupName, String portMirroringId, String privateCloudName, Context context) { - deletePortMirroringAsync(resourceGroupName, portMirroringId, privateCloudName, context).block(); + public Response getGatewayWithResponse(String resourceGroupName, + String privateCloudName, String gatewayId, Context context) { + return getGatewayWithResponseAsync(resourceGroupName, privateCloudName, gatewayId, context).block(); + } + + /** + * Get a WorkloadNetworkGateway. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param gatewayId The ID of the NSX Gateway. + * @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 WorkloadNetworkGateway. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public WorkloadNetworkGatewayInner getGateway(String resourceGroupName, String privateCloudName, String gatewayId) { + return getGatewayWithResponse(resourceGroupName, privateCloudName, gatewayId, Context.NONE).getValue(); } /** - * List of vm groups in a private cloud workload network. - * + * List WorkloadNetworkPortMirroring resources by WorkloadNetwork. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. * @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 list of NSX VM Groups along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return the response of a WorkloadNetworkPortMirroring list operation along with {@link PagedResponse} on + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listVMGroupsSinglePageAsync( - String resourceGroupName, String privateCloudName) { + private Mono> + listPortMirroringSinglePageAsync(String resourceGroupName, String privateCloudName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -5354,54 +4260,35 @@ private Mono> listVMGroupsSinglePageA } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .listVMGroups( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - this.client.getApiVersion(), - privateCloudName, - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .withContext(context -> service.listPortMirroring(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, 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 of vm groups in a private cloud workload network. - * + * List WorkloadNetworkPortMirroring resources by WorkloadNetwork. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. * @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 a list of NSX VM Groups along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return the response of a WorkloadNetworkPortMirroring list operation along with {@link PagedResponse} on + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listVMGroupsSinglePageAsync( - String resourceGroupName, String privateCloudName, Context context) { + private Mono> + listPortMirroringSinglePageAsync(String resourceGroupName, String privateCloudName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -5414,120 +4301,105 @@ private Mono> listVMGroupsSinglePageA final String accept = "application/json"; context = this.client.mergeContext(context); return service - .listVMGroups( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - this.client.getApiVersion(), - privateCloudName, - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + .listPortMirroring(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, privateCloudName, accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** - * List of vm groups in a private cloud workload network. - * + * List WorkloadNetworkPortMirroring resources by WorkloadNetwork. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. * @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 list of NSX VM Groups as paginated response with {@link PagedFlux}. + * @return the response of a WorkloadNetworkPortMirroring list operation as paginated response with + * {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listVMGroupsAsync( - String resourceGroupName, String privateCloudName) { - return new PagedFlux<>( - () -> listVMGroupsSinglePageAsync(resourceGroupName, privateCloudName), - nextLink -> listVMGroupsNextSinglePageAsync(nextLink)); + private PagedFlux listPortMirroringAsync(String resourceGroupName, + String privateCloudName) { + return new PagedFlux<>(() -> listPortMirroringSinglePageAsync(resourceGroupName, privateCloudName), + nextLink -> listPortMirroringNextSinglePageAsync(nextLink)); } /** - * List of vm groups in a private cloud workload network. - * + * List WorkloadNetworkPortMirroring resources by WorkloadNetwork. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. * @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 a list of NSX VM Groups as paginated response with {@link PagedFlux}. + * @return the response of a WorkloadNetworkPortMirroring list operation as paginated response with + * {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listVMGroupsAsync( - String resourceGroupName, String privateCloudName, Context context) { - return new PagedFlux<>( - () -> listVMGroupsSinglePageAsync(resourceGroupName, privateCloudName, context), - nextLink -> listVMGroupsNextSinglePageAsync(nextLink, context)); + private PagedFlux listPortMirroringAsync(String resourceGroupName, + String privateCloudName, Context context) { + return new PagedFlux<>(() -> listPortMirroringSinglePageAsync(resourceGroupName, privateCloudName, context), + nextLink -> listPortMirroringNextSinglePageAsync(nextLink, context)); } /** - * List of vm groups in a private cloud workload network. - * + * List WorkloadNetworkPortMirroring resources by WorkloadNetwork. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. * @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 list of NSX VM Groups as paginated response with {@link PagedIterable}. + * @return the response of a WorkloadNetworkPortMirroring list operation as paginated response with + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listVMGroups(String resourceGroupName, String privateCloudName) { - return new PagedIterable<>(listVMGroupsAsync(resourceGroupName, privateCloudName)); + public PagedIterable listPortMirroring(String resourceGroupName, + String privateCloudName) { + return new PagedIterable<>(listPortMirroringAsync(resourceGroupName, privateCloudName)); } /** - * List of vm groups in a private cloud workload network. - * + * List WorkloadNetworkPortMirroring resources by WorkloadNetwork. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. * @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 a list of NSX VM Groups as paginated response with {@link PagedIterable}. + * @return the response of a WorkloadNetworkPortMirroring list operation as paginated response with + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listVMGroups( - String resourceGroupName, String privateCloudName, Context context) { - return new PagedIterable<>(listVMGroupsAsync(resourceGroupName, privateCloudName, context)); + public PagedIterable listPortMirroring(String resourceGroupName, + String privateCloudName, Context context) { + return new PagedIterable<>(listPortMirroringAsync(resourceGroupName, privateCloudName, context)); } /** - * Get a vm group by id in a private cloud workload network. - * + * Get a WorkloadNetworkPortMirroring. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param vmGroupId NSX VM Group identifier. Generally the same as the VM Group's display name. + * @param portMirroringId ID of the NSX port mirroring profile. * @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 vm group by id in a private cloud workload network along with {@link Response} on successful completion - * of {@link Mono}. + * @return a WorkloadNetworkPortMirroring along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getVMGroupWithResponseAsync( - String resourceGroupName, String privateCloudName, String vmGroupId) { + private Mono> + getPortMirroringWithResponseAsync(String resourceGroupName, String privateCloudName, String portMirroringId) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -5537,53 +4409,39 @@ private Mono> getVMGroupWithResponseAsync( return Mono .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); } - if (vmGroupId == null) { - return Mono.error(new IllegalArgumentException("Parameter vmGroupId is required and cannot be null.")); + if (portMirroringId == null) { + return Mono + .error(new IllegalArgumentException("Parameter portMirroringId is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .getVMGroup( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - this.client.getApiVersion(), - privateCloudName, - vmGroupId, - accept, - context)) + .withContext(context -> service.getPortMirroring(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, portMirroringId, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Get a vm group by id in a private cloud workload network. - * + * Get a WorkloadNetworkPortMirroring. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param vmGroupId NSX VM Group identifier. Generally the same as the VM Group's display name. + * @param portMirroringId ID of the NSX port mirroring profile. * @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 a vm group by id in a private cloud workload network along with {@link Response} on successful completion - * of {@link Mono}. + * @return a WorkloadNetworkPortMirroring along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getVMGroupWithResponseAsync( - String resourceGroupName, String privateCloudName, String vmGroupId, Context context) { + private Mono> getPortMirroringWithResponseAsync( + String resourceGroupName, String privateCloudName, String portMirroringId, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -5593,104 +4451,93 @@ private Mono> getVMGroupWithResponseAsync( return Mono .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); } - if (vmGroupId == null) { - return Mono.error(new IllegalArgumentException("Parameter vmGroupId is required and cannot be null.")); + if (portMirroringId == null) { + return Mono + .error(new IllegalArgumentException("Parameter portMirroringId is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .getVMGroup( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - this.client.getApiVersion(), - privateCloudName, - vmGroupId, - accept, - context); + return service.getPortMirroring(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, portMirroringId, accept, context); } /** - * Get a vm group by id in a private cloud workload network. - * + * Get a WorkloadNetworkPortMirroring. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param vmGroupId NSX VM Group identifier. Generally the same as the VM Group's display name. + * @param portMirroringId ID of the NSX port mirroring profile. * @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 vm group by id in a private cloud workload network on successful completion of {@link Mono}. + * @return a WorkloadNetworkPortMirroring on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getVMGroupAsync( - String resourceGroupName, String privateCloudName, String vmGroupId) { - return getVMGroupWithResponseAsync(resourceGroupName, privateCloudName, vmGroupId) + private Mono getPortMirroringAsync(String resourceGroupName, + String privateCloudName, String portMirroringId) { + return getPortMirroringWithResponseAsync(resourceGroupName, privateCloudName, portMirroringId) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** - * Get a vm group by id in a private cloud workload network. - * + * Get a WorkloadNetworkPortMirroring. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param vmGroupId NSX VM Group identifier. Generally the same as the VM Group's display name. + * @param portMirroringId ID of the NSX port mirroring profile. * @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 a vm group by id in a private cloud workload network along with {@link Response}. + * @return a WorkloadNetworkPortMirroring along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getVMGroupWithResponse( - String resourceGroupName, String privateCloudName, String vmGroupId, Context context) { - return getVMGroupWithResponseAsync(resourceGroupName, privateCloudName, vmGroupId, context).block(); + public Response getPortMirroringWithResponse(String resourceGroupName, + String privateCloudName, String portMirroringId, Context context) { + return getPortMirroringWithResponseAsync(resourceGroupName, privateCloudName, portMirroringId, context).block(); } /** - * Get a vm group by id in a private cloud workload network. - * + * Get a WorkloadNetworkPortMirroring. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param vmGroupId NSX VM Group identifier. Generally the same as the VM Group's display name. + * @param portMirroringId ID of the NSX port mirroring profile. * @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 vm group by id in a private cloud workload network. + * @return a WorkloadNetworkPortMirroring. */ @ServiceMethod(returns = ReturnType.SINGLE) - public WorkloadNetworkVMGroupInner getVMGroup(String resourceGroupName, String privateCloudName, String vmGroupId) { - return getVMGroupWithResponse(resourceGroupName, privateCloudName, vmGroupId, Context.NONE).getValue(); + public WorkloadNetworkPortMirroringInner getPortMirroring(String resourceGroupName, String privateCloudName, + String portMirroringId) { + return getPortMirroringWithResponse(resourceGroupName, privateCloudName, portMirroringId, Context.NONE) + .getValue(); } /** - * Create a vm group by id in a private cloud workload network. - * + * Create a WorkloadNetworkPortMirroring. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param vmGroupId NSX VM Group identifier. Generally the same as the VM Group's display name. - * @param workloadNetworkVMGroup NSX VM Group. + * @param portMirroringId ID of the NSX port mirroring profile. + * @param workloadNetworkPortMirroring Resource create parameters. * @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 nSX VM Group along with {@link Response} on successful completion of {@link Mono}. + * @return nSX Port Mirroring along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createVMGroupWithResponseAsync( - String resourceGroupName, - String privateCloudName, - String vmGroupId, - WorkloadNetworkVMGroupInner workloadNetworkVMGroup) { + private Mono>> createPortMirroringWithResponseAsync(String resourceGroupName, + String privateCloudName, String portMirroringId, + WorkloadNetworkPortMirroringInner workloadNetworkPortMirroring) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -5700,65 +4547,48 @@ private Mono>> createVMGroupWithResponseAsync( return Mono .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); } - if (vmGroupId == null) { - return Mono.error(new IllegalArgumentException("Parameter vmGroupId is required and cannot be null.")); - } - if (workloadNetworkVMGroup == null) { + if (portMirroringId == null) { return Mono - .error( - new IllegalArgumentException("Parameter workloadNetworkVMGroup is required and cannot be null.")); + .error(new IllegalArgumentException("Parameter portMirroringId is required and cannot be null.")); + } + if (workloadNetworkPortMirroring == null) { + return Mono.error( + new IllegalArgumentException("Parameter workloadNetworkPortMirroring is required and cannot be null.")); } else { - workloadNetworkVMGroup.validate(); + workloadNetworkPortMirroring.validate(); } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .createVMGroup( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - this.client.getApiVersion(), - privateCloudName, - vmGroupId, - workloadNetworkVMGroup, - accept, - context)) + .withContext(context -> service.createPortMirroring(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, portMirroringId, + workloadNetworkPortMirroring, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Create a vm group by id in a private cloud workload network. - * + * Create a WorkloadNetworkPortMirroring. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param vmGroupId NSX VM Group identifier. Generally the same as the VM Group's display name. - * @param workloadNetworkVMGroup NSX VM Group. + * @param portMirroringId ID of the NSX port mirroring profile. + * @param workloadNetworkPortMirroring Resource create parameters. * @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 nSX VM Group along with {@link Response} on successful completion of {@link Mono}. + * @return nSX Port Mirroring along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createVMGroupWithResponseAsync( - String resourceGroupName, - String privateCloudName, - String vmGroupId, - WorkloadNetworkVMGroupInner workloadNetworkVMGroup, + private Mono>> createPortMirroringWithResponseAsync(String resourceGroupName, + String privateCloudName, String portMirroringId, WorkloadNetworkPortMirroringInner workloadNetworkPortMirroring, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -5768,265 +4598,215 @@ private Mono>> createVMGroupWithResponseAsync( return Mono .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); } - if (vmGroupId == null) { - return Mono.error(new IllegalArgumentException("Parameter vmGroupId is required and cannot be null.")); - } - if (workloadNetworkVMGroup == null) { + if (portMirroringId == null) { return Mono - .error( - new IllegalArgumentException("Parameter workloadNetworkVMGroup is required and cannot be null.")); + .error(new IllegalArgumentException("Parameter portMirroringId is required and cannot be null.")); + } + if (workloadNetworkPortMirroring == null) { + return Mono.error( + new IllegalArgumentException("Parameter workloadNetworkPortMirroring is required and cannot be null.")); } else { - workloadNetworkVMGroup.validate(); + workloadNetworkPortMirroring.validate(); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .createVMGroup( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - this.client.getApiVersion(), - privateCloudName, - vmGroupId, - workloadNetworkVMGroup, - accept, - context); + return service.createPortMirroring(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, portMirroringId, + workloadNetworkPortMirroring, accept, context); } /** - * Create a vm group by id in a private cloud workload network. - * + * Create a WorkloadNetworkPortMirroring. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param vmGroupId NSX VM Group identifier. Generally the same as the VM Group's display name. - * @param workloadNetworkVMGroup NSX VM Group. + * @param portMirroringId ID of the NSX port mirroring profile. + * @param workloadNetworkPortMirroring Resource create parameters. * @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 nSX VM Group. + * @return the {@link PollerFlux} for polling of nSX Port Mirroring. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, WorkloadNetworkVMGroupInner> beginCreateVMGroupAsync( - String resourceGroupName, - String privateCloudName, - String vmGroupId, - WorkloadNetworkVMGroupInner workloadNetworkVMGroup) { - Mono>> mono = - createVMGroupWithResponseAsync(resourceGroupName, privateCloudName, vmGroupId, workloadNetworkVMGroup); - return this - .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - WorkloadNetworkVMGroupInner.class, - WorkloadNetworkVMGroupInner.class, - this.client.getContext()); + private PollerFlux, WorkloadNetworkPortMirroringInner> + beginCreatePortMirroringAsync(String resourceGroupName, String privateCloudName, String portMirroringId, + WorkloadNetworkPortMirroringInner workloadNetworkPortMirroring) { + Mono>> mono = createPortMirroringWithResponseAsync(resourceGroupName, + privateCloudName, portMirroringId, workloadNetworkPortMirroring); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), WorkloadNetworkPortMirroringInner.class, + WorkloadNetworkPortMirroringInner.class, this.client.getContext()); } /** - * Create a vm group by id in a private cloud workload network. - * + * Create a WorkloadNetworkPortMirroring. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param vmGroupId NSX VM Group identifier. Generally the same as the VM Group's display name. - * @param workloadNetworkVMGroup NSX VM Group. + * @param portMirroringId ID of the NSX port mirroring profile. + * @param workloadNetworkPortMirroring Resource create parameters. * @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 nSX VM Group. + * @return the {@link PollerFlux} for polling of nSX Port Mirroring. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, WorkloadNetworkVMGroupInner> beginCreateVMGroupAsync( - String resourceGroupName, - String privateCloudName, - String vmGroupId, - WorkloadNetworkVMGroupInner workloadNetworkVMGroup, - Context context) { + private PollerFlux, WorkloadNetworkPortMirroringInner> + beginCreatePortMirroringAsync(String resourceGroupName, String privateCloudName, String portMirroringId, + WorkloadNetworkPortMirroringInner workloadNetworkPortMirroring, Context context) { context = this.client.mergeContext(context); - Mono>> mono = - createVMGroupWithResponseAsync( - resourceGroupName, privateCloudName, vmGroupId, workloadNetworkVMGroup, context); - return this - .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - WorkloadNetworkVMGroupInner.class, - WorkloadNetworkVMGroupInner.class, - context); + Mono>> mono = createPortMirroringWithResponseAsync(resourceGroupName, + privateCloudName, portMirroringId, workloadNetworkPortMirroring, context); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), WorkloadNetworkPortMirroringInner.class, + WorkloadNetworkPortMirroringInner.class, context); } /** - * Create a vm group by id in a private cloud workload network. - * + * Create a WorkloadNetworkPortMirroring. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param vmGroupId NSX VM Group identifier. Generally the same as the VM Group's display name. - * @param workloadNetworkVMGroup NSX VM Group. + * @param portMirroringId ID of the NSX port mirroring profile. + * @param workloadNetworkPortMirroring Resource create parameters. * @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 nSX VM Group. + * @return the {@link SyncPoller} for polling of nSX Port Mirroring. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, WorkloadNetworkVMGroupInner> beginCreateVMGroup( - String resourceGroupName, - String privateCloudName, - String vmGroupId, - WorkloadNetworkVMGroupInner workloadNetworkVMGroup) { - return this - .beginCreateVMGroupAsync(resourceGroupName, privateCloudName, vmGroupId, workloadNetworkVMGroup) - .getSyncPoller(); + public SyncPoller, WorkloadNetworkPortMirroringInner> + beginCreatePortMirroring(String resourceGroupName, String privateCloudName, String portMirroringId, + WorkloadNetworkPortMirroringInner workloadNetworkPortMirroring) { + return this.beginCreatePortMirroringAsync(resourceGroupName, privateCloudName, portMirroringId, + workloadNetworkPortMirroring).getSyncPoller(); } /** - * Create a vm group by id in a private cloud workload network. - * + * Create a WorkloadNetworkPortMirroring. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param vmGroupId NSX VM Group identifier. Generally the same as the VM Group's display name. - * @param workloadNetworkVMGroup NSX VM Group. + * @param portMirroringId ID of the NSX port mirroring profile. + * @param workloadNetworkPortMirroring Resource create parameters. * @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 nSX VM Group. + * @return the {@link SyncPoller} for polling of nSX Port Mirroring. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, WorkloadNetworkVMGroupInner> beginCreateVMGroup( - String resourceGroupName, - String privateCloudName, - String vmGroupId, - WorkloadNetworkVMGroupInner workloadNetworkVMGroup, - Context context) { - return this - .beginCreateVMGroupAsync(resourceGroupName, privateCloudName, vmGroupId, workloadNetworkVMGroup, context) - .getSyncPoller(); + public SyncPoller, WorkloadNetworkPortMirroringInner> + beginCreatePortMirroring(String resourceGroupName, String privateCloudName, String portMirroringId, + WorkloadNetworkPortMirroringInner workloadNetworkPortMirroring, Context context) { + return this.beginCreatePortMirroringAsync(resourceGroupName, privateCloudName, portMirroringId, + workloadNetworkPortMirroring, context).getSyncPoller(); } /** - * Create a vm group by id in a private cloud workload network. - * + * Create a WorkloadNetworkPortMirroring. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param vmGroupId NSX VM Group identifier. Generally the same as the VM Group's display name. - * @param workloadNetworkVMGroup NSX VM Group. + * @param portMirroringId ID of the NSX port mirroring profile. + * @param workloadNetworkPortMirroring Resource create parameters. * @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 nSX VM Group on successful completion of {@link Mono}. + * @return nSX Port Mirroring on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createVMGroupAsync( - String resourceGroupName, - String privateCloudName, - String vmGroupId, - WorkloadNetworkVMGroupInner workloadNetworkVMGroup) { - return beginCreateVMGroupAsync(resourceGroupName, privateCloudName, vmGroupId, workloadNetworkVMGroup) - .last() - .flatMap(this.client::getLroFinalResultOrError); + private Mono createPortMirroringAsync(String resourceGroupName, + String privateCloudName, String portMirroringId, + WorkloadNetworkPortMirroringInner workloadNetworkPortMirroring) { + return beginCreatePortMirroringAsync(resourceGroupName, privateCloudName, portMirroringId, + workloadNetworkPortMirroring).last().flatMap(this.client::getLroFinalResultOrError); } /** - * Create a vm group by id in a private cloud workload network. - * + * Create a WorkloadNetworkPortMirroring. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param vmGroupId NSX VM Group identifier. Generally the same as the VM Group's display name. - * @param workloadNetworkVMGroup NSX VM Group. + * @param portMirroringId ID of the NSX port mirroring profile. + * @param workloadNetworkPortMirroring Resource create parameters. * @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 nSX VM Group on successful completion of {@link Mono}. + * @return nSX Port Mirroring on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createVMGroupAsync( - String resourceGroupName, - String privateCloudName, - String vmGroupId, - WorkloadNetworkVMGroupInner workloadNetworkVMGroup, + private Mono createPortMirroringAsync(String resourceGroupName, + String privateCloudName, String portMirroringId, WorkloadNetworkPortMirroringInner workloadNetworkPortMirroring, Context context) { - return beginCreateVMGroupAsync(resourceGroupName, privateCloudName, vmGroupId, workloadNetworkVMGroup, context) - .last() - .flatMap(this.client::getLroFinalResultOrError); + return beginCreatePortMirroringAsync(resourceGroupName, privateCloudName, portMirroringId, + workloadNetworkPortMirroring, context).last().flatMap(this.client::getLroFinalResultOrError); } /** - * Create a vm group by id in a private cloud workload network. - * + * Create a WorkloadNetworkPortMirroring. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param vmGroupId NSX VM Group identifier. Generally the same as the VM Group's display name. - * @param workloadNetworkVMGroup NSX VM Group. + * @param portMirroringId ID of the NSX port mirroring profile. + * @param workloadNetworkPortMirroring Resource create parameters. * @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 nSX VM Group. + * @return nSX Port Mirroring. */ @ServiceMethod(returns = ReturnType.SINGLE) - public WorkloadNetworkVMGroupInner createVMGroup( - String resourceGroupName, - String privateCloudName, - String vmGroupId, - WorkloadNetworkVMGroupInner workloadNetworkVMGroup) { - return createVMGroupAsync(resourceGroupName, privateCloudName, vmGroupId, workloadNetworkVMGroup).block(); + public WorkloadNetworkPortMirroringInner createPortMirroring(String resourceGroupName, String privateCloudName, + String portMirroringId, WorkloadNetworkPortMirroringInner workloadNetworkPortMirroring) { + return createPortMirroringAsync(resourceGroupName, privateCloudName, portMirroringId, + workloadNetworkPortMirroring).block(); } /** - * Create a vm group by id in a private cloud workload network. - * + * Create a WorkloadNetworkPortMirroring. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param vmGroupId NSX VM Group identifier. Generally the same as the VM Group's display name. - * @param workloadNetworkVMGroup NSX VM Group. + * @param portMirroringId ID of the NSX port mirroring profile. + * @param workloadNetworkPortMirroring Resource create parameters. * @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 nSX VM Group. + * @return nSX Port Mirroring. */ @ServiceMethod(returns = ReturnType.SINGLE) - public WorkloadNetworkVMGroupInner createVMGroup( - String resourceGroupName, - String privateCloudName, - String vmGroupId, - WorkloadNetworkVMGroupInner workloadNetworkVMGroup, - Context context) { - return createVMGroupAsync(resourceGroupName, privateCloudName, vmGroupId, workloadNetworkVMGroup, context) - .block(); + public WorkloadNetworkPortMirroringInner createPortMirroring(String resourceGroupName, String privateCloudName, + String portMirroringId, WorkloadNetworkPortMirroringInner workloadNetworkPortMirroring, Context context) { + return createPortMirroringAsync(resourceGroupName, privateCloudName, portMirroringId, + workloadNetworkPortMirroring, context).block(); } /** - * Create or update a vm group by id in a private cloud workload network. - * + * Update a WorkloadNetworkPortMirroring. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param vmGroupId NSX VM Group identifier. Generally the same as the VM Group's display name. - * @param workloadNetworkVMGroup NSX VM Group. + * @param portMirroringId ID of the NSX port mirroring profile. + * @param workloadNetworkPortMirroring The resource properties to be updated. * @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 nSX VM Group along with {@link Response} on successful completion of {@link Mono}. + * @return nSX Port Mirroring along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateVMGroupWithResponseAsync( - String resourceGroupName, - String privateCloudName, - String vmGroupId, - WorkloadNetworkVMGroupInner workloadNetworkVMGroup) { + private Mono>> updatePortMirroringWithResponseAsync(String resourceGroupName, + String privateCloudName, String portMirroringId, + WorkloadNetworkPortMirroringUpdate workloadNetworkPortMirroring) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -6036,65 +4816,48 @@ private Mono>> updateVMGroupWithResponseAsync( return Mono .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); } - if (vmGroupId == null) { - return Mono.error(new IllegalArgumentException("Parameter vmGroupId is required and cannot be null.")); - } - if (workloadNetworkVMGroup == null) { + if (portMirroringId == null) { return Mono - .error( - new IllegalArgumentException("Parameter workloadNetworkVMGroup is required and cannot be null.")); + .error(new IllegalArgumentException("Parameter portMirroringId is required and cannot be null.")); + } + if (workloadNetworkPortMirroring == null) { + return Mono.error( + new IllegalArgumentException("Parameter workloadNetworkPortMirroring is required and cannot be null.")); } else { - workloadNetworkVMGroup.validate(); + workloadNetworkPortMirroring.validate(); } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .updateVMGroup( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - this.client.getApiVersion(), - privateCloudName, - vmGroupId, - workloadNetworkVMGroup, - accept, - context)) + .withContext(context -> service.updatePortMirroring(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, portMirroringId, + workloadNetworkPortMirroring, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Create or update a vm group by id in a private cloud workload network. - * + * Update a WorkloadNetworkPortMirroring. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param vmGroupId NSX VM Group identifier. Generally the same as the VM Group's display name. - * @param workloadNetworkVMGroup NSX VM Group. + * @param portMirroringId ID of the NSX port mirroring profile. + * @param workloadNetworkPortMirroring The resource properties to be updated. * @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 nSX VM Group along with {@link Response} on successful completion of {@link Mono}. + * @return nSX Port Mirroring along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateVMGroupWithResponseAsync( - String resourceGroupName, - String privateCloudName, - String vmGroupId, - WorkloadNetworkVMGroupInner workloadNetworkVMGroup, - Context context) { + private Mono>> updatePortMirroringWithResponseAsync(String resourceGroupName, + String privateCloudName, String portMirroringId, + WorkloadNetworkPortMirroringUpdate workloadNetworkPortMirroring, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -6104,241 +4867,197 @@ private Mono>> updateVMGroupWithResponseAsync( return Mono .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); } - if (vmGroupId == null) { - return Mono.error(new IllegalArgumentException("Parameter vmGroupId is required and cannot be null.")); - } - if (workloadNetworkVMGroup == null) { + if (portMirroringId == null) { return Mono - .error( - new IllegalArgumentException("Parameter workloadNetworkVMGroup is required and cannot be null.")); + .error(new IllegalArgumentException("Parameter portMirroringId is required and cannot be null.")); + } + if (workloadNetworkPortMirroring == null) { + return Mono.error( + new IllegalArgumentException("Parameter workloadNetworkPortMirroring is required and cannot be null.")); } else { - workloadNetworkVMGroup.validate(); + workloadNetworkPortMirroring.validate(); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .updateVMGroup( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - this.client.getApiVersion(), - privateCloudName, - vmGroupId, - workloadNetworkVMGroup, - accept, - context); + return service.updatePortMirroring(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, portMirroringId, + workloadNetworkPortMirroring, accept, context); } /** - * Create or update a vm group by id in a private cloud workload network. - * + * Update a WorkloadNetworkPortMirroring. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param vmGroupId NSX VM Group identifier. Generally the same as the VM Group's display name. - * @param workloadNetworkVMGroup NSX VM Group. + * @param portMirroringId ID of the NSX port mirroring profile. + * @param workloadNetworkPortMirroring The resource properties to be updated. * @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 nSX VM Group. + * @return the {@link PollerFlux} for polling of nSX Port Mirroring. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, WorkloadNetworkVMGroupInner> beginUpdateVMGroupAsync( - String resourceGroupName, - String privateCloudName, - String vmGroupId, - WorkloadNetworkVMGroupInner workloadNetworkVMGroup) { - Mono>> mono = - updateVMGroupWithResponseAsync(resourceGroupName, privateCloudName, vmGroupId, workloadNetworkVMGroup); - return this - .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - WorkloadNetworkVMGroupInner.class, - WorkloadNetworkVMGroupInner.class, - this.client.getContext()); + private PollerFlux, WorkloadNetworkPortMirroringInner> + beginUpdatePortMirroringAsync(String resourceGroupName, String privateCloudName, String portMirroringId, + WorkloadNetworkPortMirroringUpdate workloadNetworkPortMirroring) { + Mono>> mono = updatePortMirroringWithResponseAsync(resourceGroupName, + privateCloudName, portMirroringId, workloadNetworkPortMirroring); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), WorkloadNetworkPortMirroringInner.class, + WorkloadNetworkPortMirroringInner.class, this.client.getContext()); } /** - * Create or update a vm group by id in a private cloud workload network. - * + * Update a WorkloadNetworkPortMirroring. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param vmGroupId NSX VM Group identifier. Generally the same as the VM Group's display name. - * @param workloadNetworkVMGroup NSX VM Group. + * @param portMirroringId ID of the NSX port mirroring profile. + * @param workloadNetworkPortMirroring The resource properties to be updated. * @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 nSX VM Group. + * @return the {@link PollerFlux} for polling of nSX Port Mirroring. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, WorkloadNetworkVMGroupInner> beginUpdateVMGroupAsync( - String resourceGroupName, - String privateCloudName, - String vmGroupId, - WorkloadNetworkVMGroupInner workloadNetworkVMGroup, - Context context) { + private PollerFlux, WorkloadNetworkPortMirroringInner> + beginUpdatePortMirroringAsync(String resourceGroupName, String privateCloudName, String portMirroringId, + WorkloadNetworkPortMirroringUpdate workloadNetworkPortMirroring, Context context) { context = this.client.mergeContext(context); - Mono>> mono = - updateVMGroupWithResponseAsync( - resourceGroupName, privateCloudName, vmGroupId, workloadNetworkVMGroup, context); - return this - .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - WorkloadNetworkVMGroupInner.class, - WorkloadNetworkVMGroupInner.class, - context); + Mono>> mono = updatePortMirroringWithResponseAsync(resourceGroupName, + privateCloudName, portMirroringId, workloadNetworkPortMirroring, context); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), WorkloadNetworkPortMirroringInner.class, + WorkloadNetworkPortMirroringInner.class, context); } /** - * Create or update a vm group by id in a private cloud workload network. - * + * Update a WorkloadNetworkPortMirroring. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param vmGroupId NSX VM Group identifier. Generally the same as the VM Group's display name. - * @param workloadNetworkVMGroup NSX VM Group. + * @param portMirroringId ID of the NSX port mirroring profile. + * @param workloadNetworkPortMirroring The resource properties to be updated. * @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 nSX VM Group. + * @return the {@link SyncPoller} for polling of nSX Port Mirroring. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, WorkloadNetworkVMGroupInner> beginUpdateVMGroup( - String resourceGroupName, - String privateCloudName, - String vmGroupId, - WorkloadNetworkVMGroupInner workloadNetworkVMGroup) { - return this - .beginUpdateVMGroupAsync(resourceGroupName, privateCloudName, vmGroupId, workloadNetworkVMGroup) - .getSyncPoller(); + public SyncPoller, WorkloadNetworkPortMirroringInner> + beginUpdatePortMirroring(String resourceGroupName, String privateCloudName, String portMirroringId, + WorkloadNetworkPortMirroringUpdate workloadNetworkPortMirroring) { + return this.beginUpdatePortMirroringAsync(resourceGroupName, privateCloudName, portMirroringId, + workloadNetworkPortMirroring).getSyncPoller(); } /** - * Create or update a vm group by id in a private cloud workload network. - * + * Update a WorkloadNetworkPortMirroring. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param vmGroupId NSX VM Group identifier. Generally the same as the VM Group's display name. - * @param workloadNetworkVMGroup NSX VM Group. + * @param portMirroringId ID of the NSX port mirroring profile. + * @param workloadNetworkPortMirroring The resource properties to be updated. * @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 nSX VM Group. + * @return the {@link SyncPoller} for polling of nSX Port Mirroring. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, WorkloadNetworkVMGroupInner> beginUpdateVMGroup( - String resourceGroupName, - String privateCloudName, - String vmGroupId, - WorkloadNetworkVMGroupInner workloadNetworkVMGroup, - Context context) { - return this - .beginUpdateVMGroupAsync(resourceGroupName, privateCloudName, vmGroupId, workloadNetworkVMGroup, context) - .getSyncPoller(); + public SyncPoller, WorkloadNetworkPortMirroringInner> + beginUpdatePortMirroring(String resourceGroupName, String privateCloudName, String portMirroringId, + WorkloadNetworkPortMirroringUpdate workloadNetworkPortMirroring, Context context) { + return this.beginUpdatePortMirroringAsync(resourceGroupName, privateCloudName, portMirroringId, + workloadNetworkPortMirroring, context).getSyncPoller(); } /** - * Create or update a vm group by id in a private cloud workload network. - * + * Update a WorkloadNetworkPortMirroring. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param vmGroupId NSX VM Group identifier. Generally the same as the VM Group's display name. - * @param workloadNetworkVMGroup NSX VM Group. + * @param portMirroringId ID of the NSX port mirroring profile. + * @param workloadNetworkPortMirroring The resource properties to be updated. * @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 nSX VM Group on successful completion of {@link Mono}. + * @return nSX Port Mirroring on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateVMGroupAsync( - String resourceGroupName, - String privateCloudName, - String vmGroupId, - WorkloadNetworkVMGroupInner workloadNetworkVMGroup) { - return beginUpdateVMGroupAsync(resourceGroupName, privateCloudName, vmGroupId, workloadNetworkVMGroup) - .last() - .flatMap(this.client::getLroFinalResultOrError); + private Mono updatePortMirroringAsync(String resourceGroupName, + String privateCloudName, String portMirroringId, + WorkloadNetworkPortMirroringUpdate workloadNetworkPortMirroring) { + return beginUpdatePortMirroringAsync(resourceGroupName, privateCloudName, portMirroringId, + workloadNetworkPortMirroring).last().flatMap(this.client::getLroFinalResultOrError); } /** - * Create or update a vm group by id in a private cloud workload network. - * + * Update a WorkloadNetworkPortMirroring. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param vmGroupId NSX VM Group identifier. Generally the same as the VM Group's display name. - * @param workloadNetworkVMGroup NSX VM Group. + * @param portMirroringId ID of the NSX port mirroring profile. + * @param workloadNetworkPortMirroring The resource properties to be updated. * @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 nSX VM Group on successful completion of {@link Mono}. + * @return nSX Port Mirroring on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateVMGroupAsync( - String resourceGroupName, - String privateCloudName, - String vmGroupId, - WorkloadNetworkVMGroupInner workloadNetworkVMGroup, - Context context) { - return beginUpdateVMGroupAsync(resourceGroupName, privateCloudName, vmGroupId, workloadNetworkVMGroup, context) - .last() - .flatMap(this.client::getLroFinalResultOrError); + private Mono updatePortMirroringAsync(String resourceGroupName, + String privateCloudName, String portMirroringId, + WorkloadNetworkPortMirroringUpdate workloadNetworkPortMirroring, Context context) { + return beginUpdatePortMirroringAsync(resourceGroupName, privateCloudName, portMirroringId, + workloadNetworkPortMirroring, context).last().flatMap(this.client::getLroFinalResultOrError); } /** - * Create or update a vm group by id in a private cloud workload network. - * + * Update a WorkloadNetworkPortMirroring. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param vmGroupId NSX VM Group identifier. Generally the same as the VM Group's display name. - * @param workloadNetworkVMGroup NSX VM Group. + * @param portMirroringId ID of the NSX port mirroring profile. + * @param workloadNetworkPortMirroring The resource properties to be updated. * @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 nSX VM Group. + * @return nSX Port Mirroring. */ @ServiceMethod(returns = ReturnType.SINGLE) - public WorkloadNetworkVMGroupInner updateVMGroup( - String resourceGroupName, - String privateCloudName, - String vmGroupId, - WorkloadNetworkVMGroupInner workloadNetworkVMGroup) { - return updateVMGroupAsync(resourceGroupName, privateCloudName, vmGroupId, workloadNetworkVMGroup).block(); + public WorkloadNetworkPortMirroringInner updatePortMirroring(String resourceGroupName, String privateCloudName, + String portMirroringId, WorkloadNetworkPortMirroringUpdate workloadNetworkPortMirroring) { + return updatePortMirroringAsync(resourceGroupName, privateCloudName, portMirroringId, + workloadNetworkPortMirroring).block(); } /** - * Create or update a vm group by id in a private cloud workload network. - * + * Update a WorkloadNetworkPortMirroring. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param vmGroupId NSX VM Group identifier. Generally the same as the VM Group's display name. - * @param workloadNetworkVMGroup NSX VM Group. + * @param portMirroringId ID of the NSX port mirroring profile. + * @param workloadNetworkPortMirroring The resource properties to be updated. * @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 nSX VM Group. + * @return nSX Port Mirroring. */ @ServiceMethod(returns = ReturnType.SINGLE) - public WorkloadNetworkVMGroupInner updateVMGroup( - String resourceGroupName, - String privateCloudName, - String vmGroupId, - WorkloadNetworkVMGroupInner workloadNetworkVMGroup, - Context context) { - return updateVMGroupAsync(resourceGroupName, privateCloudName, vmGroupId, workloadNetworkVMGroup, context) - .block(); + public WorkloadNetworkPortMirroringInner updatePortMirroring(String resourceGroupName, String privateCloudName, + String portMirroringId, WorkloadNetworkPortMirroringUpdate workloadNetworkPortMirroring, Context context) { + return updatePortMirroringAsync(resourceGroupName, privateCloudName, portMirroringId, + workloadNetworkPortMirroring, context).block(); } /** - * Delete a vm group by id in a private cloud workload network. - * + * Delete a WorkloadNetworkPortMirroring. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param vmGroupId NSX VM Group identifier. Generally the same as the VM Group's display name. + * @param portMirroringId ID of the NSX port mirroring profile. * @param privateCloudName Name of the private cloud. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -6346,26 +5065,23 @@ public WorkloadNetworkVMGroupInner updateVMGroup( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteVMGroupWithResponseAsync( - String resourceGroupName, String vmGroupId, String privateCloudName) { + private Mono>> deletePortMirroringWithResponseAsync(String resourceGroupName, + String portMirroringId, String privateCloudName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + 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 (vmGroupId == null) { - return Mono.error(new IllegalArgumentException("Parameter vmGroupId is required and cannot be null.")); + if (portMirroringId == null) { + return Mono + .error(new IllegalArgumentException("Parameter portMirroringId is required and cannot be null.")); } if (privateCloudName == null) { return Mono @@ -6373,26 +5089,16 @@ private Mono>> deleteVMGroupWithResponseAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .deleteVMGroup( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - this.client.getApiVersion(), - vmGroupId, - privateCloudName, - accept, - context)) + .withContext(context -> service.deletePortMirroring(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, portMirroringId, privateCloudName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Delete a vm group by id in a private cloud workload network. - * + * Delete a WorkloadNetworkPortMirroring. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param vmGroupId NSX VM Group identifier. Generally the same as the VM Group's display name. + * @param portMirroringId ID of the NSX port mirroring profile. * @param privateCloudName Name of the private cloud. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -6401,26 +5107,23 @@ private Mono>> deleteVMGroupWithResponseAsync( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteVMGroupWithResponseAsync( - String resourceGroupName, String vmGroupId, String privateCloudName, Context context) { + private Mono>> deletePortMirroringWithResponseAsync(String resourceGroupName, + String portMirroringId, String privateCloudName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + 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 (vmGroupId == null) { - return Mono.error(new IllegalArgumentException("Parameter vmGroupId is required and cannot be null.")); + if (portMirroringId == null) { + return Mono + .error(new IllegalArgumentException("Parameter portMirroringId is required and cannot be null.")); } if (privateCloudName == null) { return Mono @@ -6428,23 +5131,15 @@ private Mono>> deleteVMGroupWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .deleteVMGroup( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - this.client.getApiVersion(), - vmGroupId, - privateCloudName, - accept, - context); + return service.deletePortMirroring(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, portMirroringId, privateCloudName, accept, context); } /** - * Delete a vm group by id in a private cloud workload network. - * + * Delete a WorkloadNetworkPortMirroring. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param vmGroupId NSX VM Group identifier. Generally the same as the VM Group's display name. + * @param portMirroringId ID of the NSX port mirroring profile. * @param privateCloudName Name of the private cloud. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -6452,21 +5147,19 @@ private Mono>> deleteVMGroupWithResponseAsync( * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteVMGroupAsync( - String resourceGroupName, String vmGroupId, String privateCloudName) { - Mono>> mono = - deleteVMGroupWithResponseAsync(resourceGroupName, vmGroupId, privateCloudName); - return this - .client - .getLroResult( - mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); + private PollerFlux, Void> beginDeletePortMirroringAsync(String resourceGroupName, + String portMirroringId, String privateCloudName) { + Mono>> mono + = deletePortMirroringWithResponseAsync(resourceGroupName, portMirroringId, privateCloudName); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); } /** - * Delete a vm group by id in a private cloud workload network. - * + * Delete a WorkloadNetworkPortMirroring. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param vmGroupId NSX VM Group identifier. Generally the same as the VM Group's display name. + * @param portMirroringId ID of the NSX port mirroring profile. * @param privateCloudName Name of the private cloud. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -6475,21 +5168,20 @@ private PollerFlux, Void> beginDeleteVMGroupAsync( * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteVMGroupAsync( - String resourceGroupName, String vmGroupId, String privateCloudName, Context context) { + private PollerFlux, Void> beginDeletePortMirroringAsync(String resourceGroupName, + String portMirroringId, String privateCloudName, Context context) { context = this.client.mergeContext(context); - Mono>> mono = - deleteVMGroupWithResponseAsync(resourceGroupName, vmGroupId, privateCloudName, context); - return this - .client - .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); + Mono>> mono + = deletePortMirroringWithResponseAsync(resourceGroupName, portMirroringId, privateCloudName, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + context); } /** - * Delete a vm group by id in a private cloud workload network. - * + * Delete a WorkloadNetworkPortMirroring. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param vmGroupId NSX VM Group identifier. Generally the same as the VM Group's display name. + * @param portMirroringId ID of the NSX port mirroring profile. * @param privateCloudName Name of the private cloud. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -6497,16 +5189,16 @@ private PollerFlux, Void> beginDeleteVMGroupAsync( * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDeleteVMGroup( - String resourceGroupName, String vmGroupId, String privateCloudName) { - return this.beginDeleteVMGroupAsync(resourceGroupName, vmGroupId, privateCloudName).getSyncPoller(); + public SyncPoller, Void> beginDeletePortMirroring(String resourceGroupName, String portMirroringId, + String privateCloudName) { + return this.beginDeletePortMirroringAsync(resourceGroupName, portMirroringId, privateCloudName).getSyncPoller(); } /** - * Delete a vm group by id in a private cloud workload network. - * + * Delete a WorkloadNetworkPortMirroring. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param vmGroupId NSX VM Group identifier. Generally the same as the VM Group's display name. + * @param portMirroringId ID of the NSX port mirroring profile. * @param privateCloudName Name of the private cloud. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -6515,16 +5207,17 @@ public SyncPoller, Void> beginDeleteVMGroup( * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDeleteVMGroup( - String resourceGroupName, String vmGroupId, String privateCloudName, Context context) { - return this.beginDeleteVMGroupAsync(resourceGroupName, vmGroupId, privateCloudName, context).getSyncPoller(); + public SyncPoller, Void> beginDeletePortMirroring(String resourceGroupName, String portMirroringId, + String privateCloudName, Context context) { + return this.beginDeletePortMirroringAsync(resourceGroupName, portMirroringId, privateCloudName, context) + .getSyncPoller(); } /** - * Delete a vm group by id in a private cloud workload network. - * + * Delete a WorkloadNetworkPortMirroring. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param vmGroupId NSX VM Group identifier. Generally the same as the VM Group's display name. + * @param portMirroringId ID of the NSX port mirroring profile. * @param privateCloudName Name of the private cloud. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -6532,17 +5225,17 @@ public SyncPoller, Void> beginDeleteVMGroup( * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteVMGroupAsync(String resourceGroupName, String vmGroupId, String privateCloudName) { - return beginDeleteVMGroupAsync(resourceGroupName, vmGroupId, privateCloudName) - .last() + private Mono deletePortMirroringAsync(String resourceGroupName, String portMirroringId, + String privateCloudName) { + return beginDeletePortMirroringAsync(resourceGroupName, portMirroringId, privateCloudName).last() .flatMap(this.client::getLroFinalResultOrError); } /** - * Delete a vm group by id in a private cloud workload network. - * + * Delete a WorkloadNetworkPortMirroring. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param vmGroupId NSX VM Group identifier. Generally the same as the VM Group's display name. + * @param portMirroringId ID of the NSX port mirroring profile. * @param privateCloudName Name of the private cloud. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -6551,33 +5244,32 @@ private Mono deleteVMGroupAsync(String resourceGroupName, String vmGroupId * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteVMGroupAsync( - String resourceGroupName, String vmGroupId, String privateCloudName, Context context) { - return beginDeleteVMGroupAsync(resourceGroupName, vmGroupId, privateCloudName, context) - .last() + private Mono deletePortMirroringAsync(String resourceGroupName, String portMirroringId, + String privateCloudName, Context context) { + return beginDeletePortMirroringAsync(resourceGroupName, portMirroringId, privateCloudName, context).last() .flatMap(this.client::getLroFinalResultOrError); } /** - * Delete a vm group by id in a private cloud workload network. - * + * Delete a WorkloadNetworkPortMirroring. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param vmGroupId NSX VM Group identifier. Generally the same as the VM Group's display name. + * @param portMirroringId ID of the NSX port mirroring profile. * @param privateCloudName Name of the private cloud. * @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 deleteVMGroup(String resourceGroupName, String vmGroupId, String privateCloudName) { - deleteVMGroupAsync(resourceGroupName, vmGroupId, privateCloudName).block(); + public void deletePortMirroring(String resourceGroupName, String portMirroringId, String privateCloudName) { + deletePortMirroringAsync(resourceGroupName, portMirroringId, privateCloudName).block(); } /** - * Delete a vm group by id in a private cloud workload network. - * + * Delete a WorkloadNetworkPortMirroring. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param vmGroupId NSX VM Group identifier. Generally the same as the VM Group's display name. + * @param portMirroringId ID of the NSX port mirroring profile. * @param privateCloudName Name of the private cloud. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -6585,34 +5277,32 @@ public void deleteVMGroup(String resourceGroupName, String vmGroupId, String pri * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void deleteVMGroup(String resourceGroupName, String vmGroupId, String privateCloudName, Context context) { - deleteVMGroupAsync(resourceGroupName, vmGroupId, privateCloudName, context).block(); + public void deletePortMirroring(String resourceGroupName, String portMirroringId, String privateCloudName, + Context context) { + deletePortMirroringAsync(resourceGroupName, portMirroringId, privateCloudName, context).block(); } /** - * List of virtual machines in a private cloud workload network. - * + * List WorkloadNetworkPublicIP resources by WorkloadNetwork. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. * @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 list of NSX Virtual Machines along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return the response of a WorkloadNetworkPublicIP list operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listVirtualMachinesSinglePageAsync( - String resourceGroupName, String privateCloudName) { + private Mono> listPublicIPsSinglePageAsync(String resourceGroupName, + String privateCloudName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -6624,54 +5314,35 @@ private Mono> listVirtualMachi } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .listVirtualMachines( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - this.client.getApiVersion(), - privateCloudName, - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .withContext(context -> service.listPublicIPs(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, 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 of virtual machines in a private cloud workload network. - * + * List WorkloadNetworkPublicIP resources by WorkloadNetwork. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. * @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 a list of NSX Virtual Machines along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return the response of a WorkloadNetworkPublicIP list operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listVirtualMachinesSinglePageAsync( - String resourceGroupName, String privateCloudName, Context context) { + private Mono> listPublicIPsSinglePageAsync(String resourceGroupName, + String privateCloudName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -6684,121 +5355,103 @@ private Mono> listVirtualMachi final String accept = "application/json"; context = this.client.mergeContext(context); return service - .listVirtualMachines( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - this.client.getApiVersion(), - privateCloudName, - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + .listPublicIPs(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, privateCloudName, accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** - * List of virtual machines in a private cloud workload network. - * + * List WorkloadNetworkPublicIP resources by WorkloadNetwork. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. * @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 list of NSX Virtual Machines as paginated response with {@link PagedFlux}. + * @return the response of a WorkloadNetworkPublicIP list operation as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listVirtualMachinesAsync( - String resourceGroupName, String privateCloudName) { - return new PagedFlux<>( - () -> listVirtualMachinesSinglePageAsync(resourceGroupName, privateCloudName), - nextLink -> listVirtualMachinesNextSinglePageAsync(nextLink)); + private PagedFlux listPublicIPsAsync(String resourceGroupName, + String privateCloudName) { + return new PagedFlux<>(() -> listPublicIPsSinglePageAsync(resourceGroupName, privateCloudName), + nextLink -> listPublicIPsNextSinglePageAsync(nextLink)); } /** - * List of virtual machines in a private cloud workload network. - * + * List WorkloadNetworkPublicIP resources by WorkloadNetwork. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. * @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 a list of NSX Virtual Machines as paginated response with {@link PagedFlux}. + * @return the response of a WorkloadNetworkPublicIP list operation as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listVirtualMachinesAsync( - String resourceGroupName, String privateCloudName, Context context) { - return new PagedFlux<>( - () -> listVirtualMachinesSinglePageAsync(resourceGroupName, privateCloudName, context), - nextLink -> listVirtualMachinesNextSinglePageAsync(nextLink, context)); + private PagedFlux listPublicIPsAsync(String resourceGroupName, + String privateCloudName, Context context) { + return new PagedFlux<>(() -> listPublicIPsSinglePageAsync(resourceGroupName, privateCloudName, context), + nextLink -> listPublicIPsNextSinglePageAsync(nextLink, context)); } /** - * List of virtual machines in a private cloud workload network. - * + * List WorkloadNetworkPublicIP resources by WorkloadNetwork. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. * @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 list of NSX Virtual Machines as paginated response with {@link PagedIterable}. + * @return the response of a WorkloadNetworkPublicIP list operation as paginated response with + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listVirtualMachines( - String resourceGroupName, String privateCloudName) { - return new PagedIterable<>(listVirtualMachinesAsync(resourceGroupName, privateCloudName)); + public PagedIterable listPublicIPs(String resourceGroupName, + String privateCloudName) { + return new PagedIterable<>(listPublicIPsAsync(resourceGroupName, privateCloudName)); } /** - * List of virtual machines in a private cloud workload network. - * + * List WorkloadNetworkPublicIP resources by WorkloadNetwork. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. * @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 a list of NSX Virtual Machines as paginated response with {@link PagedIterable}. + * @return the response of a WorkloadNetworkPublicIP list operation as paginated response with + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listVirtualMachines( - String resourceGroupName, String privateCloudName, Context context) { - return new PagedIterable<>(listVirtualMachinesAsync(resourceGroupName, privateCloudName, context)); + public PagedIterable listPublicIPs(String resourceGroupName, String privateCloudName, + Context context) { + return new PagedIterable<>(listPublicIPsAsync(resourceGroupName, privateCloudName, context)); } /** - * Get a virtual machine by id in a private cloud workload network. - * + * Get a WorkloadNetworkPublicIP. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param virtualMachineId Virtual Machine identifier. + * @param publicIpId ID of the DNS zone. * @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 virtual machine by id in a private cloud workload network along with {@link Response} on successful - * completion of {@link Mono}. + * @return a WorkloadNetworkPublicIP along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getVirtualMachineWithResponseAsync( - String resourceGroupName, String privateCloudName, String virtualMachineId) { + private Mono> getPublicIpWithResponseAsync(String resourceGroupName, + String privateCloudName, String publicIpId) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -6808,54 +5461,38 @@ private Mono> getVirtualMachineWith return Mono .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); } - if (virtualMachineId == null) { - return Mono - .error(new IllegalArgumentException("Parameter virtualMachineId is required and cannot be null.")); + if (publicIpId == null) { + return Mono.error(new IllegalArgumentException("Parameter publicIpId is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .getVirtualMachine( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - this.client.getApiVersion(), - privateCloudName, - virtualMachineId, - accept, - context)) + .withContext(context -> service.getPublicIp(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, publicIpId, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Get a virtual machine by id in a private cloud workload network. - * + * Get a WorkloadNetworkPublicIP. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param virtualMachineId Virtual Machine identifier. + * @param publicIpId ID of the DNS zone. * @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 a virtual machine by id in a private cloud workload network along with {@link Response} on successful - * completion of {@link Mono}. + * @return a WorkloadNetworkPublicIP along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getVirtualMachineWithResponseAsync( - String resourceGroupName, String privateCloudName, String virtualMachineId, Context context) { + private Mono> getPublicIpWithResponseAsync(String resourceGroupName, + String privateCloudName, String publicIpId, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -6865,103 +5502,90 @@ private Mono> getVirtualMachineWith return Mono .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); } - if (virtualMachineId == null) { - return Mono - .error(new IllegalArgumentException("Parameter virtualMachineId is required and cannot be null.")); + if (publicIpId == null) { + return Mono.error(new IllegalArgumentException("Parameter publicIpId is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .getVirtualMachine( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - this.client.getApiVersion(), - privateCloudName, - virtualMachineId, - accept, - context); + return service.getPublicIp(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, publicIpId, accept, context); } /** - * Get a virtual machine by id in a private cloud workload network. - * + * Get a WorkloadNetworkPublicIP. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param virtualMachineId Virtual Machine identifier. + * @param publicIpId ID of the DNS zone. * @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 virtual machine by id in a private cloud workload network on successful completion of {@link Mono}. + * @return a WorkloadNetworkPublicIP on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getVirtualMachineAsync( - String resourceGroupName, String privateCloudName, String virtualMachineId) { - return getVirtualMachineWithResponseAsync(resourceGroupName, privateCloudName, virtualMachineId) + private Mono getPublicIpAsync(String resourceGroupName, String privateCloudName, + String publicIpId) { + return getPublicIpWithResponseAsync(resourceGroupName, privateCloudName, publicIpId) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** - * Get a virtual machine by id in a private cloud workload network. - * + * Get a WorkloadNetworkPublicIP. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param virtualMachineId Virtual Machine identifier. + * @param publicIpId ID of the DNS zone. * @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 a virtual machine by id in a private cloud workload network along with {@link Response}. + * @return a WorkloadNetworkPublicIP along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getVirtualMachineWithResponse( - String resourceGroupName, String privateCloudName, String virtualMachineId, Context context) { - return getVirtualMachineWithResponseAsync(resourceGroupName, privateCloudName, virtualMachineId, context) - .block(); + public Response getPublicIpWithResponse(String resourceGroupName, + String privateCloudName, String publicIpId, Context context) { + return getPublicIpWithResponseAsync(resourceGroupName, privateCloudName, publicIpId, context).block(); } /** - * Get a virtual machine by id in a private cloud workload network. - * + * Get a WorkloadNetworkPublicIP. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param virtualMachineId Virtual Machine identifier. + * @param publicIpId ID of the DNS zone. * @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 virtual machine by id in a private cloud workload network. + * @return a WorkloadNetworkPublicIP. */ @ServiceMethod(returns = ReturnType.SINGLE) - public WorkloadNetworkVirtualMachineInner getVirtualMachine( - String resourceGroupName, String privateCloudName, String virtualMachineId) { - return getVirtualMachineWithResponse(resourceGroupName, privateCloudName, virtualMachineId, Context.NONE) - .getValue(); + public WorkloadNetworkPublicIpInner getPublicIp(String resourceGroupName, String privateCloudName, + String publicIpId) { + return getPublicIpWithResponse(resourceGroupName, privateCloudName, publicIpId, Context.NONE).getValue(); } /** - * List of DNS services in a private cloud workload network. - * + * Create a WorkloadNetworkPublicIP. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param publicIpId ID of the DNS zone. + * @param workloadNetworkPublicIp Resource create parameters. * @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 list of NSX DNS Services along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return nSX Public IP Block along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listDnsServicesSinglePageAsync( - String resourceGroupName, String privateCloudName) { + private Mono>> createPublicIpWithResponseAsync(String resourceGroupName, + String privateCloudName, String publicIpId, WorkloadNetworkPublicIpInner workloadNetworkPublicIp) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -6971,56 +5595,47 @@ private Mono> listDnsServicesSingl return Mono .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); } + if (publicIpId == null) { + return Mono.error(new IllegalArgumentException("Parameter publicIpId is required and cannot be null.")); + } + if (workloadNetworkPublicIp == null) { + return Mono.error( + new IllegalArgumentException("Parameter workloadNetworkPublicIp is required and cannot be null.")); + } else { + workloadNetworkPublicIp.validate(); + } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .listDnsServices( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - this.client.getApiVersion(), - privateCloudName, - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .withContext(context -> service.createPublicIp(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, publicIpId, + workloadNetworkPublicIp, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * List of DNS services in a private cloud workload network. - * + * Create a WorkloadNetworkPublicIP. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param publicIpId ID of the DNS zone. + * @param workloadNetworkPublicIp Resource create parameters. * @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 a list of NSX DNS Services along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return nSX Public IP Block along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listDnsServicesSinglePageAsync( - String resourceGroupName, String privateCloudName, Context context) { + private Mono>> createPublicIpWithResponseAsync(String resourceGroupName, + String privateCloudName, String publicIpId, WorkloadNetworkPublicIpInner workloadNetworkPublicIp, + Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -7030,633 +5645,434 @@ private Mono> listDnsServicesSingl return Mono .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); } + if (publicIpId == null) { + return Mono.error(new IllegalArgumentException("Parameter publicIpId is required and cannot be null.")); + } + if (workloadNetworkPublicIp == null) { + return Mono.error( + new IllegalArgumentException("Parameter workloadNetworkPublicIp is required and cannot be null.")); + } else { + workloadNetworkPublicIp.validate(); + } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .listDnsServices( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - this.client.getApiVersion(), - privateCloudName, - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.createPublicIp(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, publicIpId, workloadNetworkPublicIp, + accept, context); } /** - * List of DNS services in a private cloud workload network. - * + * Create a WorkloadNetworkPublicIP. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param publicIpId ID of the DNS zone. + * @param workloadNetworkPublicIp Resource create parameters. * @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 list of NSX DNS Services as paginated response with {@link PagedFlux}. + * @return the {@link PollerFlux} for polling of nSX Public IP Block. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listDnsServicesAsync( - String resourceGroupName, String privateCloudName) { - return new PagedFlux<>( - () -> listDnsServicesSinglePageAsync(resourceGroupName, privateCloudName), - nextLink -> listDnsServicesNextSinglePageAsync(nextLink)); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, WorkloadNetworkPublicIpInner> beginCreatePublicIpAsync( + String resourceGroupName, String privateCloudName, String publicIpId, + WorkloadNetworkPublicIpInner workloadNetworkPublicIp) { + Mono>> mono + = createPublicIpWithResponseAsync(resourceGroupName, privateCloudName, publicIpId, workloadNetworkPublicIp); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), WorkloadNetworkPublicIpInner.class, WorkloadNetworkPublicIpInner.class, + this.client.getContext()); } /** - * List of DNS services in a private cloud workload network. - * + * Create a WorkloadNetworkPublicIP. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param publicIpId ID of the DNS zone. + * @param workloadNetworkPublicIp Resource create parameters. * @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 a list of NSX DNS Services as paginated response with {@link PagedFlux}. + * @return the {@link PollerFlux} for polling of nSX Public IP Block. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listDnsServicesAsync( - String resourceGroupName, String privateCloudName, Context context) { - return new PagedFlux<>( - () -> listDnsServicesSinglePageAsync(resourceGroupName, privateCloudName, context), - nextLink -> listDnsServicesNextSinglePageAsync(nextLink, context)); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, WorkloadNetworkPublicIpInner> beginCreatePublicIpAsync( + String resourceGroupName, String privateCloudName, String publicIpId, + WorkloadNetworkPublicIpInner workloadNetworkPublicIp, Context context) { + context = this.client.mergeContext(context); + Mono>> mono = createPublicIpWithResponseAsync(resourceGroupName, privateCloudName, + publicIpId, workloadNetworkPublicIp, context); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), WorkloadNetworkPublicIpInner.class, WorkloadNetworkPublicIpInner.class, + context); } /** - * List of DNS services in a private cloud workload network. - * + * Create a WorkloadNetworkPublicIP. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param publicIpId ID of the DNS zone. + * @param workloadNetworkPublicIp Resource create parameters. * @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 list of NSX DNS Services as paginated response with {@link PagedIterable}. + * @return the {@link SyncPoller} for polling of nSX Public IP Block. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listDnsServices( - String resourceGroupName, String privateCloudName) { - return new PagedIterable<>(listDnsServicesAsync(resourceGroupName, privateCloudName)); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, WorkloadNetworkPublicIpInner> beginCreatePublicIp( + String resourceGroupName, String privateCloudName, String publicIpId, + WorkloadNetworkPublicIpInner workloadNetworkPublicIp) { + return this.beginCreatePublicIpAsync(resourceGroupName, privateCloudName, publicIpId, workloadNetworkPublicIp) + .getSyncPoller(); } /** - * List of DNS services in a private cloud workload network. - * + * Create a WorkloadNetworkPublicIP. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param publicIpId ID of the DNS zone. + * @param workloadNetworkPublicIp Resource create parameters. * @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 a list of NSX DNS Services as paginated response with {@link PagedIterable}. + * @return the {@link SyncPoller} for polling of nSX Public IP Block. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listDnsServices( - String resourceGroupName, String privateCloudName, Context context) { - return new PagedIterable<>(listDnsServicesAsync(resourceGroupName, privateCloudName, context)); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, WorkloadNetworkPublicIpInner> beginCreatePublicIp( + String resourceGroupName, String privateCloudName, String publicIpId, + WorkloadNetworkPublicIpInner workloadNetworkPublicIp, Context context) { + return this + .beginCreatePublicIpAsync(resourceGroupName, privateCloudName, publicIpId, workloadNetworkPublicIp, context) + .getSyncPoller(); } /** - * Get a DNS service by id in a private cloud workload network. - * + * Create a WorkloadNetworkPublicIP. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param dnsServiceId NSX DNS Service identifier. Generally the same as the DNS Service's display name. + * @param publicIpId ID of the DNS zone. + * @param workloadNetworkPublicIp Resource create parameters. * @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 DNS service by id in a private cloud workload network along with {@link Response} on successful - * completion of {@link Mono}. + * @return nSX Public IP Block on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getDnsServiceWithResponseAsync( - String resourceGroupName, String privateCloudName, String dnsServiceId) { - 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 (privateCloudName == null) { - return Mono - .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); - } - if (dnsServiceId == null) { - return Mono.error(new IllegalArgumentException("Parameter dnsServiceId is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .getDnsService( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - this.client.getApiVersion(), - privateCloudName, - dnsServiceId, - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + private Mono createPublicIpAsync(String resourceGroupName, String privateCloudName, + String publicIpId, WorkloadNetworkPublicIpInner workloadNetworkPublicIp) { + return beginCreatePublicIpAsync(resourceGroupName, privateCloudName, publicIpId, workloadNetworkPublicIp).last() + .flatMap(this.client::getLroFinalResultOrError); } /** - * Get a DNS service by id in a private cloud workload network. - * + * Create a WorkloadNetworkPublicIP. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param dnsServiceId NSX DNS Service identifier. Generally the same as the DNS Service's display name. + * @param publicIpId ID of the DNS zone. + * @param workloadNetworkPublicIp Resource create parameters. * @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 a DNS service by id in a private cloud workload network along with {@link Response} on successful - * completion of {@link Mono}. + * @return nSX Public IP Block on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getDnsServiceWithResponseAsync( - String resourceGroupName, String privateCloudName, String dnsServiceId, 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 (privateCloudName == null) { - return Mono - .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); - } - if (dnsServiceId == null) { - return Mono.error(new IllegalArgumentException("Parameter dnsServiceId is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .getDnsService( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - this.client.getApiVersion(), - privateCloudName, - dnsServiceId, - accept, - context); + private Mono createPublicIpAsync(String resourceGroupName, String privateCloudName, + String publicIpId, WorkloadNetworkPublicIpInner workloadNetworkPublicIp, Context context) { + return beginCreatePublicIpAsync(resourceGroupName, privateCloudName, publicIpId, workloadNetworkPublicIp, + context).last().flatMap(this.client::getLroFinalResultOrError); } /** - * Get a DNS service by id in a private cloud workload network. - * + * Create a WorkloadNetworkPublicIP. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param dnsServiceId NSX DNS Service identifier. Generally the same as the DNS Service's display name. + * @param publicIpId ID of the DNS zone. + * @param workloadNetworkPublicIp Resource create parameters. * @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 DNS service by id in a private cloud workload network on successful completion of {@link Mono}. + * @return nSX Public IP Block. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getDnsServiceAsync( - String resourceGroupName, String privateCloudName, String dnsServiceId) { - return getDnsServiceWithResponseAsync(resourceGroupName, privateCloudName, dnsServiceId) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); + public WorkloadNetworkPublicIpInner createPublicIp(String resourceGroupName, String privateCloudName, + String publicIpId, WorkloadNetworkPublicIpInner workloadNetworkPublicIp) { + return createPublicIpAsync(resourceGroupName, privateCloudName, publicIpId, workloadNetworkPublicIp).block(); } /** - * Get a DNS service by id in a private cloud workload network. - * + * Create a WorkloadNetworkPublicIP. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param dnsServiceId NSX DNS Service identifier. Generally the same as the DNS Service's display name. + * @param publicIpId ID of the DNS zone. + * @param workloadNetworkPublicIp Resource create parameters. * @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 a DNS service by id in a private cloud workload network along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getDnsServiceWithResponse( - String resourceGroupName, String privateCloudName, String dnsServiceId, Context context) { - return getDnsServiceWithResponseAsync(resourceGroupName, privateCloudName, dnsServiceId, context).block(); - } - - /** - * Get a DNS service by id in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param dnsServiceId NSX DNS Service identifier. Generally the same as the DNS Service's display name. - * @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 DNS service by id in a private cloud workload network. + * @return nSX Public IP Block. */ @ServiceMethod(returns = ReturnType.SINGLE) - public WorkloadNetworkDnsServiceInner getDnsService( - String resourceGroupName, String privateCloudName, String dnsServiceId) { - return getDnsServiceWithResponse(resourceGroupName, privateCloudName, dnsServiceId, Context.NONE).getValue(); + public WorkloadNetworkPublicIpInner createPublicIp(String resourceGroupName, String privateCloudName, + String publicIpId, WorkloadNetworkPublicIpInner workloadNetworkPublicIp, Context context) { + return createPublicIpAsync(resourceGroupName, privateCloudName, publicIpId, workloadNetworkPublicIp, context) + .block(); } /** - * Create a DNS service by id in a private cloud workload network. - * + * Delete a WorkloadNetworkPublicIP. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param publicIpId ID of the DNS zone. * @param privateCloudName Name of the private cloud. - * @param dnsServiceId NSX DNS Service identifier. Generally the same as the DNS Service's display name. - * @param workloadNetworkDnsService NSX DNS Service. * @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 nSX DNS Service along with {@link Response} on successful completion of {@link Mono}. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createDnsServiceWithResponseAsync( - String resourceGroupName, - String privateCloudName, - String dnsServiceId, - WorkloadNetworkDnsServiceInner workloadNetworkDnsService) { + private Mono>> deletePublicIpWithResponseAsync(String resourceGroupName, + String publicIpId, String privateCloudName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + 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 (publicIpId == null) { + return Mono.error(new IllegalArgumentException("Parameter publicIpId is required and cannot be null.")); + } if (privateCloudName == null) { return Mono .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); } - if (dnsServiceId == null) { - return Mono.error(new IllegalArgumentException("Parameter dnsServiceId is required and cannot be null.")); - } - if (workloadNetworkDnsService == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter workloadNetworkDnsService is required and cannot be null.")); - } else { - workloadNetworkDnsService.validate(); - } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .createDnsService( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - this.client.getApiVersion(), - privateCloudName, - dnsServiceId, - workloadNetworkDnsService, - accept, - context)) + .withContext(context -> service.deletePublicIp(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, publicIpId, privateCloudName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Create a DNS service by id in a private cloud workload network. - * + * Delete a WorkloadNetworkPublicIP. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param publicIpId ID of the DNS zone. * @param privateCloudName Name of the private cloud. - * @param dnsServiceId NSX DNS Service identifier. Generally the same as the DNS Service's display name. - * @param workloadNetworkDnsService NSX DNS Service. * @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 nSX DNS Service along with {@link Response} on successful completion of {@link Mono}. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createDnsServiceWithResponseAsync( - String resourceGroupName, - String privateCloudName, - String dnsServiceId, - WorkloadNetworkDnsServiceInner workloadNetworkDnsService, - Context context) { + private Mono>> deletePublicIpWithResponseAsync(String resourceGroupName, + String publicIpId, String privateCloudName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + 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 (publicIpId == null) { + return Mono.error(new IllegalArgumentException("Parameter publicIpId is required and cannot be null.")); + } if (privateCloudName == null) { return Mono .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); } - if (dnsServiceId == null) { - return Mono.error(new IllegalArgumentException("Parameter dnsServiceId is required and cannot be null.")); - } - if (workloadNetworkDnsService == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter workloadNetworkDnsService is required and cannot be null.")); - } else { - workloadNetworkDnsService.validate(); - } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .createDnsService( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - this.client.getApiVersion(), - privateCloudName, - dnsServiceId, - workloadNetworkDnsService, - accept, - context); + return service.deletePublicIp(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, publicIpId, privateCloudName, accept, context); } /** - * Create a DNS service by id in a private cloud workload network. - * + * Delete a WorkloadNetworkPublicIP. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param publicIpId ID of the DNS zone. * @param privateCloudName Name of the private cloud. - * @param dnsServiceId NSX DNS Service identifier. Generally the same as the DNS Service's display name. - * @param workloadNetworkDnsService NSX DNS Service. * @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 nSX DNS Service. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, WorkloadNetworkDnsServiceInner> - beginCreateDnsServiceAsync( - String resourceGroupName, - String privateCloudName, - String dnsServiceId, - WorkloadNetworkDnsServiceInner workloadNetworkDnsService) { - Mono>> mono = - createDnsServiceWithResponseAsync( - resourceGroupName, privateCloudName, dnsServiceId, workloadNetworkDnsService); - return this - .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - WorkloadNetworkDnsServiceInner.class, - WorkloadNetworkDnsServiceInner.class, - this.client.getContext()); + private PollerFlux, Void> beginDeletePublicIpAsync(String resourceGroupName, String publicIpId, + String privateCloudName) { + Mono>> mono + = deletePublicIpWithResponseAsync(resourceGroupName, publicIpId, privateCloudName); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); } /** - * Create a DNS service by id in a private cloud workload network. - * + * Delete a WorkloadNetworkPublicIP. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param publicIpId ID of the DNS zone. * @param privateCloudName Name of the private cloud. - * @param dnsServiceId NSX DNS Service identifier. Generally the same as the DNS Service's display name. - * @param workloadNetworkDnsService NSX DNS Service. * @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 nSX DNS Service. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, WorkloadNetworkDnsServiceInner> - beginCreateDnsServiceAsync( - String resourceGroupName, - String privateCloudName, - String dnsServiceId, - WorkloadNetworkDnsServiceInner workloadNetworkDnsService, - Context context) { + private PollerFlux, Void> beginDeletePublicIpAsync(String resourceGroupName, String publicIpId, + String privateCloudName, Context context) { context = this.client.mergeContext(context); - Mono>> mono = - createDnsServiceWithResponseAsync( - resourceGroupName, privateCloudName, dnsServiceId, workloadNetworkDnsService, context); - return this - .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - WorkloadNetworkDnsServiceInner.class, - WorkloadNetworkDnsServiceInner.class, - context); + Mono>> mono + = deletePublicIpWithResponseAsync(resourceGroupName, publicIpId, privateCloudName, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + context); } /** - * Create a DNS service by id in a private cloud workload network. - * + * Delete a WorkloadNetworkPublicIP. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param publicIpId ID of the DNS zone. * @param privateCloudName Name of the private cloud. - * @param dnsServiceId NSX DNS Service identifier. Generally the same as the DNS Service's display name. - * @param workloadNetworkDnsService NSX DNS Service. * @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 nSX DNS Service. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, WorkloadNetworkDnsServiceInner> beginCreateDnsService( - String resourceGroupName, - String privateCloudName, - String dnsServiceId, - WorkloadNetworkDnsServiceInner workloadNetworkDnsService) { - return this - .beginCreateDnsServiceAsync(resourceGroupName, privateCloudName, dnsServiceId, workloadNetworkDnsService) - .getSyncPoller(); + public SyncPoller, Void> beginDeletePublicIp(String resourceGroupName, String publicIpId, + String privateCloudName) { + return this.beginDeletePublicIpAsync(resourceGroupName, publicIpId, privateCloudName).getSyncPoller(); } /** - * Create a DNS service by id in a private cloud workload network. - * + * Delete a WorkloadNetworkPublicIP. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param publicIpId ID of the DNS zone. * @param privateCloudName Name of the private cloud. - * @param dnsServiceId NSX DNS Service identifier. Generally the same as the DNS Service's display name. - * @param workloadNetworkDnsService NSX DNS Service. * @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 nSX DNS Service. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, WorkloadNetworkDnsServiceInner> beginCreateDnsService( - String resourceGroupName, - String privateCloudName, - String dnsServiceId, - WorkloadNetworkDnsServiceInner workloadNetworkDnsService, - Context context) { - return this - .beginCreateDnsServiceAsync( - resourceGroupName, privateCloudName, dnsServiceId, workloadNetworkDnsService, context) - .getSyncPoller(); + public SyncPoller, Void> beginDeletePublicIp(String resourceGroupName, String publicIpId, + String privateCloudName, Context context) { + return this.beginDeletePublicIpAsync(resourceGroupName, publicIpId, privateCloudName, context).getSyncPoller(); } /** - * Create a DNS service by id in a private cloud workload network. - * + * Delete a WorkloadNetworkPublicIP. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param publicIpId ID of the DNS zone. * @param privateCloudName Name of the private cloud. - * @param dnsServiceId NSX DNS Service identifier. Generally the same as the DNS Service's display name. - * @param workloadNetworkDnsService NSX DNS Service. * @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 nSX DNS Service on successful completion of {@link Mono}. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createDnsServiceAsync( - String resourceGroupName, - String privateCloudName, - String dnsServiceId, - WorkloadNetworkDnsServiceInner workloadNetworkDnsService) { - return beginCreateDnsServiceAsync(resourceGroupName, privateCloudName, dnsServiceId, workloadNetworkDnsService) - .last() + private Mono deletePublicIpAsync(String resourceGroupName, String publicIpId, String privateCloudName) { + return beginDeletePublicIpAsync(resourceGroupName, publicIpId, privateCloudName).last() .flatMap(this.client::getLroFinalResultOrError); } /** - * Create a DNS service by id in a private cloud workload network. - * + * Delete a WorkloadNetworkPublicIP. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param publicIpId ID of the DNS zone. * @param privateCloudName Name of the private cloud. - * @param dnsServiceId NSX DNS Service identifier. Generally the same as the DNS Service's display name. - * @param workloadNetworkDnsService NSX DNS Service. * @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 nSX DNS Service on successful completion of {@link Mono}. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createDnsServiceAsync( - String resourceGroupName, - String privateCloudName, - String dnsServiceId, - WorkloadNetworkDnsServiceInner workloadNetworkDnsService, + private Mono deletePublicIpAsync(String resourceGroupName, String publicIpId, String privateCloudName, Context context) { - return beginCreateDnsServiceAsync( - resourceGroupName, privateCloudName, dnsServiceId, workloadNetworkDnsService, context) - .last() + return beginDeletePublicIpAsync(resourceGroupName, publicIpId, privateCloudName, context).last() .flatMap(this.client::getLroFinalResultOrError); } /** - * Create a DNS service by id in a private cloud workload network. - * + * Delete a WorkloadNetworkPublicIP. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param publicIpId ID of the DNS zone. * @param privateCloudName Name of the private cloud. - * @param dnsServiceId NSX DNS Service identifier. Generally the same as the DNS Service's display name. - * @param workloadNetworkDnsService NSX DNS Service. * @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 nSX DNS Service. */ @ServiceMethod(returns = ReturnType.SINGLE) - public WorkloadNetworkDnsServiceInner createDnsService( - String resourceGroupName, - String privateCloudName, - String dnsServiceId, - WorkloadNetworkDnsServiceInner workloadNetworkDnsService) { - return createDnsServiceAsync(resourceGroupName, privateCloudName, dnsServiceId, workloadNetworkDnsService) - .block(); + public void deletePublicIp(String resourceGroupName, String publicIpId, String privateCloudName) { + deletePublicIpAsync(resourceGroupName, publicIpId, privateCloudName).block(); } /** - * Create a DNS service by id in a private cloud workload network. - * + * Delete a WorkloadNetworkPublicIP. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param publicIpId ID of the DNS zone. * @param privateCloudName Name of the private cloud. - * @param dnsServiceId NSX DNS Service identifier. Generally the same as the DNS Service's display name. - * @param workloadNetworkDnsService NSX DNS Service. * @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 nSX DNS Service. */ @ServiceMethod(returns = ReturnType.SINGLE) - public WorkloadNetworkDnsServiceInner createDnsService( - String resourceGroupName, - String privateCloudName, - String dnsServiceId, - WorkloadNetworkDnsServiceInner workloadNetworkDnsService, - Context context) { - return createDnsServiceAsync( - resourceGroupName, privateCloudName, dnsServiceId, workloadNetworkDnsService, context) - .block(); + public void deletePublicIp(String resourceGroupName, String publicIpId, String privateCloudName, Context context) { + deletePublicIpAsync(resourceGroupName, publicIpId, privateCloudName, context).block(); } /** - * Create or update a DNS service by id in a private cloud workload network. - * + * List WorkloadNetworkSegment resources by WorkloadNetwork. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param dnsServiceId NSX DNS Service identifier. Generally the same as the DNS Service's display name. - * @param workloadNetworkDnsService NSX DNS Service. * @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 nSX DNS Service along with {@link Response} on successful completion of {@link Mono}. + * @return the response of a WorkloadNetworkSegment list operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateDnsServiceWithResponseAsync( - String resourceGroupName, - String privateCloudName, - String dnsServiceId, - WorkloadNetworkDnsServiceInner workloadNetworkDnsService) { + private Mono> listSegmentsSinglePageAsync(String resourceGroupName, + String privateCloudName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -7666,66 +6082,37 @@ private Mono>> updateDnsServiceWithResponseAsync( return Mono .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); } - if (dnsServiceId == null) { - return Mono.error(new IllegalArgumentException("Parameter dnsServiceId is required and cannot be null.")); - } - if (workloadNetworkDnsService == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter workloadNetworkDnsService is required and cannot be null.")); - } else { - workloadNetworkDnsService.validate(); - } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .updateDnsService( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - this.client.getApiVersion(), - privateCloudName, - dnsServiceId, - workloadNetworkDnsService, - accept, - context)) + .withContext(context -> service.listSegments(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, 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())); } /** - * Create or update a DNS service by id in a private cloud workload network. - * + * List WorkloadNetworkSegment resources by WorkloadNetwork. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param dnsServiceId NSX DNS Service identifier. Generally the same as the DNS Service's display name. - * @param workloadNetworkDnsService NSX DNS Service. * @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 nSX DNS Service along with {@link Response} on successful completion of {@link Mono}. + * @return the response of a WorkloadNetworkSegment list operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateDnsServiceWithResponseAsync( - String resourceGroupName, - String privateCloudName, - String dnsServiceId, - WorkloadNetworkDnsServiceInner workloadNetworkDnsService, - Context context) { + private Mono> listSegmentsSinglePageAsync(String resourceGroupName, + String privateCloudName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -7735,526 +6122,500 @@ private Mono>> updateDnsServiceWithResponseAsync( return Mono .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); } - if (dnsServiceId == null) { - return Mono.error(new IllegalArgumentException("Parameter dnsServiceId is required and cannot be null.")); - } - if (workloadNetworkDnsService == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter workloadNetworkDnsService is required and cannot be null.")); - } else { - workloadNetworkDnsService.validate(); - } final String accept = "application/json"; context = this.client.mergeContext(context); return service - .updateDnsService( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - this.client.getApiVersion(), - privateCloudName, - dnsServiceId, - workloadNetworkDnsService, - accept, - context); + .listSegments(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, privateCloudName, accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** - * Create or update a DNS service by id in a private cloud workload network. - * + * List WorkloadNetworkSegment resources by WorkloadNetwork. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param dnsServiceId NSX DNS Service identifier. Generally the same as the DNS Service's display name. - * @param workloadNetworkDnsService NSX DNS Service. * @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 nSX DNS Service. + * @return the response of a WorkloadNetworkSegment list operation as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, WorkloadNetworkDnsServiceInner> - beginUpdateDnsServiceAsync( - String resourceGroupName, - String privateCloudName, - String dnsServiceId, - WorkloadNetworkDnsServiceInner workloadNetworkDnsService) { - Mono>> mono = - updateDnsServiceWithResponseAsync( - resourceGroupName, privateCloudName, dnsServiceId, workloadNetworkDnsService); - return this - .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - WorkloadNetworkDnsServiceInner.class, - WorkloadNetworkDnsServiceInner.class, - this.client.getContext()); + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listSegmentsAsync(String resourceGroupName, + String privateCloudName) { + return new PagedFlux<>(() -> listSegmentsSinglePageAsync(resourceGroupName, privateCloudName), + nextLink -> listSegmentsNextSinglePageAsync(nextLink)); } /** - * Create or update a DNS service by id in a private cloud workload network. - * + * List WorkloadNetworkSegment resources by WorkloadNetwork. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param dnsServiceId NSX DNS Service identifier. Generally the same as the DNS Service's display name. - * @param workloadNetworkDnsService NSX DNS Service. * @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 nSX DNS Service. + * @return the response of a WorkloadNetworkSegment list operation as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, WorkloadNetworkDnsServiceInner> - beginUpdateDnsServiceAsync( - String resourceGroupName, - String privateCloudName, - String dnsServiceId, - WorkloadNetworkDnsServiceInner workloadNetworkDnsService, - Context context) { - context = this.client.mergeContext(context); - Mono>> mono = - updateDnsServiceWithResponseAsync( - resourceGroupName, privateCloudName, dnsServiceId, workloadNetworkDnsService, context); - return this - .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - WorkloadNetworkDnsServiceInner.class, - WorkloadNetworkDnsServiceInner.class, - context); + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listSegmentsAsync(String resourceGroupName, String privateCloudName, + Context context) { + return new PagedFlux<>(() -> listSegmentsSinglePageAsync(resourceGroupName, privateCloudName, context), + nextLink -> listSegmentsNextSinglePageAsync(nextLink, context)); } /** - * Create or update a DNS service by id in a private cloud workload network. - * + * List WorkloadNetworkSegment resources by WorkloadNetwork. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param dnsServiceId NSX DNS Service identifier. Generally the same as the DNS Service's display name. - * @param workloadNetworkDnsService NSX DNS Service. * @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 nSX DNS Service. + * @return the response of a WorkloadNetworkSegment list operation as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, WorkloadNetworkDnsServiceInner> beginUpdateDnsService( - String resourceGroupName, - String privateCloudName, - String dnsServiceId, - WorkloadNetworkDnsServiceInner workloadNetworkDnsService) { - return this - .beginUpdateDnsServiceAsync(resourceGroupName, privateCloudName, dnsServiceId, workloadNetworkDnsService) - .getSyncPoller(); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listSegments(String resourceGroupName, String privateCloudName) { + return new PagedIterable<>(listSegmentsAsync(resourceGroupName, privateCloudName)); } /** - * Create or update a DNS service by id in a private cloud workload network. - * + * List WorkloadNetworkSegment resources by WorkloadNetwork. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param dnsServiceId NSX DNS Service identifier. Generally the same as the DNS Service's display name. - * @param workloadNetworkDnsService NSX DNS Service. * @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 nSX DNS Service. + * @return the response of a WorkloadNetworkSegment list operation as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, WorkloadNetworkDnsServiceInner> beginUpdateDnsService( - String resourceGroupName, - String privateCloudName, - String dnsServiceId, - WorkloadNetworkDnsServiceInner workloadNetworkDnsService, + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listSegments(String resourceGroupName, String privateCloudName, Context context) { - return this - .beginUpdateDnsServiceAsync( - resourceGroupName, privateCloudName, dnsServiceId, workloadNetworkDnsService, context) - .getSyncPoller(); + return new PagedIterable<>(listSegmentsAsync(resourceGroupName, privateCloudName, context)); } /** - * Create or update a DNS service by id in a private cloud workload network. - * + * Get a WorkloadNetworkSegment. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param dnsServiceId NSX DNS Service identifier. Generally the same as the DNS Service's display name. - * @param workloadNetworkDnsService NSX DNS Service. + * @param segmentId The ID of the NSX Segment. * @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 nSX DNS Service on successful completion of {@link Mono}. + * @return a WorkloadNetworkSegment along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateDnsServiceAsync( - String resourceGroupName, - String privateCloudName, - String dnsServiceId, - WorkloadNetworkDnsServiceInner workloadNetworkDnsService) { - return beginUpdateDnsServiceAsync(resourceGroupName, privateCloudName, dnsServiceId, workloadNetworkDnsService) - .last() - .flatMap(this.client::getLroFinalResultOrError); - } + private Mono> getSegmentWithResponseAsync(String resourceGroupName, + String privateCloudName, String segmentId) { + 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 (privateCloudName == null) { + return Mono + .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } + if (segmentId == null) { + return Mono.error(new IllegalArgumentException("Parameter segmentId is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.getSegment(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, segmentId, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } /** - * Create or update a DNS service by id in a private cloud workload network. - * + * Get a WorkloadNetworkSegment. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param dnsServiceId NSX DNS Service identifier. Generally the same as the DNS Service's display name. - * @param workloadNetworkDnsService NSX DNS Service. + * @param segmentId The ID of the NSX Segment. * @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 nSX DNS Service on successful completion of {@link Mono}. + * @return a WorkloadNetworkSegment along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateDnsServiceAsync( - String resourceGroupName, - String privateCloudName, - String dnsServiceId, - WorkloadNetworkDnsServiceInner workloadNetworkDnsService, - Context context) { - return beginUpdateDnsServiceAsync( - resourceGroupName, privateCloudName, dnsServiceId, workloadNetworkDnsService, context) - .last() - .flatMap(this.client::getLroFinalResultOrError); + private Mono> getSegmentWithResponseAsync(String resourceGroupName, + String privateCloudName, String segmentId, 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 (privateCloudName == null) { + return Mono + .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } + if (segmentId == null) { + return Mono.error(new IllegalArgumentException("Parameter segmentId is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.getSegment(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, segmentId, accept, context); } /** - * Create or update a DNS service by id in a private cloud workload network. - * + * Get a WorkloadNetworkSegment. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param dnsServiceId NSX DNS Service identifier. Generally the same as the DNS Service's display name. - * @param workloadNetworkDnsService NSX DNS Service. + * @param segmentId The ID of the NSX Segment. * @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 nSX DNS Service. + * @return a WorkloadNetworkSegment on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public WorkloadNetworkDnsServiceInner updateDnsService( - String resourceGroupName, - String privateCloudName, - String dnsServiceId, - WorkloadNetworkDnsServiceInner workloadNetworkDnsService) { - return updateDnsServiceAsync(resourceGroupName, privateCloudName, dnsServiceId, workloadNetworkDnsService) - .block(); + private Mono getSegmentAsync(String resourceGroupName, String privateCloudName, + String segmentId) { + return getSegmentWithResponseAsync(resourceGroupName, privateCloudName, segmentId) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** - * Create or update a DNS service by id in a private cloud workload network. - * + * Get a WorkloadNetworkSegment. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param dnsServiceId NSX DNS Service identifier. Generally the same as the DNS Service's display name. - * @param workloadNetworkDnsService NSX DNS Service. + * @param segmentId The ID of the NSX Segment. * @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 nSX DNS Service. + * @return a WorkloadNetworkSegment along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public WorkloadNetworkDnsServiceInner updateDnsService( - String resourceGroupName, - String privateCloudName, - String dnsServiceId, - WorkloadNetworkDnsServiceInner workloadNetworkDnsService, - Context context) { - return updateDnsServiceAsync( - resourceGroupName, privateCloudName, dnsServiceId, workloadNetworkDnsService, context) - .block(); + public Response getSegmentWithResponse(String resourceGroupName, + String privateCloudName, String segmentId, Context context) { + return getSegmentWithResponseAsync(resourceGroupName, privateCloudName, segmentId, context).block(); } /** - * Delete a DNS service by id in a private cloud workload network. - * + * Get a WorkloadNetworkSegment. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dnsServiceId NSX DNS Service identifier. Generally the same as the DNS Service's display name. * @param privateCloudName Name of the private cloud. + * @param segmentId The ID of the NSX Segment. * @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}. + * @return a WorkloadNetworkSegment. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public WorkloadNetworkSegmentInner getSegment(String resourceGroupName, String privateCloudName, String segmentId) { + return getSegmentWithResponse(resourceGroupName, privateCloudName, segmentId, Context.NONE).getValue(); + } + + /** + * Create a WorkloadNetworkSegment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param segmentId The ID of the NSX Segment. + * @param workloadNetworkSegment Resource create parameters. + * @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 nSX Segment along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteDnsServiceWithResponseAsync( - String resourceGroupName, String dnsServiceId, String privateCloudName) { + private Mono>> createSegmentsWithResponseAsync(String resourceGroupName, + String privateCloudName, String segmentId, WorkloadNetworkSegmentInner workloadNetworkSegment) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + 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 (dnsServiceId == null) { - return Mono.error(new IllegalArgumentException("Parameter dnsServiceId is required and cannot be null.")); - } if (privateCloudName == null) { return Mono .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); } + if (segmentId == null) { + return Mono.error(new IllegalArgumentException("Parameter segmentId is required and cannot be null.")); + } + if (workloadNetworkSegment == null) { + return Mono.error( + new IllegalArgumentException("Parameter workloadNetworkSegment is required and cannot be null.")); + } else { + workloadNetworkSegment.validate(); + } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .deleteDnsService( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - this.client.getApiVersion(), - dnsServiceId, - privateCloudName, - accept, - context)) + .withContext(context -> service.createSegments(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, segmentId, workloadNetworkSegment, + accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Delete a DNS service by id in a private cloud workload network. - * + * Create a WorkloadNetworkSegment. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dnsServiceId NSX DNS Service identifier. Generally the same as the DNS Service's display name. * @param privateCloudName Name of the private cloud. + * @param segmentId The ID of the NSX Segment. + * @param workloadNetworkSegment Resource create parameters. * @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}. + * @return nSX Segment along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteDnsServiceWithResponseAsync( - String resourceGroupName, String dnsServiceId, String privateCloudName, Context context) { + private Mono>> createSegmentsWithResponseAsync(String resourceGroupName, + String privateCloudName, String segmentId, WorkloadNetworkSegmentInner workloadNetworkSegment, + Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + 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 (dnsServiceId == null) { - return Mono.error(new IllegalArgumentException("Parameter dnsServiceId is required and cannot be null.")); - } if (privateCloudName == null) { return Mono .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); } + if (segmentId == null) { + return Mono.error(new IllegalArgumentException("Parameter segmentId is required and cannot be null.")); + } + if (workloadNetworkSegment == null) { + return Mono.error( + new IllegalArgumentException("Parameter workloadNetworkSegment is required and cannot be null.")); + } else { + workloadNetworkSegment.validate(); + } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .deleteDnsService( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - this.client.getApiVersion(), - dnsServiceId, - privateCloudName, - accept, - context); + return service.createSegments(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, segmentId, workloadNetworkSegment, + accept, context); } /** - * Delete a DNS service by id in a private cloud workload network. - * + * Create a WorkloadNetworkSegment. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dnsServiceId NSX DNS Service identifier. Generally the same as the DNS Service's display name. * @param privateCloudName Name of the private cloud. + * @param segmentId The ID of the NSX Segment. + * @param workloadNetworkSegment Resource create parameters. * @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 long-running operation. + * @return the {@link PollerFlux} for polling of nSX Segment. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteDnsServiceAsync( - String resourceGroupName, String dnsServiceId, String privateCloudName) { - Mono>> mono = - deleteDnsServiceWithResponseAsync(resourceGroupName, dnsServiceId, privateCloudName); - return this - .client - .getLroResult( - mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); + private PollerFlux, WorkloadNetworkSegmentInner> beginCreateSegmentsAsync( + String resourceGroupName, String privateCloudName, String segmentId, + WorkloadNetworkSegmentInner workloadNetworkSegment) { + Mono>> mono + = createSegmentsWithResponseAsync(resourceGroupName, privateCloudName, segmentId, workloadNetworkSegment); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), WorkloadNetworkSegmentInner.class, WorkloadNetworkSegmentInner.class, + this.client.getContext()); } /** - * Delete a DNS service by id in a private cloud workload network. - * + * Create a WorkloadNetworkSegment. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dnsServiceId NSX DNS Service identifier. Generally the same as the DNS Service's display name. * @param privateCloudName Name of the private cloud. + * @param segmentId The ID of the NSX Segment. + * @param workloadNetworkSegment Resource create parameters. * @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 long-running operation. + * @return the {@link PollerFlux} for polling of nSX Segment. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteDnsServiceAsync( - String resourceGroupName, String dnsServiceId, String privateCloudName, Context context) { + private PollerFlux, WorkloadNetworkSegmentInner> beginCreateSegmentsAsync( + String resourceGroupName, String privateCloudName, String segmentId, + WorkloadNetworkSegmentInner workloadNetworkSegment, Context context) { context = this.client.mergeContext(context); - Mono>> mono = - deleteDnsServiceWithResponseAsync(resourceGroupName, dnsServiceId, privateCloudName, context); - return this - .client - .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); + Mono>> mono = createSegmentsWithResponseAsync(resourceGroupName, privateCloudName, + segmentId, workloadNetworkSegment, context); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), WorkloadNetworkSegmentInner.class, WorkloadNetworkSegmentInner.class, + context); } /** - * Delete a DNS service by id in a private cloud workload network. - * + * Create a WorkloadNetworkSegment. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dnsServiceId NSX DNS Service identifier. Generally the same as the DNS Service's display name. * @param privateCloudName Name of the private cloud. + * @param segmentId The ID of the NSX Segment. + * @param workloadNetworkSegment Resource create parameters. * @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 long-running operation. + * @return the {@link SyncPoller} for polling of nSX Segment. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDeleteDnsService( - String resourceGroupName, String dnsServiceId, String privateCloudName) { - return this.beginDeleteDnsServiceAsync(resourceGroupName, dnsServiceId, privateCloudName).getSyncPoller(); + public SyncPoller, WorkloadNetworkSegmentInner> beginCreateSegments( + String resourceGroupName, String privateCloudName, String segmentId, + WorkloadNetworkSegmentInner workloadNetworkSegment) { + return this.beginCreateSegmentsAsync(resourceGroupName, privateCloudName, segmentId, workloadNetworkSegment) + .getSyncPoller(); } /** - * Delete a DNS service by id in a private cloud workload network. - * + * Create a WorkloadNetworkSegment. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dnsServiceId NSX DNS Service identifier. Generally the same as the DNS Service's display name. * @param privateCloudName Name of the private cloud. + * @param segmentId The ID of the NSX Segment. + * @param workloadNetworkSegment Resource create parameters. * @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 long-running operation. + * @return the {@link SyncPoller} for polling of nSX Segment. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDeleteDnsService( - String resourceGroupName, String dnsServiceId, String privateCloudName, Context context) { + public SyncPoller, WorkloadNetworkSegmentInner> beginCreateSegments( + String resourceGroupName, String privateCloudName, String segmentId, + WorkloadNetworkSegmentInner workloadNetworkSegment, Context context) { return this - .beginDeleteDnsServiceAsync(resourceGroupName, dnsServiceId, privateCloudName, context) + .beginCreateSegmentsAsync(resourceGroupName, privateCloudName, segmentId, workloadNetworkSegment, context) .getSyncPoller(); } /** - * Delete a DNS service by id in a private cloud workload network. - * + * Create a WorkloadNetworkSegment. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dnsServiceId NSX DNS Service identifier. Generally the same as the DNS Service's display name. * @param privateCloudName Name of the private cloud. + * @param segmentId The ID of the NSX Segment. + * @param workloadNetworkSegment Resource create parameters. * @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. + * @return nSX Segment on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteDnsServiceAsync(String resourceGroupName, String dnsServiceId, String privateCloudName) { - return beginDeleteDnsServiceAsync(resourceGroupName, dnsServiceId, privateCloudName) - .last() + private Mono createSegmentsAsync(String resourceGroupName, String privateCloudName, + String segmentId, WorkloadNetworkSegmentInner workloadNetworkSegment) { + return beginCreateSegmentsAsync(resourceGroupName, privateCloudName, segmentId, workloadNetworkSegment).last() .flatMap(this.client::getLroFinalResultOrError); } /** - * Delete a DNS service by id in a private cloud workload network. - * + * Create a WorkloadNetworkSegment. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dnsServiceId NSX DNS Service identifier. Generally the same as the DNS Service's display name. * @param privateCloudName Name of the private cloud. + * @param segmentId The ID of the NSX Segment. + * @param workloadNetworkSegment Resource create parameters. * @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 A {@link Mono} that completes when a successful response is received. + * @return nSX Segment on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteDnsServiceAsync( - String resourceGroupName, String dnsServiceId, String privateCloudName, Context context) { - return beginDeleteDnsServiceAsync(resourceGroupName, dnsServiceId, privateCloudName, context) - .last() - .flatMap(this.client::getLroFinalResultOrError); + private Mono createSegmentsAsync(String resourceGroupName, String privateCloudName, + String segmentId, WorkloadNetworkSegmentInner workloadNetworkSegment, Context context) { + return beginCreateSegmentsAsync(resourceGroupName, privateCloudName, segmentId, workloadNetworkSegment, context) + .last().flatMap(this.client::getLroFinalResultOrError); } /** - * Delete a DNS service by id in a private cloud workload network. - * + * Create a WorkloadNetworkSegment. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dnsServiceId NSX DNS Service identifier. Generally the same as the DNS Service's display name. * @param privateCloudName Name of the private cloud. + * @param segmentId The ID of the NSX Segment. + * @param workloadNetworkSegment Resource create parameters. * @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 nSX Segment. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void deleteDnsService(String resourceGroupName, String dnsServiceId, String privateCloudName) { - deleteDnsServiceAsync(resourceGroupName, dnsServiceId, privateCloudName).block(); + public WorkloadNetworkSegmentInner createSegments(String resourceGroupName, String privateCloudName, + String segmentId, WorkloadNetworkSegmentInner workloadNetworkSegment) { + return createSegmentsAsync(resourceGroupName, privateCloudName, segmentId, workloadNetworkSegment).block(); } /** - * Delete a DNS service by id in a private cloud workload network. - * + * Create a WorkloadNetworkSegment. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dnsServiceId NSX DNS Service identifier. Generally the same as the DNS Service's display name. * @param privateCloudName Name of the private cloud. + * @param segmentId The ID of the NSX Segment. + * @param workloadNetworkSegment Resource create parameters. * @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 nSX Segment. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void deleteDnsService( - String resourceGroupName, String dnsServiceId, String privateCloudName, Context context) { - deleteDnsServiceAsync(resourceGroupName, dnsServiceId, privateCloudName, context).block(); + public WorkloadNetworkSegmentInner createSegments(String resourceGroupName, String privateCloudName, + String segmentId, WorkloadNetworkSegmentInner workloadNetworkSegment, Context context) { + return createSegmentsAsync(resourceGroupName, privateCloudName, segmentId, workloadNetworkSegment, context) + .block(); } /** - * List of DNS zones in a private cloud workload network. - * + * Update a WorkloadNetworkSegment. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param segmentId The ID of the NSX Segment. + * @param workloadNetworkSegment The resource properties to be updated. * @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 list of NSX DNS Zones along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return nSX Segment along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listDnsZonesSinglePageAsync( - String resourceGroupName, String privateCloudName) { + private Mono>> updateSegmentsWithResponseAsync(String resourceGroupName, + String privateCloudName, String segmentId, WorkloadNetworkSegmentUpdate workloadNetworkSegment) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -8264,56 +6625,47 @@ private Mono> listDnsZonesSinglePageA return Mono .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); } + if (segmentId == null) { + return Mono.error(new IllegalArgumentException("Parameter segmentId is required and cannot be null.")); + } + if (workloadNetworkSegment == null) { + return Mono.error( + new IllegalArgumentException("Parameter workloadNetworkSegment is required and cannot be null.")); + } else { + workloadNetworkSegment.validate(); + } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .listDnsZones( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - this.client.getApiVersion(), - privateCloudName, - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .withContext(context -> service.updateSegments(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, segmentId, workloadNetworkSegment, + accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * List of DNS zones in a private cloud workload network. - * + * Update a WorkloadNetworkSegment. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param segmentId The ID of the NSX Segment. + * @param workloadNetworkSegment The resource properties to be updated. * @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 a list of NSX DNS Zones along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return nSX Segment along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listDnsZonesSinglePageAsync( - String resourceGroupName, String privateCloudName, Context context) { + private Mono>> updateSegmentsWithResponseAsync(String resourceGroupName, + String privateCloudName, String segmentId, WorkloadNetworkSegmentUpdate workloadNetworkSegment, + Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -8323,123 +6675,210 @@ private Mono> listDnsZonesSinglePageA return Mono .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); } + if (segmentId == null) { + return Mono.error(new IllegalArgumentException("Parameter segmentId is required and cannot be null.")); + } + if (workloadNetworkSegment == null) { + return Mono.error( + new IllegalArgumentException("Parameter workloadNetworkSegment is required and cannot be null.")); + } else { + workloadNetworkSegment.validate(); + } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .listDnsZones( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - this.client.getApiVersion(), - privateCloudName, - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.updateSegments(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, segmentId, workloadNetworkSegment, + accept, context); } /** - * List of DNS zones in a private cloud workload network. - * + * Update a WorkloadNetworkSegment. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param segmentId The ID of the NSX Segment. + * @param workloadNetworkSegment The resource properties to be updated. * @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 list of NSX DNS Zones as paginated response with {@link PagedFlux}. + * @return the {@link PollerFlux} for polling of nSX Segment. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listDnsZonesAsync( - String resourceGroupName, String privateCloudName) { - return new PagedFlux<>( - () -> listDnsZonesSinglePageAsync(resourceGroupName, privateCloudName), - nextLink -> listDnsZonesNextSinglePageAsync(nextLink)); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, WorkloadNetworkSegmentInner> beginUpdateSegmentsAsync( + String resourceGroupName, String privateCloudName, String segmentId, + WorkloadNetworkSegmentUpdate workloadNetworkSegment) { + Mono>> mono + = updateSegmentsWithResponseAsync(resourceGroupName, privateCloudName, segmentId, workloadNetworkSegment); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), WorkloadNetworkSegmentInner.class, WorkloadNetworkSegmentInner.class, + this.client.getContext()); } /** - * List of DNS zones in a private cloud workload network. - * + * Update a WorkloadNetworkSegment. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param segmentId The ID of the NSX Segment. + * @param workloadNetworkSegment The resource properties to be updated. * @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 a list of NSX DNS Zones as paginated response with {@link PagedFlux}. + * @return the {@link PollerFlux} for polling of nSX Segment. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listDnsZonesAsync( - String resourceGroupName, String privateCloudName, Context context) { - return new PagedFlux<>( - () -> listDnsZonesSinglePageAsync(resourceGroupName, privateCloudName, context), - nextLink -> listDnsZonesNextSinglePageAsync(nextLink, context)); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, WorkloadNetworkSegmentInner> beginUpdateSegmentsAsync( + String resourceGroupName, String privateCloudName, String segmentId, + WorkloadNetworkSegmentUpdate workloadNetworkSegment, Context context) { + context = this.client.mergeContext(context); + Mono>> mono = updateSegmentsWithResponseAsync(resourceGroupName, privateCloudName, + segmentId, workloadNetworkSegment, context); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), WorkloadNetworkSegmentInner.class, WorkloadNetworkSegmentInner.class, + context); } /** - * List of DNS zones in a private cloud workload network. - * + * Update a WorkloadNetworkSegment. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param segmentId The ID of the NSX Segment. + * @param workloadNetworkSegment The resource properties to be updated. * @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 list of NSX DNS Zones as paginated response with {@link PagedIterable}. + * @return the {@link SyncPoller} for polling of nSX Segment. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listDnsZones(String resourceGroupName, String privateCloudName) { - return new PagedIterable<>(listDnsZonesAsync(resourceGroupName, privateCloudName)); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, WorkloadNetworkSegmentInner> beginUpdateSegments( + String resourceGroupName, String privateCloudName, String segmentId, + WorkloadNetworkSegmentUpdate workloadNetworkSegment) { + return this.beginUpdateSegmentsAsync(resourceGroupName, privateCloudName, segmentId, workloadNetworkSegment) + .getSyncPoller(); } /** - * List of DNS zones in a private cloud workload network. - * + * Update a WorkloadNetworkSegment. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param segmentId The ID of the NSX Segment. + * @param workloadNetworkSegment The resource properties to be updated. * @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 a list of NSX DNS Zones as paginated response with {@link PagedIterable}. + * @return the {@link SyncPoller} for polling of nSX Segment. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listDnsZones( - String resourceGroupName, String privateCloudName, Context context) { - return new PagedIterable<>(listDnsZonesAsync(resourceGroupName, privateCloudName, context)); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, WorkloadNetworkSegmentInner> beginUpdateSegments( + String resourceGroupName, String privateCloudName, String segmentId, + WorkloadNetworkSegmentUpdate workloadNetworkSegment, Context context) { + return this + .beginUpdateSegmentsAsync(resourceGroupName, privateCloudName, segmentId, workloadNetworkSegment, context) + .getSyncPoller(); + } + + /** + * Update a WorkloadNetworkSegment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param segmentId The ID of the NSX Segment. + * @param workloadNetworkSegment The resource properties to be updated. + * @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 nSX Segment on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono updateSegmentsAsync(String resourceGroupName, String privateCloudName, + String segmentId, WorkloadNetworkSegmentUpdate workloadNetworkSegment) { + return beginUpdateSegmentsAsync(resourceGroupName, privateCloudName, segmentId, workloadNetworkSegment).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Update a WorkloadNetworkSegment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param segmentId The ID of the NSX Segment. + * @param workloadNetworkSegment The resource properties to be updated. + * @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 nSX Segment on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono updateSegmentsAsync(String resourceGroupName, String privateCloudName, + String segmentId, WorkloadNetworkSegmentUpdate workloadNetworkSegment, Context context) { + return beginUpdateSegmentsAsync(resourceGroupName, privateCloudName, segmentId, workloadNetworkSegment, context) + .last().flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Update a WorkloadNetworkSegment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param segmentId The ID of the NSX Segment. + * @param workloadNetworkSegment The resource properties to be updated. + * @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 nSX Segment. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public WorkloadNetworkSegmentInner updateSegments(String resourceGroupName, String privateCloudName, + String segmentId, WorkloadNetworkSegmentUpdate workloadNetworkSegment) { + return updateSegmentsAsync(resourceGroupName, privateCloudName, segmentId, workloadNetworkSegment).block(); + } + + /** + * Update a WorkloadNetworkSegment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param segmentId The ID of the NSX Segment. + * @param workloadNetworkSegment The resource properties to be updated. + * @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 nSX Segment. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public WorkloadNetworkSegmentInner updateSegments(String resourceGroupName, String privateCloudName, + String segmentId, WorkloadNetworkSegmentUpdate workloadNetworkSegment, Context context) { + return updateSegmentsAsync(resourceGroupName, privateCloudName, segmentId, workloadNetworkSegment, context) + .block(); } /** - * Get a DNS zone by id in a private cloud workload network. - * + * Delete a WorkloadNetworkSegment. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param dnsZoneId NSX DNS Zone identifier. Generally the same as the DNS Zone's display name. + * @param segmentId The ID of the NSX Segment. * @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 DNS zone by id in a private cloud workload network along with {@link Response} on successful completion - * of {@link Mono}. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getDnsZoneWithResponseAsync( - String resourceGroupName, String privateCloudName, String dnsZoneId) { + private Mono>> deleteSegmentWithResponseAsync(String resourceGroupName, + String privateCloudName, String segmentId) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -8449,53 +6888,38 @@ private Mono> getDnsZoneWithResponseAsync( return Mono .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); } - if (dnsZoneId == null) { - return Mono.error(new IllegalArgumentException("Parameter dnsZoneId is required and cannot be null.")); + if (segmentId == null) { + return Mono.error(new IllegalArgumentException("Parameter segmentId is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .getDnsZone( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - this.client.getApiVersion(), - privateCloudName, - dnsZoneId, - accept, - context)) + .withContext(context -> service.deleteSegment(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, segmentId, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Get a DNS zone by id in a private cloud workload network. - * + * Delete a WorkloadNetworkSegment. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param dnsZoneId NSX DNS Zone identifier. Generally the same as the DNS Zone's display name. + * @param segmentId The ID of the NSX Segment. * @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 a DNS zone by id in a private cloud workload network along with {@link Response} on successful completion - * of {@link Mono}. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getDnsZoneWithResponseAsync( - String resourceGroupName, String privateCloudName, String dnsZoneId, Context context) { + private Mono>> deleteSegmentWithResponseAsync(String resourceGroupName, + String privateCloudName, String segmentId, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -8505,440 +6929,180 @@ private Mono> getDnsZoneWithResponseAsync( return Mono .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); } - if (dnsZoneId == null) { - return Mono.error(new IllegalArgumentException("Parameter dnsZoneId is required and cannot be null.")); + if (segmentId == null) { + return Mono.error(new IllegalArgumentException("Parameter segmentId is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .getDnsZone( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - this.client.getApiVersion(), - privateCloudName, - dnsZoneId, - accept, - context); + return service.deleteSegment(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, segmentId, accept, context); } /** - * Get a DNS zone by id in a private cloud workload network. - * + * Delete a WorkloadNetworkSegment. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param dnsZoneId NSX DNS Zone identifier. Generally the same as the DNS Zone's display name. + * @param segmentId The ID of the NSX Segment. * @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 DNS zone by id in a private cloud workload network on successful completion of {@link Mono}. + * @return the {@link PollerFlux} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getDnsZoneAsync( - String resourceGroupName, String privateCloudName, String dnsZoneId) { - return getDnsZoneWithResponseAsync(resourceGroupName, privateCloudName, dnsZoneId) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginDeleteSegmentAsync(String resourceGroupName, + String privateCloudName, String segmentId) { + Mono>> mono + = deleteSegmentWithResponseAsync(resourceGroupName, privateCloudName, segmentId); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); } /** - * Get a DNS zone by id in a private cloud workload network. - * + * Delete a WorkloadNetworkSegment. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param dnsZoneId NSX DNS Zone identifier. Generally the same as the DNS Zone's display name. + * @param segmentId The ID of the NSX Segment. * @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 a DNS zone by id in a private cloud workload network along with {@link Response}. + * @return the {@link PollerFlux} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getDnsZoneWithResponse( - String resourceGroupName, String privateCloudName, String dnsZoneId, Context context) { - return getDnsZoneWithResponseAsync(resourceGroupName, privateCloudName, dnsZoneId, context).block(); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginDeleteSegmentAsync(String resourceGroupName, + String privateCloudName, String segmentId, Context context) { + context = this.client.mergeContext(context); + Mono>> mono + = deleteSegmentWithResponseAsync(resourceGroupName, privateCloudName, segmentId, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + context); } /** - * Get a DNS zone by id in a private cloud workload network. - * + * Delete a WorkloadNetworkSegment. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param dnsZoneId NSX DNS Zone identifier. Generally the same as the DNS Zone's display name. + * @param segmentId The ID of the NSX Segment. * @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 DNS zone by id in a private cloud workload network. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public WorkloadNetworkDnsZoneInner getDnsZone(String resourceGroupName, String privateCloudName, String dnsZoneId) { - return getDnsZoneWithResponse(resourceGroupName, privateCloudName, dnsZoneId, Context.NONE).getValue(); - } - - /** - * Create a DNS zone by id in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param dnsZoneId NSX DNS Zone identifier. Generally the same as the DNS Zone's display name. - * @param workloadNetworkDnsZone NSX DNS Zone. - * @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 nSX DNS Zone along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createDnsZoneWithResponseAsync( - String resourceGroupName, - String privateCloudName, - String dnsZoneId, - WorkloadNetworkDnsZoneInner workloadNetworkDnsZone) { - 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 (privateCloudName == null) { - return Mono - .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); - } - if (dnsZoneId == null) { - return Mono.error(new IllegalArgumentException("Parameter dnsZoneId is required and cannot be null.")); - } - if (workloadNetworkDnsZone == null) { - return Mono - .error( - new IllegalArgumentException("Parameter workloadNetworkDnsZone is required and cannot be null.")); - } else { - workloadNetworkDnsZone.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .createDnsZone( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - this.client.getApiVersion(), - privateCloudName, - dnsZoneId, - workloadNetworkDnsZone, - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Create a DNS zone by id in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param dnsZoneId NSX DNS Zone identifier. Generally the same as the DNS Zone's display name. - * @param workloadNetworkDnsZone NSX DNS Zone. - * @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 nSX DNS Zone along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createDnsZoneWithResponseAsync( - String resourceGroupName, - String privateCloudName, - String dnsZoneId, - WorkloadNetworkDnsZoneInner workloadNetworkDnsZone, - 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 (privateCloudName == null) { - return Mono - .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); - } - if (dnsZoneId == null) { - return Mono.error(new IllegalArgumentException("Parameter dnsZoneId is required and cannot be null.")); - } - if (workloadNetworkDnsZone == null) { - return Mono - .error( - new IllegalArgumentException("Parameter workloadNetworkDnsZone is required and cannot be null.")); - } else { - workloadNetworkDnsZone.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .createDnsZone( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - this.client.getApiVersion(), - privateCloudName, - dnsZoneId, - workloadNetworkDnsZone, - accept, - context); - } - - /** - * Create a DNS zone by id in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param dnsZoneId NSX DNS Zone identifier. Generally the same as the DNS Zone's display name. - * @param workloadNetworkDnsZone NSX DNS Zone. - * @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 nSX DNS Zone. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, WorkloadNetworkDnsZoneInner> beginCreateDnsZoneAsync( - String resourceGroupName, - String privateCloudName, - String dnsZoneId, - WorkloadNetworkDnsZoneInner workloadNetworkDnsZone) { - Mono>> mono = - createDnsZoneWithResponseAsync(resourceGroupName, privateCloudName, dnsZoneId, workloadNetworkDnsZone); - return this - .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - WorkloadNetworkDnsZoneInner.class, - WorkloadNetworkDnsZoneInner.class, - this.client.getContext()); - } - - /** - * Create a DNS zone by id in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param dnsZoneId NSX DNS Zone identifier. Generally the same as the DNS Zone's display name. - * @param workloadNetworkDnsZone NSX DNS Zone. - * @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 nSX DNS Zone. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, WorkloadNetworkDnsZoneInner> beginCreateDnsZoneAsync( - String resourceGroupName, - String privateCloudName, - String dnsZoneId, - WorkloadNetworkDnsZoneInner workloadNetworkDnsZone, - Context context) { - context = this.client.mergeContext(context); - Mono>> mono = - createDnsZoneWithResponseAsync( - resourceGroupName, privateCloudName, dnsZoneId, workloadNetworkDnsZone, context); - return this - .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - WorkloadNetworkDnsZoneInner.class, - WorkloadNetworkDnsZoneInner.class, - context); - } - - /** - * Create a DNS zone by id in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @param dnsZoneId NSX DNS Zone identifier. Generally the same as the DNS Zone's display name. - * @param workloadNetworkDnsZone NSX DNS Zone. - * @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 nSX DNS Zone. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, WorkloadNetworkDnsZoneInner> beginCreateDnsZone( - String resourceGroupName, - String privateCloudName, - String dnsZoneId, - WorkloadNetworkDnsZoneInner workloadNetworkDnsZone) { - return this - .beginCreateDnsZoneAsync(resourceGroupName, privateCloudName, dnsZoneId, workloadNetworkDnsZone) - .getSyncPoller(); + public SyncPoller, Void> beginDeleteSegment(String resourceGroupName, String privateCloudName, + String segmentId) { + return this.beginDeleteSegmentAsync(resourceGroupName, privateCloudName, segmentId).getSyncPoller(); } /** - * Create a DNS zone by id in a private cloud workload network. - * + * Delete a WorkloadNetworkSegment. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param dnsZoneId NSX DNS Zone identifier. Generally the same as the DNS Zone's display name. - * @param workloadNetworkDnsZone NSX DNS Zone. + * @param segmentId The ID of the NSX Segment. * @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 nSX DNS Zone. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, WorkloadNetworkDnsZoneInner> beginCreateDnsZone( - String resourceGroupName, - String privateCloudName, - String dnsZoneId, - WorkloadNetworkDnsZoneInner workloadNetworkDnsZone, - Context context) { - return this - .beginCreateDnsZoneAsync(resourceGroupName, privateCloudName, dnsZoneId, workloadNetworkDnsZone, context) - .getSyncPoller(); + public SyncPoller, Void> beginDeleteSegment(String resourceGroupName, String privateCloudName, + String segmentId, Context context) { + return this.beginDeleteSegmentAsync(resourceGroupName, privateCloudName, segmentId, context).getSyncPoller(); } /** - * Create a DNS zone by id in a private cloud workload network. - * + * Delete a WorkloadNetworkSegment. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param dnsZoneId NSX DNS Zone identifier. Generally the same as the DNS Zone's display name. - * @param workloadNetworkDnsZone NSX DNS Zone. + * @param segmentId The ID of the NSX Segment. * @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 nSX DNS Zone on successful completion of {@link Mono}. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createDnsZoneAsync( - String resourceGroupName, - String privateCloudName, - String dnsZoneId, - WorkloadNetworkDnsZoneInner workloadNetworkDnsZone) { - return beginCreateDnsZoneAsync(resourceGroupName, privateCloudName, dnsZoneId, workloadNetworkDnsZone) - .last() + private Mono deleteSegmentAsync(String resourceGroupName, String privateCloudName, String segmentId) { + return beginDeleteSegmentAsync(resourceGroupName, privateCloudName, segmentId).last() .flatMap(this.client::getLroFinalResultOrError); } /** - * Create a DNS zone by id in a private cloud workload network. - * + * Delete a WorkloadNetworkSegment. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param dnsZoneId NSX DNS Zone identifier. Generally the same as the DNS Zone's display name. - * @param workloadNetworkDnsZone NSX DNS Zone. + * @param segmentId The ID of the NSX Segment. * @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 nSX DNS Zone on successful completion of {@link Mono}. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createDnsZoneAsync( - String resourceGroupName, - String privateCloudName, - String dnsZoneId, - WorkloadNetworkDnsZoneInner workloadNetworkDnsZone, + private Mono deleteSegmentAsync(String resourceGroupName, String privateCloudName, String segmentId, Context context) { - return beginCreateDnsZoneAsync(resourceGroupName, privateCloudName, dnsZoneId, workloadNetworkDnsZone, context) - .last() + return beginDeleteSegmentAsync(resourceGroupName, privateCloudName, segmentId, context).last() .flatMap(this.client::getLroFinalResultOrError); } /** - * Create a DNS zone by id in a private cloud workload network. - * + * Delete a WorkloadNetworkSegment. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param dnsZoneId NSX DNS Zone identifier. Generally the same as the DNS Zone's display name. - * @param workloadNetworkDnsZone NSX DNS Zone. + * @param segmentId The ID of the NSX Segment. * @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 nSX DNS Zone. */ @ServiceMethod(returns = ReturnType.SINGLE) - public WorkloadNetworkDnsZoneInner createDnsZone( - String resourceGroupName, - String privateCloudName, - String dnsZoneId, - WorkloadNetworkDnsZoneInner workloadNetworkDnsZone) { - return createDnsZoneAsync(resourceGroupName, privateCloudName, dnsZoneId, workloadNetworkDnsZone).block(); + public void deleteSegment(String resourceGroupName, String privateCloudName, String segmentId) { + deleteSegmentAsync(resourceGroupName, privateCloudName, segmentId).block(); } /** - * Create a DNS zone by id in a private cloud workload network. - * + * Delete a WorkloadNetworkSegment. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param dnsZoneId NSX DNS Zone identifier. Generally the same as the DNS Zone's display name. - * @param workloadNetworkDnsZone NSX DNS Zone. + * @param segmentId The ID of the NSX Segment. * @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 nSX DNS Zone. */ @ServiceMethod(returns = ReturnType.SINGLE) - public WorkloadNetworkDnsZoneInner createDnsZone( - String resourceGroupName, - String privateCloudName, - String dnsZoneId, - WorkloadNetworkDnsZoneInner workloadNetworkDnsZone, - Context context) { - return createDnsZoneAsync(resourceGroupName, privateCloudName, dnsZoneId, workloadNetworkDnsZone, context) - .block(); + public void deleteSegment(String resourceGroupName, String privateCloudName, String segmentId, Context context) { + deleteSegmentAsync(resourceGroupName, privateCloudName, segmentId, context).block(); } /** - * Create or update a DNS zone by id in a private cloud workload network. - * + * List WorkloadNetworkVirtualMachine resources by WorkloadNetwork. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param dnsZoneId NSX DNS Zone identifier. Generally the same as the DNS Zone's display name. - * @param workloadNetworkDnsZone NSX DNS Zone. * @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 nSX DNS Zone along with {@link Response} on successful completion of {@link Mono}. + * @return the response of a WorkloadNetworkVirtualMachine list operation along with {@link PagedResponse} on + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateDnsZoneWithResponseAsync( - String resourceGroupName, - String privateCloudName, - String dnsZoneId, - WorkloadNetworkDnsZoneInner workloadNetworkDnsZone) { + private Mono> + listVirtualMachinesSinglePageAsync(String resourceGroupName, String privateCloudName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -8948,65 +7112,37 @@ private Mono>> updateDnsZoneWithResponseAsync( return Mono .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); } - if (dnsZoneId == null) { - return Mono.error(new IllegalArgumentException("Parameter dnsZoneId is required and cannot be null.")); - } - if (workloadNetworkDnsZone == null) { - return Mono - .error( - new IllegalArgumentException("Parameter workloadNetworkDnsZone is required and cannot be null.")); - } else { - workloadNetworkDnsZone.validate(); - } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .updateDnsZone( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - this.client.getApiVersion(), - privateCloudName, - dnsZoneId, - workloadNetworkDnsZone, - accept, - context)) + .withContext(context -> service.listVirtualMachines(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, 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())); } /** - * Create or update a DNS zone by id in a private cloud workload network. - * + * List WorkloadNetworkVirtualMachine resources by WorkloadNetwork. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param dnsZoneId NSX DNS Zone identifier. Generally the same as the DNS Zone's display name. - * @param workloadNetworkDnsZone NSX DNS Zone. * @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 nSX DNS Zone along with {@link Response} on successful completion of {@link Mono}. + * @return the response of a WorkloadNetworkVirtualMachine list operation along with {@link PagedResponse} on + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateDnsZoneWithResponseAsync( - String resourceGroupName, - String privateCloudName, - String dnsZoneId, - WorkloadNetworkDnsZoneInner workloadNetworkDnsZone, - Context context) { + private Mono> + listVirtualMachinesSinglePageAsync(String resourceGroupName, String privateCloudName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -9016,324 +7152,291 @@ private Mono>> updateDnsZoneWithResponseAsync( return Mono .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); } - if (dnsZoneId == null) { - return Mono.error(new IllegalArgumentException("Parameter dnsZoneId is required and cannot be null.")); - } - if (workloadNetworkDnsZone == null) { - return Mono - .error( - new IllegalArgumentException("Parameter workloadNetworkDnsZone is required and cannot be null.")); - } else { - workloadNetworkDnsZone.validate(); - } final String accept = "application/json"; context = this.client.mergeContext(context); return service - .updateDnsZone( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - this.client.getApiVersion(), - privateCloudName, - dnsZoneId, - workloadNetworkDnsZone, - accept, - context); + .listVirtualMachines(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** - * Create or update a DNS zone by id in a private cloud workload network. - * + * List WorkloadNetworkVirtualMachine resources by WorkloadNetwork. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param dnsZoneId NSX DNS Zone identifier. Generally the same as the DNS Zone's display name. - * @param workloadNetworkDnsZone NSX DNS Zone. * @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 nSX DNS Zone. + * @return the response of a WorkloadNetworkVirtualMachine list operation as paginated response with + * {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, WorkloadNetworkDnsZoneInner> beginUpdateDnsZoneAsync( - String resourceGroupName, - String privateCloudName, - String dnsZoneId, - WorkloadNetworkDnsZoneInner workloadNetworkDnsZone) { - Mono>> mono = - updateDnsZoneWithResponseAsync(resourceGroupName, privateCloudName, dnsZoneId, workloadNetworkDnsZone); - return this - .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - WorkloadNetworkDnsZoneInner.class, - WorkloadNetworkDnsZoneInner.class, - this.client.getContext()); + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listVirtualMachinesAsync(String resourceGroupName, + String privateCloudName) { + return new PagedFlux<>(() -> listVirtualMachinesSinglePageAsync(resourceGroupName, privateCloudName), + nextLink -> listVirtualMachinesNextSinglePageAsync(nextLink)); } /** - * Create or update a DNS zone by id in a private cloud workload network. - * + * List WorkloadNetworkVirtualMachine resources by WorkloadNetwork. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param dnsZoneId NSX DNS Zone identifier. Generally the same as the DNS Zone's display name. - * @param workloadNetworkDnsZone NSX DNS Zone. * @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 nSX DNS Zone. + * @return the response of a WorkloadNetworkVirtualMachine list operation as paginated response with + * {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, WorkloadNetworkDnsZoneInner> beginUpdateDnsZoneAsync( - String resourceGroupName, - String privateCloudName, - String dnsZoneId, - WorkloadNetworkDnsZoneInner workloadNetworkDnsZone, - Context context) { - context = this.client.mergeContext(context); - Mono>> mono = - updateDnsZoneWithResponseAsync( - resourceGroupName, privateCloudName, dnsZoneId, workloadNetworkDnsZone, context); - return this - .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - WorkloadNetworkDnsZoneInner.class, - WorkloadNetworkDnsZoneInner.class, - context); + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listVirtualMachinesAsync(String resourceGroupName, + String privateCloudName, Context context) { + return new PagedFlux<>(() -> listVirtualMachinesSinglePageAsync(resourceGroupName, privateCloudName, context), + nextLink -> listVirtualMachinesNextSinglePageAsync(nextLink, context)); } /** - * Create or update a DNS zone by id in a private cloud workload network. - * + * List WorkloadNetworkVirtualMachine resources by WorkloadNetwork. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param dnsZoneId NSX DNS Zone identifier. Generally the same as the DNS Zone's display name. - * @param workloadNetworkDnsZone NSX DNS Zone. * @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 nSX DNS Zone. + * @return the response of a WorkloadNetworkVirtualMachine list operation as paginated response with + * {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, WorkloadNetworkDnsZoneInner> beginUpdateDnsZone( - String resourceGroupName, - String privateCloudName, - String dnsZoneId, - WorkloadNetworkDnsZoneInner workloadNetworkDnsZone) { - return this - .beginUpdateDnsZoneAsync(resourceGroupName, privateCloudName, dnsZoneId, workloadNetworkDnsZone) - .getSyncPoller(); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listVirtualMachines(String resourceGroupName, + String privateCloudName) { + return new PagedIterable<>(listVirtualMachinesAsync(resourceGroupName, privateCloudName)); } /** - * Create or update a DNS zone by id in a private cloud workload network. - * + * List WorkloadNetworkVirtualMachine resources by WorkloadNetwork. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param dnsZoneId NSX DNS Zone identifier. Generally the same as the DNS Zone's display name. - * @param workloadNetworkDnsZone NSX DNS Zone. * @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 nSX DNS Zone. + * @return the response of a WorkloadNetworkVirtualMachine list operation as paginated response with + * {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, WorkloadNetworkDnsZoneInner> beginUpdateDnsZone( - String resourceGroupName, - String privateCloudName, - String dnsZoneId, - WorkloadNetworkDnsZoneInner workloadNetworkDnsZone, - Context context) { - return this - .beginUpdateDnsZoneAsync(resourceGroupName, privateCloudName, dnsZoneId, workloadNetworkDnsZone, context) - .getSyncPoller(); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listVirtualMachines(String resourceGroupName, + String privateCloudName, Context context) { + return new PagedIterable<>(listVirtualMachinesAsync(resourceGroupName, privateCloudName, context)); } /** - * Create or update a DNS zone by id in a private cloud workload network. - * + * Get a WorkloadNetworkVirtualMachine. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param dnsZoneId NSX DNS Zone identifier. Generally the same as the DNS Zone's display name. - * @param workloadNetworkDnsZone NSX DNS Zone. + * @param virtualMachineId ID of the virtual machine. * @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 nSX DNS Zone on successful completion of {@link Mono}. + * @return a WorkloadNetworkVirtualMachine along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateDnsZoneAsync( - String resourceGroupName, - String privateCloudName, - String dnsZoneId, - WorkloadNetworkDnsZoneInner workloadNetworkDnsZone) { - return beginUpdateDnsZoneAsync(resourceGroupName, privateCloudName, dnsZoneId, workloadNetworkDnsZone) - .last() - .flatMap(this.client::getLroFinalResultOrError); + private Mono> + getVirtualMachineWithResponseAsync(String resourceGroupName, String privateCloudName, String virtualMachineId) { + 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 (privateCloudName == null) { + return Mono + .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } + if (virtualMachineId == null) { + return Mono + .error(new IllegalArgumentException("Parameter virtualMachineId is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.getVirtualMachine(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, virtualMachineId, accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Create or update a DNS zone by id in a private cloud workload network. - * + * Get a WorkloadNetworkVirtualMachine. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param dnsZoneId NSX DNS Zone identifier. Generally the same as the DNS Zone's display name. - * @param workloadNetworkDnsZone NSX DNS Zone. + * @param virtualMachineId ID of the virtual machine. * @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 nSX DNS Zone on successful completion of {@link Mono}. + * @return a WorkloadNetworkVirtualMachine along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateDnsZoneAsync( - String resourceGroupName, - String privateCloudName, - String dnsZoneId, - WorkloadNetworkDnsZoneInner workloadNetworkDnsZone, - Context context) { - return beginUpdateDnsZoneAsync(resourceGroupName, privateCloudName, dnsZoneId, workloadNetworkDnsZone, context) - .last() - .flatMap(this.client::getLroFinalResultOrError); + private Mono> getVirtualMachineWithResponseAsync( + String resourceGroupName, String privateCloudName, String virtualMachineId, 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 (privateCloudName == null) { + return Mono + .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } + if (virtualMachineId == null) { + return Mono + .error(new IllegalArgumentException("Parameter virtualMachineId is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.getVirtualMachine(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, virtualMachineId, accept, context); } /** - * Create or update a DNS zone by id in a private cloud workload network. - * + * Get a WorkloadNetworkVirtualMachine. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param dnsZoneId NSX DNS Zone identifier. Generally the same as the DNS Zone's display name. - * @param workloadNetworkDnsZone NSX DNS Zone. + * @param virtualMachineId ID of the virtual machine. * @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 nSX DNS Zone. + * @return a WorkloadNetworkVirtualMachine on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public WorkloadNetworkDnsZoneInner updateDnsZone( - String resourceGroupName, - String privateCloudName, - String dnsZoneId, - WorkloadNetworkDnsZoneInner workloadNetworkDnsZone) { - return updateDnsZoneAsync(resourceGroupName, privateCloudName, dnsZoneId, workloadNetworkDnsZone).block(); + private Mono getVirtualMachineAsync(String resourceGroupName, + String privateCloudName, String virtualMachineId) { + return getVirtualMachineWithResponseAsync(resourceGroupName, privateCloudName, virtualMachineId) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** - * Create or update a DNS zone by id in a private cloud workload network. - * + * Get a WorkloadNetworkVirtualMachine. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param dnsZoneId NSX DNS Zone identifier. Generally the same as the DNS Zone's display name. - * @param workloadNetworkDnsZone NSX DNS Zone. + * @param virtualMachineId ID of the virtual machine. * @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 nSX DNS Zone. + * @return a WorkloadNetworkVirtualMachine along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public WorkloadNetworkDnsZoneInner updateDnsZone( - String resourceGroupName, - String privateCloudName, - String dnsZoneId, - WorkloadNetworkDnsZoneInner workloadNetworkDnsZone, - Context context) { - return updateDnsZoneAsync(resourceGroupName, privateCloudName, dnsZoneId, workloadNetworkDnsZone, context) + public Response getVirtualMachineWithResponse(String resourceGroupName, + String privateCloudName, String virtualMachineId, Context context) { + return getVirtualMachineWithResponseAsync(resourceGroupName, privateCloudName, virtualMachineId, context) .block(); } /** - * Delete a DNS zone by id in a private cloud workload network. - * + * Get a WorkloadNetworkVirtualMachine. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dnsZoneId NSX DNS Zone identifier. Generally the same as the DNS Zone's display name. * @param privateCloudName Name of the private cloud. + * @param virtualMachineId ID of the virtual machine. * @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}. + * @return a WorkloadNetworkVirtualMachine. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public WorkloadNetworkVirtualMachineInner getVirtualMachine(String resourceGroupName, String privateCloudName, + String virtualMachineId) { + return getVirtualMachineWithResponse(resourceGroupName, privateCloudName, virtualMachineId, Context.NONE) + .getValue(); + } + + /** + * List WorkloadNetworkVMGroup resources by WorkloadNetwork. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @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 of a WorkloadNetworkVMGroup list operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteDnsZoneWithResponseAsync( - String resourceGroupName, String dnsZoneId, String privateCloudName) { + private Mono> listVMGroupsSinglePageAsync(String resourceGroupName, + String privateCloudName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + 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 (dnsZoneId == null) { - return Mono.error(new IllegalArgumentException("Parameter dnsZoneId is required and cannot be null.")); - } if (privateCloudName == null) { return Mono .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .deleteDnsZone( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - this.client.getApiVersion(), - dnsZoneId, - privateCloudName, - accept, - context)) + .withContext(context -> service.listVMGroups(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, 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())); } /** - * Delete a DNS zone by id in a private cloud workload network. - * + * List WorkloadNetworkVMGroup resources by WorkloadNetwork. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dnsZoneId NSX DNS Zone identifier. Generally the same as the DNS Zone's display name. * @param privateCloudName Name of the private cloud. * @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}. + * @return the response of a WorkloadNetworkVMGroup list operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteDnsZoneWithResponseAsync( - String resourceGroupName, String dnsZoneId, String privateCloudName, Context context) { + private Mono> listVMGroupsSinglePageAsync(String resourceGroupName, + String privateCloudName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + 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 (dnsZoneId == null) { - return Mono.error(new IllegalArgumentException("Parameter dnsZoneId is required and cannot be null.")); - } if (privateCloudName == null) { return Mono .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); @@ -9341,190 +7444,233 @@ private Mono>> deleteDnsZoneWithResponseAsync( final String accept = "application/json"; context = this.client.mergeContext(context); return service - .deleteDnsZone( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - this.client.getApiVersion(), - dnsZoneId, - privateCloudName, - accept, - context); + .listVMGroups(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, privateCloudName, accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** - * Delete a DNS zone by id in a private cloud workload network. - * + * List WorkloadNetworkVMGroup resources by WorkloadNetwork. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dnsZoneId NSX DNS Zone identifier. Generally the same as the DNS Zone's display name. * @param privateCloudName Name of the private cloud. * @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 long-running operation. + * @return the response of a WorkloadNetworkVMGroup list operation as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteDnsZoneAsync( - String resourceGroupName, String dnsZoneId, String privateCloudName) { - Mono>> mono = - deleteDnsZoneWithResponseAsync(resourceGroupName, dnsZoneId, privateCloudName); - return this - .client - .getLroResult( - mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listVMGroupsAsync(String resourceGroupName, + String privateCloudName) { + return new PagedFlux<>(() -> listVMGroupsSinglePageAsync(resourceGroupName, privateCloudName), + nextLink -> listVMGroupsNextSinglePageAsync(nextLink)); } /** - * Delete a DNS zone by id in a private cloud workload network. - * + * List WorkloadNetworkVMGroup resources by WorkloadNetwork. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dnsZoneId NSX DNS Zone identifier. Generally the same as the DNS Zone's display name. * @param privateCloudName Name of the private cloud. * @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 long-running operation. + * @return the response of a WorkloadNetworkVMGroup list operation as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteDnsZoneAsync( - String resourceGroupName, String dnsZoneId, String privateCloudName, Context context) { - context = this.client.mergeContext(context); - Mono>> mono = - deleteDnsZoneWithResponseAsync(resourceGroupName, dnsZoneId, privateCloudName, context); - return this - .client - .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listVMGroupsAsync(String resourceGroupName, String privateCloudName, + Context context) { + return new PagedFlux<>(() -> listVMGroupsSinglePageAsync(resourceGroupName, privateCloudName, context), + nextLink -> listVMGroupsNextSinglePageAsync(nextLink, context)); } /** - * Delete a DNS zone by id in a private cloud workload network. - * + * List WorkloadNetworkVMGroup resources by WorkloadNetwork. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dnsZoneId NSX DNS Zone identifier. Generally the same as the DNS Zone's display name. * @param privateCloudName Name of the private cloud. * @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 long-running operation. + * @return the response of a WorkloadNetworkVMGroup list operation as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDeleteDnsZone( - String resourceGroupName, String dnsZoneId, String privateCloudName) { - return this.beginDeleteDnsZoneAsync(resourceGroupName, dnsZoneId, privateCloudName).getSyncPoller(); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listVMGroups(String resourceGroupName, String privateCloudName) { + return new PagedIterable<>(listVMGroupsAsync(resourceGroupName, privateCloudName)); } /** - * Delete a DNS zone by id in a private cloud workload network. - * + * List WorkloadNetworkVMGroup resources by WorkloadNetwork. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dnsZoneId NSX DNS Zone identifier. Generally the same as the DNS Zone's display name. * @param privateCloudName Name of the private cloud. * @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 long-running operation. + * @return the response of a WorkloadNetworkVMGroup list operation as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDeleteDnsZone( - String resourceGroupName, String dnsZoneId, String privateCloudName, Context context) { - return this.beginDeleteDnsZoneAsync(resourceGroupName, dnsZoneId, privateCloudName, context).getSyncPoller(); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listVMGroups(String resourceGroupName, String privateCloudName, + Context context) { + return new PagedIterable<>(listVMGroupsAsync(resourceGroupName, privateCloudName, context)); } /** - * Delete a DNS zone by id in a private cloud workload network. - * + * Get a WorkloadNetworkVMGroup. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dnsZoneId NSX DNS Zone identifier. Generally the same as the DNS Zone's display name. * @param privateCloudName Name of the private cloud. + * @param vmGroupId ID of the VM group. * @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. + * @return a WorkloadNetworkVMGroup along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteDnsZoneAsync(String resourceGroupName, String dnsZoneId, String privateCloudName) { - return beginDeleteDnsZoneAsync(resourceGroupName, dnsZoneId, privateCloudName) - .last() - .flatMap(this.client::getLroFinalResultOrError); + private Mono> getVMGroupWithResponseAsync(String resourceGroupName, + String privateCloudName, String vmGroupId) { + 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 (privateCloudName == null) { + return Mono + .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } + if (vmGroupId == null) { + return Mono.error(new IllegalArgumentException("Parameter vmGroupId is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.getVMGroup(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, vmGroupId, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Delete a DNS zone by id in a private cloud workload network. - * + * Get a WorkloadNetworkVMGroup. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dnsZoneId NSX DNS Zone identifier. Generally the same as the DNS Zone's display name. * @param privateCloudName Name of the private cloud. + * @param vmGroupId ID of the VM group. * @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 A {@link Mono} that completes when a successful response is received. + * @return a WorkloadNetworkVMGroup along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteDnsZoneAsync( - String resourceGroupName, String dnsZoneId, String privateCloudName, Context context) { - return beginDeleteDnsZoneAsync(resourceGroupName, dnsZoneId, privateCloudName, context) - .last() - .flatMap(this.client::getLroFinalResultOrError); + private Mono> getVMGroupWithResponseAsync(String resourceGroupName, + String privateCloudName, String vmGroupId, 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 (privateCloudName == null) { + return Mono + .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); + } + if (vmGroupId == null) { + return Mono.error(new IllegalArgumentException("Parameter vmGroupId is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.getVMGroup(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, vmGroupId, accept, context); } /** - * Delete a DNS zone by id in a private cloud workload network. - * + * Get a WorkloadNetworkVMGroup. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dnsZoneId NSX DNS Zone identifier. Generally the same as the DNS Zone's display name. * @param privateCloudName Name of the private cloud. + * @param vmGroupId ID of the VM group. * @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 WorkloadNetworkVMGroup on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void deleteDnsZone(String resourceGroupName, String dnsZoneId, String privateCloudName) { - deleteDnsZoneAsync(resourceGroupName, dnsZoneId, privateCloudName).block(); + private Mono getVMGroupAsync(String resourceGroupName, String privateCloudName, + String vmGroupId) { + return getVMGroupWithResponseAsync(resourceGroupName, privateCloudName, vmGroupId) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** - * Delete a DNS zone by id in a private cloud workload network. - * + * Get a WorkloadNetworkVMGroup. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dnsZoneId NSX DNS Zone identifier. Generally the same as the DNS Zone's display name. * @param privateCloudName Name of the private cloud. + * @param vmGroupId ID of the VM group. * @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 a WorkloadNetworkVMGroup along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void deleteDnsZone(String resourceGroupName, String dnsZoneId, String privateCloudName, Context context) { - deleteDnsZoneAsync(resourceGroupName, dnsZoneId, privateCloudName, context).block(); + public Response getVMGroupWithResponse(String resourceGroupName, + String privateCloudName, String vmGroupId, Context context) { + return getVMGroupWithResponseAsync(resourceGroupName, privateCloudName, vmGroupId, context).block(); } /** - * List of Public IP Blocks in a private cloud workload network. - * + * Get a WorkloadNetworkVMGroup. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param vmGroupId ID of the VM group. * @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 list of NSX Public IP Blocks along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return a WorkloadNetworkVMGroup. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listPublicIPsSinglePageAsync( - String resourceGroupName, String privateCloudName) { + public WorkloadNetworkVMGroupInner getVMGroup(String resourceGroupName, String privateCloudName, String vmGroupId) { + return getVMGroupWithResponse(resourceGroupName, privateCloudName, vmGroupId, Context.NONE).getValue(); + } + + /** + * Create a WorkloadNetworkVMGroup. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param vmGroupId ID of the VM group. + * @param workloadNetworkVMGroup Resource create parameters. + * @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 nSX VM Group along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createVMGroupWithResponseAsync(String resourceGroupName, + String privateCloudName, String vmGroupId, WorkloadNetworkVMGroupInner workloadNetworkVMGroup) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -9534,56 +7680,47 @@ private Mono> listPublicIPsSinglePag return Mono .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); } + if (vmGroupId == null) { + return Mono.error(new IllegalArgumentException("Parameter vmGroupId is required and cannot be null.")); + } + if (workloadNetworkVMGroup == null) { + return Mono.error( + new IllegalArgumentException("Parameter workloadNetworkVMGroup is required and cannot be null.")); + } else { + workloadNetworkVMGroup.validate(); + } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .listPublicIPs( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - this.client.getApiVersion(), - privateCloudName, - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .withContext(context -> service.createVMGroup(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, vmGroupId, workloadNetworkVMGroup, + accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * List of Public IP Blocks in a private cloud workload network. - * + * Create a WorkloadNetworkVMGroup. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param vmGroupId ID of the VM group. + * @param workloadNetworkVMGroup Resource create parameters. * @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 a list of NSX Public IP Blocks along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return nSX VM Group along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listPublicIPsSinglePageAsync( - String resourceGroupName, String privateCloudName, Context context) { + private Mono>> createVMGroupWithResponseAsync(String resourceGroupName, + String privateCloudName, String vmGroupId, WorkloadNetworkVMGroupInner workloadNetworkVMGroup, + Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -9593,288 +7730,211 @@ private Mono> listPublicIPsSinglePag return Mono .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); } + if (vmGroupId == null) { + return Mono.error(new IllegalArgumentException("Parameter vmGroupId is required and cannot be null.")); + } + if (workloadNetworkVMGroup == null) { + return Mono.error( + new IllegalArgumentException("Parameter workloadNetworkVMGroup is required and cannot be null.")); + } else { + workloadNetworkVMGroup.validate(); + } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .listPublicIPs( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - this.client.getApiVersion(), - privateCloudName, - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.createVMGroup(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, vmGroupId, workloadNetworkVMGroup, + accept, context); } /** - * List of Public IP Blocks in a private cloud workload network. - * + * Create a WorkloadNetworkVMGroup. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param vmGroupId ID of the VM group. + * @param workloadNetworkVMGroup Resource create parameters. * @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 list of NSX Public IP Blocks as paginated response with {@link PagedFlux}. + * @return the {@link PollerFlux} for polling of nSX VM Group. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listPublicIPsAsync( - String resourceGroupName, String privateCloudName) { - return new PagedFlux<>( - () -> listPublicIPsSinglePageAsync(resourceGroupName, privateCloudName), - nextLink -> listPublicIPsNextSinglePageAsync(nextLink)); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, WorkloadNetworkVMGroupInner> beginCreateVMGroupAsync( + String resourceGroupName, String privateCloudName, String vmGroupId, + WorkloadNetworkVMGroupInner workloadNetworkVMGroup) { + Mono>> mono + = createVMGroupWithResponseAsync(resourceGroupName, privateCloudName, vmGroupId, workloadNetworkVMGroup); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), WorkloadNetworkVMGroupInner.class, WorkloadNetworkVMGroupInner.class, + this.client.getContext()); } /** - * List of Public IP Blocks in a private cloud workload network. - * + * Create a WorkloadNetworkVMGroup. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param vmGroupId ID of the VM group. + * @param workloadNetworkVMGroup Resource create parameters. * @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 a list of NSX Public IP Blocks as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listPublicIPsAsync( - String resourceGroupName, String privateCloudName, Context context) { - return new PagedFlux<>( - () -> listPublicIPsSinglePageAsync(resourceGroupName, privateCloudName, context), - nextLink -> listPublicIPsNextSinglePageAsync(nextLink, context)); - } - - /** - * List of Public IP Blocks in a private cloud workload network. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName Name of the private cloud. - * @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 list of NSX Public IP Blocks as paginated response with {@link PagedIterable}. + * @return the {@link PollerFlux} for polling of nSX VM Group. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listPublicIPs( - String resourceGroupName, String privateCloudName) { - return new PagedIterable<>(listPublicIPsAsync(resourceGroupName, privateCloudName)); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, WorkloadNetworkVMGroupInner> beginCreateVMGroupAsync( + String resourceGroupName, String privateCloudName, String vmGroupId, + WorkloadNetworkVMGroupInner workloadNetworkVMGroup, Context context) { + context = this.client.mergeContext(context); + Mono>> mono = createVMGroupWithResponseAsync(resourceGroupName, privateCloudName, + vmGroupId, workloadNetworkVMGroup, context); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), WorkloadNetworkVMGroupInner.class, WorkloadNetworkVMGroupInner.class, + context); } /** - * List of Public IP Blocks in a private cloud workload network. - * + * Create a WorkloadNetworkVMGroup. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param context The context to associate with this operation. + * @param vmGroupId ID of the VM group. + * @param workloadNetworkVMGroup Resource create parameters. * @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 list of NSX Public IP Blocks as paginated response with {@link PagedIterable}. + * @return the {@link SyncPoller} for polling of nSX VM Group. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listPublicIPs( - String resourceGroupName, String privateCloudName, Context context) { - return new PagedIterable<>(listPublicIPsAsync(resourceGroupName, privateCloudName, context)); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, WorkloadNetworkVMGroupInner> beginCreateVMGroup( + String resourceGroupName, String privateCloudName, String vmGroupId, + WorkloadNetworkVMGroupInner workloadNetworkVMGroup) { + return this.beginCreateVMGroupAsync(resourceGroupName, privateCloudName, vmGroupId, workloadNetworkVMGroup) + .getSyncPoller(); } /** - * Get a Public IP Block by id in a private cloud workload network. - * + * Create a WorkloadNetworkVMGroup. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param publicIpId NSX Public IP Block identifier. Generally the same as the Public IP Block's display name. + * @param vmGroupId ID of the VM group. + * @param workloadNetworkVMGroup Resource create parameters. + * @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 a Public IP Block by id in a private cloud workload network along with {@link Response} on successful - * completion of {@link Mono}. + * @return the {@link SyncPoller} for polling of nSX VM Group. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getPublicIpWithResponseAsync( - String resourceGroupName, String privateCloudName, String publicIpId) { - 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 (privateCloudName == null) { - return Mono - .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); - } - if (publicIpId == null) { - return Mono.error(new IllegalArgumentException("Parameter publicIpId is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .getPublicIp( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - this.client.getApiVersion(), - privateCloudName, - publicIpId, - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, WorkloadNetworkVMGroupInner> beginCreateVMGroup( + String resourceGroupName, String privateCloudName, String vmGroupId, + WorkloadNetworkVMGroupInner workloadNetworkVMGroup, Context context) { + return this + .beginCreateVMGroupAsync(resourceGroupName, privateCloudName, vmGroupId, workloadNetworkVMGroup, context) + .getSyncPoller(); } /** - * Get a Public IP Block by id in a private cloud workload network. - * + * Create a WorkloadNetworkVMGroup. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param publicIpId NSX Public IP Block identifier. Generally the same as the Public IP Block's display name. - * @param context The context to associate with this operation. + * @param vmGroupId ID of the VM group. + * @param workloadNetworkVMGroup Resource create parameters. * @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 Public IP Block by id in a private cloud workload network along with {@link Response} on successful - * completion of {@link Mono}. + * @return nSX VM Group on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getPublicIpWithResponseAsync( - String resourceGroupName, String privateCloudName, String publicIpId, 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 (privateCloudName == null) { - return Mono - .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); - } - if (publicIpId == null) { - return Mono.error(new IllegalArgumentException("Parameter publicIpId is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .getPublicIp( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - this.client.getApiVersion(), - privateCloudName, - publicIpId, - accept, - context); + private Mono createVMGroupAsync(String resourceGroupName, String privateCloudName, + String vmGroupId, WorkloadNetworkVMGroupInner workloadNetworkVMGroup) { + return beginCreateVMGroupAsync(resourceGroupName, privateCloudName, vmGroupId, workloadNetworkVMGroup).last() + .flatMap(this.client::getLroFinalResultOrError); } /** - * Get a Public IP Block by id in a private cloud workload network. - * + * Create a WorkloadNetworkVMGroup. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param publicIpId NSX Public IP Block identifier. Generally the same as the Public IP Block's display name. + * @param vmGroupId ID of the VM group. + * @param workloadNetworkVMGroup Resource create parameters. + * @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 a Public IP Block by id in a private cloud workload network on successful completion of {@link Mono}. + * @return nSX VM Group on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getPublicIpAsync( - String resourceGroupName, String privateCloudName, String publicIpId) { - return getPublicIpWithResponseAsync(resourceGroupName, privateCloudName, publicIpId) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); + private Mono createVMGroupAsync(String resourceGroupName, String privateCloudName, + String vmGroupId, WorkloadNetworkVMGroupInner workloadNetworkVMGroup, Context context) { + return beginCreateVMGroupAsync(resourceGroupName, privateCloudName, vmGroupId, workloadNetworkVMGroup, context) + .last().flatMap(this.client::getLroFinalResultOrError); } /** - * Get a Public IP Block by id in a private cloud workload network. - * + * Create a WorkloadNetworkVMGroup. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param publicIpId NSX Public IP Block identifier. Generally the same as the Public IP Block's display name. - * @param context The context to associate with this operation. + * @param vmGroupId ID of the VM group. + * @param workloadNetworkVMGroup Resource create parameters. * @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 Public IP Block by id in a private cloud workload network along with {@link Response}. + * @return nSX VM Group. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getPublicIpWithResponse( - String resourceGroupName, String privateCloudName, String publicIpId, Context context) { - return getPublicIpWithResponseAsync(resourceGroupName, privateCloudName, publicIpId, context).block(); + public WorkloadNetworkVMGroupInner createVMGroup(String resourceGroupName, String privateCloudName, + String vmGroupId, WorkloadNetworkVMGroupInner workloadNetworkVMGroup) { + return createVMGroupAsync(resourceGroupName, privateCloudName, vmGroupId, workloadNetworkVMGroup).block(); } /** - * Get a Public IP Block by id in a private cloud workload network. - * + * Create a WorkloadNetworkVMGroup. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param publicIpId NSX Public IP Block identifier. Generally the same as the Public IP Block's display name. + * @param vmGroupId ID of the VM group. + * @param workloadNetworkVMGroup Resource create parameters. + * @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 a Public IP Block by id in a private cloud workload network. + * @return nSX VM Group. */ @ServiceMethod(returns = ReturnType.SINGLE) - public WorkloadNetworkPublicIpInner getPublicIp( - String resourceGroupName, String privateCloudName, String publicIpId) { - return getPublicIpWithResponse(resourceGroupName, privateCloudName, publicIpId, Context.NONE).getValue(); + public WorkloadNetworkVMGroupInner createVMGroup(String resourceGroupName, String privateCloudName, + String vmGroupId, WorkloadNetworkVMGroupInner workloadNetworkVMGroup, Context context) { + return createVMGroupAsync(resourceGroupName, privateCloudName, vmGroupId, workloadNetworkVMGroup, context) + .block(); } /** - * Create a Public IP Block by id in a private cloud workload network. - * + * Update a WorkloadNetworkVMGroup. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param publicIpId NSX Public IP Block identifier. Generally the same as the Public IP Block's display name. - * @param workloadNetworkPublicIp NSX Public IP Block. + * @param vmGroupId ID of the VM group. + * @param workloadNetworkVMGroup The resource properties to be updated. * @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 nSX Public IP Block along with {@link Response} on successful completion of {@link Mono}. + * @return nSX VM Group along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createPublicIpWithResponseAsync( - String resourceGroupName, - String privateCloudName, - String publicIpId, - WorkloadNetworkPublicIpInner workloadNetworkPublicIp) { + private Mono>> updateVMGroupWithResponseAsync(String resourceGroupName, + String privateCloudName, String vmGroupId, WorkloadNetworkVMGroupUpdate workloadNetworkVMGroup) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -9884,65 +7944,47 @@ private Mono>> createPublicIpWithResponseAsync( return Mono .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); } - if (publicIpId == null) { - return Mono.error(new IllegalArgumentException("Parameter publicIpId is required and cannot be null.")); + if (vmGroupId == null) { + return Mono.error(new IllegalArgumentException("Parameter vmGroupId is required and cannot be null.")); } - if (workloadNetworkPublicIp == null) { - return Mono - .error( - new IllegalArgumentException("Parameter workloadNetworkPublicIp is required and cannot be null.")); + if (workloadNetworkVMGroup == null) { + return Mono.error( + new IllegalArgumentException("Parameter workloadNetworkVMGroup is required and cannot be null.")); } else { - workloadNetworkPublicIp.validate(); + workloadNetworkVMGroup.validate(); } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .createPublicIp( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - this.client.getApiVersion(), - privateCloudName, - publicIpId, - workloadNetworkPublicIp, - accept, - context)) + .withContext(context -> service.updateVMGroup(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, vmGroupId, workloadNetworkVMGroup, + accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Create a Public IP Block by id in a private cloud workload network. - * + * Update a WorkloadNetworkVMGroup. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param publicIpId NSX Public IP Block identifier. Generally the same as the Public IP Block's display name. - * @param workloadNetworkPublicIp NSX Public IP Block. + * @param vmGroupId ID of the VM group. + * @param workloadNetworkVMGroup The resource properties to be updated. * @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 nSX Public IP Block along with {@link Response} on successful completion of {@link Mono}. + * @return nSX VM Group along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createPublicIpWithResponseAsync( - String resourceGroupName, - String privateCloudName, - String publicIpId, - WorkloadNetworkPublicIpInner workloadNetworkPublicIp, + private Mono>> updateVMGroupWithResponseAsync(String resourceGroupName, + String privateCloudName, String vmGroupId, WorkloadNetworkVMGroupUpdate workloadNetworkVMGroup, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -9952,242 +7994,194 @@ private Mono>> createPublicIpWithResponseAsync( return Mono .error(new IllegalArgumentException("Parameter privateCloudName is required and cannot be null.")); } - if (publicIpId == null) { - return Mono.error(new IllegalArgumentException("Parameter publicIpId is required and cannot be null.")); + if (vmGroupId == null) { + return Mono.error(new IllegalArgumentException("Parameter vmGroupId is required and cannot be null.")); } - if (workloadNetworkPublicIp == null) { - return Mono - .error( - new IllegalArgumentException("Parameter workloadNetworkPublicIp is required and cannot be null.")); + if (workloadNetworkVMGroup == null) { + return Mono.error( + new IllegalArgumentException("Parameter workloadNetworkVMGroup is required and cannot be null.")); } else { - workloadNetworkPublicIp.validate(); + workloadNetworkVMGroup.validate(); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .createPublicIp( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - this.client.getApiVersion(), - privateCloudName, - publicIpId, - workloadNetworkPublicIp, - accept, - context); + return service.updateVMGroup(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, privateCloudName, vmGroupId, workloadNetworkVMGroup, + accept, context); } /** - * Create a Public IP Block by id in a private cloud workload network. - * + * Update a WorkloadNetworkVMGroup. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param publicIpId NSX Public IP Block identifier. Generally the same as the Public IP Block's display name. - * @param workloadNetworkPublicIp NSX Public IP Block. + * @param vmGroupId ID of the VM group. + * @param workloadNetworkVMGroup The resource properties to be updated. * @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 nSX Public IP Block. + * @return the {@link PollerFlux} for polling of nSX VM Group. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, WorkloadNetworkPublicIpInner> beginCreatePublicIpAsync( - String resourceGroupName, - String privateCloudName, - String publicIpId, - WorkloadNetworkPublicIpInner workloadNetworkPublicIp) { - Mono>> mono = - createPublicIpWithResponseAsync(resourceGroupName, privateCloudName, publicIpId, workloadNetworkPublicIp); - return this - .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - WorkloadNetworkPublicIpInner.class, - WorkloadNetworkPublicIpInner.class, - this.client.getContext()); + private PollerFlux, WorkloadNetworkVMGroupInner> beginUpdateVMGroupAsync( + String resourceGroupName, String privateCloudName, String vmGroupId, + WorkloadNetworkVMGroupUpdate workloadNetworkVMGroup) { + Mono>> mono + = updateVMGroupWithResponseAsync(resourceGroupName, privateCloudName, vmGroupId, workloadNetworkVMGroup); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), WorkloadNetworkVMGroupInner.class, WorkloadNetworkVMGroupInner.class, + this.client.getContext()); } /** - * Create a Public IP Block by id in a private cloud workload network. - * + * Update a WorkloadNetworkVMGroup. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param publicIpId NSX Public IP Block identifier. Generally the same as the Public IP Block's display name. - * @param workloadNetworkPublicIp NSX Public IP Block. + * @param vmGroupId ID of the VM group. + * @param workloadNetworkVMGroup The resource properties to be updated. * @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 nSX Public IP Block. + * @return the {@link PollerFlux} for polling of nSX VM Group. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, WorkloadNetworkPublicIpInner> beginCreatePublicIpAsync( - String resourceGroupName, - String privateCloudName, - String publicIpId, - WorkloadNetworkPublicIpInner workloadNetworkPublicIp, - Context context) { + private PollerFlux, WorkloadNetworkVMGroupInner> beginUpdateVMGroupAsync( + String resourceGroupName, String privateCloudName, String vmGroupId, + WorkloadNetworkVMGroupUpdate workloadNetworkVMGroup, Context context) { context = this.client.mergeContext(context); - Mono>> mono = - createPublicIpWithResponseAsync( - resourceGroupName, privateCloudName, publicIpId, workloadNetworkPublicIp, context); - return this - .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - WorkloadNetworkPublicIpInner.class, - WorkloadNetworkPublicIpInner.class, - context); + Mono>> mono = updateVMGroupWithResponseAsync(resourceGroupName, privateCloudName, + vmGroupId, workloadNetworkVMGroup, context); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), WorkloadNetworkVMGroupInner.class, WorkloadNetworkVMGroupInner.class, + context); } /** - * Create a Public IP Block by id in a private cloud workload network. - * + * Update a WorkloadNetworkVMGroup. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param publicIpId NSX Public IP Block identifier. Generally the same as the Public IP Block's display name. - * @param workloadNetworkPublicIp NSX Public IP Block. + * @param vmGroupId ID of the VM group. + * @param workloadNetworkVMGroup The resource properties to be updated. * @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 nSX Public IP Block. + * @return the {@link SyncPoller} for polling of nSX VM Group. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, WorkloadNetworkPublicIpInner> beginCreatePublicIp( - String resourceGroupName, - String privateCloudName, - String publicIpId, - WorkloadNetworkPublicIpInner workloadNetworkPublicIp) { - return this - .beginCreatePublicIpAsync(resourceGroupName, privateCloudName, publicIpId, workloadNetworkPublicIp) + public SyncPoller, WorkloadNetworkVMGroupInner> beginUpdateVMGroup( + String resourceGroupName, String privateCloudName, String vmGroupId, + WorkloadNetworkVMGroupUpdate workloadNetworkVMGroup) { + return this.beginUpdateVMGroupAsync(resourceGroupName, privateCloudName, vmGroupId, workloadNetworkVMGroup) .getSyncPoller(); } /** - * Create a Public IP Block by id in a private cloud workload network. - * + * Update a WorkloadNetworkVMGroup. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param publicIpId NSX Public IP Block identifier. Generally the same as the Public IP Block's display name. - * @param workloadNetworkPublicIp NSX Public IP Block. + * @param vmGroupId ID of the VM group. + * @param workloadNetworkVMGroup The resource properties to be updated. * @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 nSX Public IP Block. + * @return the {@link SyncPoller} for polling of nSX VM Group. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, WorkloadNetworkPublicIpInner> beginCreatePublicIp( - String resourceGroupName, - String privateCloudName, - String publicIpId, - WorkloadNetworkPublicIpInner workloadNetworkPublicIp, - Context context) { + public SyncPoller, WorkloadNetworkVMGroupInner> beginUpdateVMGroup( + String resourceGroupName, String privateCloudName, String vmGroupId, + WorkloadNetworkVMGroupUpdate workloadNetworkVMGroup, Context context) { return this - .beginCreatePublicIpAsync(resourceGroupName, privateCloudName, publicIpId, workloadNetworkPublicIp, context) + .beginUpdateVMGroupAsync(resourceGroupName, privateCloudName, vmGroupId, workloadNetworkVMGroup, context) .getSyncPoller(); } /** - * Create a Public IP Block by id in a private cloud workload network. - * + * Update a WorkloadNetworkVMGroup. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param publicIpId NSX Public IP Block identifier. Generally the same as the Public IP Block's display name. - * @param workloadNetworkPublicIp NSX Public IP Block. + * @param vmGroupId ID of the VM group. + * @param workloadNetworkVMGroup The resource properties to be updated. * @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 nSX Public IP Block on successful completion of {@link Mono}. + * @return nSX VM Group on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createPublicIpAsync( - String resourceGroupName, - String privateCloudName, - String publicIpId, - WorkloadNetworkPublicIpInner workloadNetworkPublicIp) { - return beginCreatePublicIpAsync(resourceGroupName, privateCloudName, publicIpId, workloadNetworkPublicIp) - .last() + private Mono updateVMGroupAsync(String resourceGroupName, String privateCloudName, + String vmGroupId, WorkloadNetworkVMGroupUpdate workloadNetworkVMGroup) { + return beginUpdateVMGroupAsync(resourceGroupName, privateCloudName, vmGroupId, workloadNetworkVMGroup).last() .flatMap(this.client::getLroFinalResultOrError); } /** - * Create a Public IP Block by id in a private cloud workload network. - * + * Update a WorkloadNetworkVMGroup. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param publicIpId NSX Public IP Block identifier. Generally the same as the Public IP Block's display name. - * @param workloadNetworkPublicIp NSX Public IP Block. + * @param vmGroupId ID of the VM group. + * @param workloadNetworkVMGroup The resource properties to be updated. * @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 nSX Public IP Block on successful completion of {@link Mono}. + * @return nSX VM Group on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createPublicIpAsync( - String resourceGroupName, - String privateCloudName, - String publicIpId, - WorkloadNetworkPublicIpInner workloadNetworkPublicIp, - Context context) { - return beginCreatePublicIpAsync( - resourceGroupName, privateCloudName, publicIpId, workloadNetworkPublicIp, context) - .last() - .flatMap(this.client::getLroFinalResultOrError); + private Mono updateVMGroupAsync(String resourceGroupName, String privateCloudName, + String vmGroupId, WorkloadNetworkVMGroupUpdate workloadNetworkVMGroup, Context context) { + return beginUpdateVMGroupAsync(resourceGroupName, privateCloudName, vmGroupId, workloadNetworkVMGroup, context) + .last().flatMap(this.client::getLroFinalResultOrError); } /** - * Create a Public IP Block by id in a private cloud workload network. - * + * Update a WorkloadNetworkVMGroup. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param publicIpId NSX Public IP Block identifier. Generally the same as the Public IP Block's display name. - * @param workloadNetworkPublicIp NSX Public IP Block. + * @param vmGroupId ID of the VM group. + * @param workloadNetworkVMGroup The resource properties to be updated. * @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 nSX Public IP Block. + * @return nSX VM Group. */ @ServiceMethod(returns = ReturnType.SINGLE) - public WorkloadNetworkPublicIpInner createPublicIp( - String resourceGroupName, - String privateCloudName, - String publicIpId, - WorkloadNetworkPublicIpInner workloadNetworkPublicIp) { - return createPublicIpAsync(resourceGroupName, privateCloudName, publicIpId, workloadNetworkPublicIp).block(); + public WorkloadNetworkVMGroupInner updateVMGroup(String resourceGroupName, String privateCloudName, + String vmGroupId, WorkloadNetworkVMGroupUpdate workloadNetworkVMGroup) { + return updateVMGroupAsync(resourceGroupName, privateCloudName, vmGroupId, workloadNetworkVMGroup).block(); } /** - * Create a Public IP Block by id in a private cloud workload network. - * + * Update a WorkloadNetworkVMGroup. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param publicIpId NSX Public IP Block identifier. Generally the same as the Public IP Block's display name. - * @param workloadNetworkPublicIp NSX Public IP Block. + * @param vmGroupId ID of the VM group. + * @param workloadNetworkVMGroup The resource properties to be updated. * @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 nSX Public IP Block. + * @return nSX VM Group. */ @ServiceMethod(returns = ReturnType.SINGLE) - public WorkloadNetworkPublicIpInner createPublicIp( - String resourceGroupName, - String privateCloudName, - String publicIpId, - WorkloadNetworkPublicIpInner workloadNetworkPublicIp, - Context context) { - return createPublicIpAsync(resourceGroupName, privateCloudName, publicIpId, workloadNetworkPublicIp, context) + public WorkloadNetworkVMGroupInner updateVMGroup(String resourceGroupName, String privateCloudName, + String vmGroupId, WorkloadNetworkVMGroupUpdate workloadNetworkVMGroup, Context context) { + return updateVMGroupAsync(resourceGroupName, privateCloudName, vmGroupId, workloadNetworkVMGroup, context) .block(); } /** - * Delete a Public IP Block by id in a private cloud workload network. - * + * Delete a WorkloadNetworkVMGroup. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param publicIpId NSX Public IP Block identifier. Generally the same as the Public IP Block's display name. + * @param vmGroupId ID of the VM group. * @param privateCloudName Name of the private cloud. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -10195,26 +8189,22 @@ public WorkloadNetworkPublicIpInner createPublicIp( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deletePublicIpWithResponseAsync( - String resourceGroupName, String publicIpId, String privateCloudName) { + private Mono>> deleteVMGroupWithResponseAsync(String resourceGroupName, String vmGroupId, + String privateCloudName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + 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 (publicIpId == null) { - return Mono.error(new IllegalArgumentException("Parameter publicIpId is required and cannot be null.")); + if (vmGroupId == null) { + return Mono.error(new IllegalArgumentException("Parameter vmGroupId is required and cannot be null.")); } if (privateCloudName == null) { return Mono @@ -10222,26 +8212,16 @@ private Mono>> deletePublicIpWithResponseAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .deletePublicIp( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - this.client.getApiVersion(), - publicIpId, - privateCloudName, - accept, - context)) + .withContext(context -> service.deleteVMGroup(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, vmGroupId, privateCloudName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Delete a Public IP Block by id in a private cloud workload network. - * + * Delete a WorkloadNetworkVMGroup. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param publicIpId NSX Public IP Block identifier. Generally the same as the Public IP Block's display name. + * @param vmGroupId ID of the VM group. * @param privateCloudName Name of the private cloud. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -10250,26 +8230,22 @@ private Mono>> deletePublicIpWithResponseAsync( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deletePublicIpWithResponseAsync( - String resourceGroupName, String publicIpId, String privateCloudName, Context context) { + private Mono>> deleteVMGroupWithResponseAsync(String resourceGroupName, String vmGroupId, + String privateCloudName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + 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 (publicIpId == null) { - return Mono.error(new IllegalArgumentException("Parameter publicIpId is required and cannot be null.")); + if (vmGroupId == null) { + return Mono.error(new IllegalArgumentException("Parameter vmGroupId is required and cannot be null.")); } if (privateCloudName == null) { return Mono @@ -10277,23 +8253,15 @@ private Mono>> deletePublicIpWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .deletePublicIp( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - this.client.getApiVersion(), - publicIpId, - privateCloudName, - accept, - context); + return service.deleteVMGroup(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, vmGroupId, privateCloudName, accept, context); } /** - * Delete a Public IP Block by id in a private cloud workload network. - * + * Delete a WorkloadNetworkVMGroup. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param publicIpId NSX Public IP Block identifier. Generally the same as the Public IP Block's display name. + * @param vmGroupId ID of the VM group. * @param privateCloudName Name of the private cloud. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -10301,21 +8269,19 @@ private Mono>> deletePublicIpWithResponseAsync( * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeletePublicIpAsync( - String resourceGroupName, String publicIpId, String privateCloudName) { - Mono>> mono = - deletePublicIpWithResponseAsync(resourceGroupName, publicIpId, privateCloudName); - return this - .client - .getLroResult( - mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); + private PollerFlux, Void> beginDeleteVMGroupAsync(String resourceGroupName, String vmGroupId, + String privateCloudName) { + Mono>> mono + = deleteVMGroupWithResponseAsync(resourceGroupName, vmGroupId, privateCloudName); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); } /** - * Delete a Public IP Block by id in a private cloud workload network. - * + * Delete a WorkloadNetworkVMGroup. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param publicIpId NSX Public IP Block identifier. Generally the same as the Public IP Block's display name. + * @param vmGroupId ID of the VM group. * @param privateCloudName Name of the private cloud. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -10324,21 +8290,20 @@ private PollerFlux, Void> beginDeletePublicIpAsync( * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeletePublicIpAsync( - String resourceGroupName, String publicIpId, String privateCloudName, Context context) { + private PollerFlux, Void> beginDeleteVMGroupAsync(String resourceGroupName, String vmGroupId, + String privateCloudName, Context context) { context = this.client.mergeContext(context); - Mono>> mono = - deletePublicIpWithResponseAsync(resourceGroupName, publicIpId, privateCloudName, context); - return this - .client - .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); + Mono>> mono + = deleteVMGroupWithResponseAsync(resourceGroupName, vmGroupId, privateCloudName, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + context); } /** - * Delete a Public IP Block by id in a private cloud workload network. - * + * Delete a WorkloadNetworkVMGroup. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param publicIpId NSX Public IP Block identifier. Generally the same as the Public IP Block's display name. + * @param vmGroupId ID of the VM group. * @param privateCloudName Name of the private cloud. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -10346,16 +8311,16 @@ private PollerFlux, Void> beginDeletePublicIpAsync( * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDeletePublicIp( - String resourceGroupName, String publicIpId, String privateCloudName) { - return this.beginDeletePublicIpAsync(resourceGroupName, publicIpId, privateCloudName).getSyncPoller(); + public SyncPoller, Void> beginDeleteVMGroup(String resourceGroupName, String vmGroupId, + String privateCloudName) { + return this.beginDeleteVMGroupAsync(resourceGroupName, vmGroupId, privateCloudName).getSyncPoller(); } /** - * Delete a Public IP Block by id in a private cloud workload network. - * + * Delete a WorkloadNetworkVMGroup. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param publicIpId NSX Public IP Block identifier. Generally the same as the Public IP Block's display name. + * @param vmGroupId ID of the VM group. * @param privateCloudName Name of the private cloud. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -10364,16 +8329,16 @@ public SyncPoller, Void> beginDeletePublicIp( * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDeletePublicIp( - String resourceGroupName, String publicIpId, String privateCloudName, Context context) { - return this.beginDeletePublicIpAsync(resourceGroupName, publicIpId, privateCloudName, context).getSyncPoller(); + public SyncPoller, Void> beginDeleteVMGroup(String resourceGroupName, String vmGroupId, + String privateCloudName, Context context) { + return this.beginDeleteVMGroupAsync(resourceGroupName, vmGroupId, privateCloudName, context).getSyncPoller(); } /** - * Delete a Public IP Block by id in a private cloud workload network. - * + * Delete a WorkloadNetworkVMGroup. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param publicIpId NSX Public IP Block identifier. Generally the same as the Public IP Block's display name. + * @param vmGroupId ID of the VM group. * @param privateCloudName Name of the private cloud. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -10381,17 +8346,16 @@ public SyncPoller, Void> beginDeletePublicIp( * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deletePublicIpAsync(String resourceGroupName, String publicIpId, String privateCloudName) { - return beginDeletePublicIpAsync(resourceGroupName, publicIpId, privateCloudName) - .last() + private Mono deleteVMGroupAsync(String resourceGroupName, String vmGroupId, String privateCloudName) { + return beginDeleteVMGroupAsync(resourceGroupName, vmGroupId, privateCloudName).last() .flatMap(this.client::getLroFinalResultOrError); } /** - * Delete a Public IP Block by id in a private cloud workload network. - * + * Delete a WorkloadNetworkVMGroup. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param publicIpId NSX Public IP Block identifier. Generally the same as the Public IP Block's display name. + * @param vmGroupId ID of the VM group. * @param privateCloudName Name of the private cloud. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -10400,33 +8364,32 @@ private Mono deletePublicIpAsync(String resourceGroupName, String publicIp * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deletePublicIpAsync( - String resourceGroupName, String publicIpId, String privateCloudName, Context context) { - return beginDeletePublicIpAsync(resourceGroupName, publicIpId, privateCloudName, context) - .last() + private Mono deleteVMGroupAsync(String resourceGroupName, String vmGroupId, String privateCloudName, + Context context) { + return beginDeleteVMGroupAsync(resourceGroupName, vmGroupId, privateCloudName, context).last() .flatMap(this.client::getLroFinalResultOrError); } /** - * Delete a Public IP Block by id in a private cloud workload network. - * + * Delete a WorkloadNetworkVMGroup. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param publicIpId NSX Public IP Block identifier. Generally the same as the Public IP Block's display name. + * @param vmGroupId ID of the VM group. * @param privateCloudName Name of the private cloud. * @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 deletePublicIp(String resourceGroupName, String publicIpId, String privateCloudName) { - deletePublicIpAsync(resourceGroupName, publicIpId, privateCloudName).block(); + public void deleteVMGroup(String resourceGroupName, String vmGroupId, String privateCloudName) { + deleteVMGroupAsync(resourceGroupName, vmGroupId, privateCloudName).block(); } /** - * Delete a Public IP Block by id in a private cloud workload network. - * + * Delete a WorkloadNetworkVMGroup. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param publicIpId NSX Public IP Block identifier. Generally the same as the Public IP Block's display name. + * @param vmGroupId ID of the VM group. * @param privateCloudName Name of the private cloud. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -10434,19 +8397,21 @@ public void deletePublicIp(String resourceGroupName, String publicIpId, String p * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void deletePublicIp(String resourceGroupName, String publicIpId, String privateCloudName, Context context) { - deletePublicIpAsync(resourceGroupName, publicIpId, privateCloudName, context).block(); + public void deleteVMGroup(String resourceGroupName, String vmGroupId, String privateCloudName, Context context) { + deleteVMGroupAsync(resourceGroupName, vmGroupId, privateCloudName, context).block(); } /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * 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 a list of workload networks along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return the response of a WorkloadNetwork list operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink) { @@ -10454,36 +8419,28 @@ private Mono> listNextSinglePageAsync(String 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.")); + 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.listNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + return FluxUtil.withContext(context -> service.listNext(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 URL to get the next list of items - *

The nextLink parameter. + * + * 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 a list of workload networks along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return the response of a WorkloadNetwork list operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink, Context context) { @@ -10491,692 +8448,547 @@ private Mono> listNextSinglePageAsync(String 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.")); + 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 - .listNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.listNext(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 URL to get the next list of items - *

The nextLink parameter. + * + * 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 a list of NSX Segments along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return the response of a WorkloadNetworkDhcp list operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSegmentsNextSinglePageAsync(String nextLink) { + private Mono> listDhcpNextSinglePageAsync(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.")); + 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.listSegmentsNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .withContext(context -> service.listDhcpNext(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 URL to get the next list of items - *

The nextLink parameter. + * + * 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 a list of NSX Segments along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return the response of a WorkloadNetworkDhcp list operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSegmentsNextSinglePageAsync( - String nextLink, Context context) { + private Mono> listDhcpNextSinglePageAsync(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.")); + 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 - .listSegmentsNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.listDhcpNext(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 URL to get the next list of items - *

The nextLink parameter. + * + * 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 a list of NSX dhcp entities along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return the response of a WorkloadNetworkDnsService list operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listDhcpNextSinglePageAsync(String nextLink) { + private Mono> listDnsServicesNextSinglePageAsync(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.")); + 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.listDhcpNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .withContext(context -> service.listDnsServicesNext(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 URL to get the next list of items - *

The nextLink parameter. + * + * 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 a list of NSX dhcp entities along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return the response of a WorkloadNetworkDnsService list operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listDhcpNextSinglePageAsync( - String nextLink, Context context) { + private Mono> listDnsServicesNextSinglePageAsync(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.")); + 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 - .listDhcpNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.listDnsServicesNext(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 URL to get the next list of items - *

The nextLink parameter. + * + * 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 a list of NSX Gateways along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return the response of a WorkloadNetworkDnsZone list operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listGatewaysNextSinglePageAsync(String nextLink) { + private Mono> listDnsZonesNextSinglePageAsync(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.")); + 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.listGatewaysNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .withContext(context -> service.listDnsZonesNext(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 URL to get the next list of items - *

The nextLink parameter. + * + * 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 a list of NSX Gateways along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return the response of a WorkloadNetworkDnsZone list operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listGatewaysNextSinglePageAsync( - String nextLink, Context context) { + private Mono> listDnsZonesNextSinglePageAsync(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.")); + 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 - .listGatewaysNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.listDnsZonesNext(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 URL to get the next list of items - *

The nextLink parameter. + * + * 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 a list of NSX Port Mirroring along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return the response of a WorkloadNetworkGateway list operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listPortMirroringNextSinglePageAsync( - String nextLink) { + private Mono> listGatewaysNextSinglePageAsync(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.")); + 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.listPortMirroringNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .withContext(context -> service.listGatewaysNext(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 URL to get the next list of items - *

The nextLink parameter. + * + * 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 a list of NSX Port Mirroring along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return the response of a WorkloadNetworkGateway list operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listPortMirroringNextSinglePageAsync( - String nextLink, Context context) { + private Mono> listGatewaysNextSinglePageAsync(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.")); + 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 - .listPortMirroringNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.listGatewaysNext(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 URL to get the next list of items - *

The nextLink parameter. + * + * 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 a list of NSX VM Groups along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return the response of a WorkloadNetworkPortMirroring list operation along with {@link PagedResponse} on + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listVMGroupsNextSinglePageAsync(String nextLink) { + private Mono> + listPortMirroringNextSinglePageAsync(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.")); + 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.listVMGroupsNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .withContext(context -> service.listPortMirroringNext(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 URL to get the next list of items - *

The nextLink parameter. + * + * 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 a list of NSX VM Groups along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return the response of a WorkloadNetworkPortMirroring list operation along with {@link PagedResponse} on + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listVMGroupsNextSinglePageAsync( - String nextLink, Context context) { + private Mono> listPortMirroringNextSinglePageAsync(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.")); + 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 - .listVMGroupsNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.listPortMirroringNext(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 URL to get the next list of items - *

The nextLink parameter. + * + * 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 a list of NSX Virtual Machines along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return the response of a WorkloadNetworkPublicIP list operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listVirtualMachinesNextSinglePageAsync( - String nextLink) { + private Mono> listPublicIPsNextSinglePageAsync(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.")); + 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.listVirtualMachinesNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .withContext(context -> service.listPublicIPsNext(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 URL to get the next list of items - *

The nextLink parameter. + * + * 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 a list of NSX Virtual Machines along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return the response of a WorkloadNetworkPublicIP list operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listVirtualMachinesNextSinglePageAsync( - String nextLink, Context context) { + private Mono> listPublicIPsNextSinglePageAsync(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.")); + 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 - .listVirtualMachinesNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.listPublicIPsNext(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 URL to get the next list of items - *

The nextLink parameter. + * + * 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 a list of NSX DNS Services along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return the response of a WorkloadNetworkSegment list operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listDnsServicesNextSinglePageAsync(String nextLink) { + private Mono> listSegmentsNextSinglePageAsync(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.")); + 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.listDnsServicesNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .withContext(context -> service.listSegmentsNext(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 URL to get the next list of items - *

The nextLink parameter. + * + * 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 a list of NSX DNS Services along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return the response of a WorkloadNetworkSegment list operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listDnsServicesNextSinglePageAsync( - String nextLink, Context context) { + private Mono> listSegmentsNextSinglePageAsync(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.")); + 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 - .listDnsServicesNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.listSegmentsNext(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 URL to get the next list of items - *

The nextLink parameter. + * + * 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 a list of NSX DNS Zones along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return the response of a WorkloadNetworkVirtualMachine list operation along with {@link PagedResponse} on + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listDnsZonesNextSinglePageAsync(String nextLink) { + private Mono> + listVirtualMachinesNextSinglePageAsync(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.")); + 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.listDnsZonesNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .withContext( + context -> service.listVirtualMachinesNext(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 URL to get the next list of items - *

The nextLink parameter. + * + * 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 a list of NSX DNS Zones along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return the response of a WorkloadNetworkVirtualMachine list operation along with {@link PagedResponse} on + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listDnsZonesNextSinglePageAsync( - String nextLink, Context context) { + private Mono> + listVirtualMachinesNextSinglePageAsync(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.")); + 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 - .listDnsZonesNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.listVirtualMachinesNext(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 URL to get the next list of items - *

The nextLink parameter. + * + * 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 a list of NSX Public IP Blocks along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return the response of a WorkloadNetworkVMGroup list operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listPublicIPsNextSinglePageAsync(String nextLink) { + private Mono> listVMGroupsNextSinglePageAsync(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.")); + 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.listPublicIPsNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .withContext(context -> service.listVMGroupsNext(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 URL to get the next list of items - *

The nextLink parameter. + * + * 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 a list of NSX Public IP Blocks along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return the response of a WorkloadNetworkVMGroup list operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listPublicIPsNextSinglePageAsync( - String nextLink, Context context) { + private Mono> listVMGroupsNextSinglePageAsync(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.")); + 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 - .listPublicIPsNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.listVMGroupsNext(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/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworksImpl.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworksImpl.java index 9ea22c33e54cb..77ee7ac49c564 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworksImpl.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworksImpl.java @@ -25,7 +25,6 @@ import com.azure.resourcemanager.avs.models.WorkloadNetworkDnsService; import com.azure.resourcemanager.avs.models.WorkloadNetworkDnsZone; import com.azure.resourcemanager.avs.models.WorkloadNetworkGateway; -import com.azure.resourcemanager.avs.models.WorkloadNetworkName; import com.azure.resourcemanager.avs.models.WorkloadNetworkPortMirroring; import com.azure.resourcemanager.avs.models.WorkloadNetworkPublicIp; import com.azure.resourcemanager.avs.models.WorkloadNetworkSegment; @@ -40,116 +39,63 @@ public final class WorkloadNetworksImpl implements WorkloadNetworks { private final com.azure.resourcemanager.avs.AvsManager serviceManager; - public WorkloadNetworksImpl( - WorkloadNetworksClient innerClient, com.azure.resourcemanager.avs.AvsManager serviceManager) { + public WorkloadNetworksImpl(WorkloadNetworksClient innerClient, + com.azure.resourcemanager.avs.AvsManager serviceManager) { this.innerClient = innerClient; this.serviceManager = serviceManager; } - public Response getWithResponse( - String resourceGroupName, String privateCloudName, WorkloadNetworkName workloadNetworkName, Context context) { - Response inner = - this.serviceClient().getWithResponse(resourceGroupName, privateCloudName, workloadNetworkName, context); - if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), - new WorkloadNetworkImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public WorkloadNetwork get( - String resourceGroupName, String privateCloudName, WorkloadNetworkName workloadNetworkName) { - WorkloadNetworkInner inner = this.serviceClient().get(resourceGroupName, privateCloudName, workloadNetworkName); - if (inner != null) { - return new WorkloadNetworkImpl(inner, this.manager()); - } else { - return null; - } - } - public PagedIterable list(String resourceGroupName, String privateCloudName) { PagedIterable inner = this.serviceClient().list(resourceGroupName, privateCloudName); - return Utils.mapPage(inner, inner1 -> new WorkloadNetworkImpl(inner1, this.manager())); + return ResourceManagerUtils.mapPage(inner, inner1 -> new WorkloadNetworkImpl(inner1, this.manager())); } public PagedIterable list(String resourceGroupName, String privateCloudName, Context context) { - PagedIterable inner = - this.serviceClient().list(resourceGroupName, privateCloudName, context); - return Utils.mapPage(inner, inner1 -> new WorkloadNetworkImpl(inner1, this.manager())); - } - - public PagedIterable listSegments(String resourceGroupName, String privateCloudName) { - PagedIterable inner = - this.serviceClient().listSegments(resourceGroupName, privateCloudName); - return Utils.mapPage(inner, inner1 -> new WorkloadNetworkSegmentImpl(inner1, this.manager())); - } - - public PagedIterable listSegments( - String resourceGroupName, String privateCloudName, Context context) { - PagedIterable inner = - this.serviceClient().listSegments(resourceGroupName, privateCloudName, context); - return Utils.mapPage(inner, inner1 -> new WorkloadNetworkSegmentImpl(inner1, this.manager())); + PagedIterable inner + = this.serviceClient().list(resourceGroupName, privateCloudName, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new WorkloadNetworkImpl(inner1, this.manager())); } - public Response getSegmentWithResponse( - String resourceGroupName, String privateCloudName, String segmentId, Context context) { - Response inner = - this.serviceClient().getSegmentWithResponse(resourceGroupName, privateCloudName, segmentId, context); + public Response getWithResponse(String resourceGroupName, String privateCloudName, + Context context) { + Response inner + = this.serviceClient().getWithResponse(resourceGroupName, privateCloudName, context); if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), - new WorkloadNetworkSegmentImpl(inner.getValue(), this.manager())); + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new WorkloadNetworkImpl(inner.getValue(), this.manager())); } else { return null; } } - public WorkloadNetworkSegment getSegment(String resourceGroupName, String privateCloudName, String segmentId) { - WorkloadNetworkSegmentInner inner = - this.serviceClient().getSegment(resourceGroupName, privateCloudName, segmentId); + public WorkloadNetwork get(String resourceGroupName, String privateCloudName) { + WorkloadNetworkInner inner = this.serviceClient().get(resourceGroupName, privateCloudName); if (inner != null) { - return new WorkloadNetworkSegmentImpl(inner, this.manager()); + return new WorkloadNetworkImpl(inner, this.manager()); } else { return null; } } - public void deleteSegment(String resourceGroupName, String privateCloudName, String segmentId) { - this.serviceClient().deleteSegment(resourceGroupName, privateCloudName, segmentId); - } - - public void deleteSegment(String resourceGroupName, String privateCloudName, String segmentId, Context context) { - this.serviceClient().deleteSegment(resourceGroupName, privateCloudName, segmentId, context); - } - public PagedIterable listDhcp(String resourceGroupName, String privateCloudName) { - PagedIterable inner = - this.serviceClient().listDhcp(resourceGroupName, privateCloudName); - return Utils.mapPage(inner, inner1 -> new WorkloadNetworkDhcpImpl(inner1, this.manager())); + PagedIterable inner + = this.serviceClient().listDhcp(resourceGroupName, privateCloudName); + return ResourceManagerUtils.mapPage(inner, inner1 -> new WorkloadNetworkDhcpImpl(inner1, this.manager())); } - public PagedIterable listDhcp( - String resourceGroupName, String privateCloudName, Context context) { - PagedIterable inner = - this.serviceClient().listDhcp(resourceGroupName, privateCloudName, context); - return Utils.mapPage(inner, inner1 -> new WorkloadNetworkDhcpImpl(inner1, this.manager())); + public PagedIterable listDhcp(String resourceGroupName, String privateCloudName, + Context context) { + PagedIterable inner + = this.serviceClient().listDhcp(resourceGroupName, privateCloudName, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new WorkloadNetworkDhcpImpl(inner1, this.manager())); } - public Response getDhcpWithResponse( - String resourceGroupName, String dhcpId, String privateCloudName, Context context) { - Response inner = - this.serviceClient().getDhcpWithResponse(resourceGroupName, dhcpId, privateCloudName, context); + public Response getDhcpWithResponse(String resourceGroupName, String dhcpId, + String privateCloudName, Context context) { + Response inner + = this.serviceClient().getDhcpWithResponse(resourceGroupName, dhcpId, privateCloudName, context); if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), new WorkloadNetworkDhcpImpl(inner.getValue(), this.manager())); } else { return null; @@ -173,1073 +119,877 @@ public void deleteDhcp(String resourceGroupName, String privateCloudName, String this.serviceClient().deleteDhcp(resourceGroupName, privateCloudName, dhcpId, context); } - public PagedIterable listGateways(String resourceGroupName, String privateCloudName) { - PagedIterable inner = - this.serviceClient().listGateways(resourceGroupName, privateCloudName); - return Utils.mapPage(inner, inner1 -> new WorkloadNetworkGatewayImpl(inner1, this.manager())); + public PagedIterable listDnsServices(String resourceGroupName, String privateCloudName) { + PagedIterable inner + = this.serviceClient().listDnsServices(resourceGroupName, privateCloudName); + return ResourceManagerUtils.mapPage(inner, inner1 -> new WorkloadNetworkDnsServiceImpl(inner1, this.manager())); } - public PagedIterable listGateways( - String resourceGroupName, String privateCloudName, Context context) { - PagedIterable inner = - this.serviceClient().listGateways(resourceGroupName, privateCloudName, context); - return Utils.mapPage(inner, inner1 -> new WorkloadNetworkGatewayImpl(inner1, this.manager())); + public PagedIterable listDnsServices(String resourceGroupName, String privateCloudName, + Context context) { + PagedIterable inner + = this.serviceClient().listDnsServices(resourceGroupName, privateCloudName, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new WorkloadNetworkDnsServiceImpl(inner1, this.manager())); } - public Response getGatewayWithResponse( - String resourceGroupName, String privateCloudName, String gatewayId, Context context) { - Response inner = - this.serviceClient().getGatewayWithResponse(resourceGroupName, privateCloudName, gatewayId, context); + public Response getDnsServiceWithResponse(String resourceGroupName, + String privateCloudName, String dnsServiceId, Context context) { + Response inner = this.serviceClient() + .getDnsServiceWithResponse(resourceGroupName, privateCloudName, dnsServiceId, context); if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), - new WorkloadNetworkGatewayImpl(inner.getValue(), this.manager())); + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new WorkloadNetworkDnsServiceImpl(inner.getValue(), this.manager())); } else { return null; } } - public WorkloadNetworkGateway getGateway(String resourceGroupName, String privateCloudName, String gatewayId) { - WorkloadNetworkGatewayInner inner = - this.serviceClient().getGateway(resourceGroupName, privateCloudName, gatewayId); + public WorkloadNetworkDnsService getDnsService(String resourceGroupName, String privateCloudName, + String dnsServiceId) { + WorkloadNetworkDnsServiceInner inner + = this.serviceClient().getDnsService(resourceGroupName, privateCloudName, dnsServiceId); if (inner != null) { - return new WorkloadNetworkGatewayImpl(inner, this.manager()); + return new WorkloadNetworkDnsServiceImpl(inner, this.manager()); } else { return null; } } - public PagedIterable listPortMirroring( - String resourceGroupName, String privateCloudName) { - PagedIterable inner = - this.serviceClient().listPortMirroring(resourceGroupName, privateCloudName); - return Utils.mapPage(inner, inner1 -> new WorkloadNetworkPortMirroringImpl(inner1, this.manager())); + public void deleteDnsService(String resourceGroupName, String dnsServiceId, String privateCloudName) { + this.serviceClient().deleteDnsService(resourceGroupName, dnsServiceId, privateCloudName); + } + + public void deleteDnsService(String resourceGroupName, String dnsServiceId, String privateCloudName, + Context context) { + this.serviceClient().deleteDnsService(resourceGroupName, dnsServiceId, privateCloudName, context); + } + + public PagedIterable listDnsZones(String resourceGroupName, String privateCloudName) { + PagedIterable inner + = this.serviceClient().listDnsZones(resourceGroupName, privateCloudName); + return ResourceManagerUtils.mapPage(inner, inner1 -> new WorkloadNetworkDnsZoneImpl(inner1, this.manager())); } - public PagedIterable listPortMirroring( - String resourceGroupName, String privateCloudName, Context context) { - PagedIterable inner = - this.serviceClient().listPortMirroring(resourceGroupName, privateCloudName, context); - return Utils.mapPage(inner, inner1 -> new WorkloadNetworkPortMirroringImpl(inner1, this.manager())); + public PagedIterable listDnsZones(String resourceGroupName, String privateCloudName, + Context context) { + PagedIterable inner + = this.serviceClient().listDnsZones(resourceGroupName, privateCloudName, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new WorkloadNetworkDnsZoneImpl(inner1, this.manager())); } - public Response getPortMirroringWithResponse( - String resourceGroupName, String privateCloudName, String portMirroringId, Context context) { - Response inner = - this - .serviceClient() - .getPortMirroringWithResponse(resourceGroupName, privateCloudName, portMirroringId, context); + public Response getDnsZoneWithResponse(String resourceGroupName, String privateCloudName, + String dnsZoneId, Context context) { + Response inner + = this.serviceClient().getDnsZoneWithResponse(resourceGroupName, privateCloudName, dnsZoneId, context); if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), - new WorkloadNetworkPortMirroringImpl(inner.getValue(), this.manager())); + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new WorkloadNetworkDnsZoneImpl(inner.getValue(), this.manager())); } else { return null; } } - public WorkloadNetworkPortMirroring getPortMirroring( - String resourceGroupName, String privateCloudName, String portMirroringId) { - WorkloadNetworkPortMirroringInner inner = - this.serviceClient().getPortMirroring(resourceGroupName, privateCloudName, portMirroringId); + public WorkloadNetworkDnsZone getDnsZone(String resourceGroupName, String privateCloudName, String dnsZoneId) { + WorkloadNetworkDnsZoneInner inner + = this.serviceClient().getDnsZone(resourceGroupName, privateCloudName, dnsZoneId); if (inner != null) { - return new WorkloadNetworkPortMirroringImpl(inner, this.manager()); + return new WorkloadNetworkDnsZoneImpl(inner, this.manager()); } else { return null; } } - public void deletePortMirroring(String resourceGroupName, String portMirroringId, String privateCloudName) { - this.serviceClient().deletePortMirroring(resourceGroupName, portMirroringId, privateCloudName); + public void deleteDnsZone(String resourceGroupName, String dnsZoneId, String privateCloudName) { + this.serviceClient().deleteDnsZone(resourceGroupName, dnsZoneId, privateCloudName); } - public void deletePortMirroring( - String resourceGroupName, String portMirroringId, String privateCloudName, Context context) { - this.serviceClient().deletePortMirroring(resourceGroupName, portMirroringId, privateCloudName, context); + public void deleteDnsZone(String resourceGroupName, String dnsZoneId, String privateCloudName, Context context) { + this.serviceClient().deleteDnsZone(resourceGroupName, dnsZoneId, privateCloudName, context); } - public PagedIterable listVMGroups(String resourceGroupName, String privateCloudName) { - PagedIterable inner = - this.serviceClient().listVMGroups(resourceGroupName, privateCloudName); - return Utils.mapPage(inner, inner1 -> new WorkloadNetworkVMGroupImpl(inner1, this.manager())); + public PagedIterable listGateways(String resourceGroupName, String privateCloudName) { + PagedIterable inner + = this.serviceClient().listGateways(resourceGroupName, privateCloudName); + return ResourceManagerUtils.mapPage(inner, inner1 -> new WorkloadNetworkGatewayImpl(inner1, this.manager())); } - public PagedIterable listVMGroups( - String resourceGroupName, String privateCloudName, Context context) { - PagedIterable inner = - this.serviceClient().listVMGroups(resourceGroupName, privateCloudName, context); - return Utils.mapPage(inner, inner1 -> new WorkloadNetworkVMGroupImpl(inner1, this.manager())); + public PagedIterable listGateways(String resourceGroupName, String privateCloudName, + Context context) { + PagedIterable inner + = this.serviceClient().listGateways(resourceGroupName, privateCloudName, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new WorkloadNetworkGatewayImpl(inner1, this.manager())); } - public Response getVMGroupWithResponse( - String resourceGroupName, String privateCloudName, String vmGroupId, Context context) { - Response inner = - this.serviceClient().getVMGroupWithResponse(resourceGroupName, privateCloudName, vmGroupId, context); + public Response getGatewayWithResponse(String resourceGroupName, String privateCloudName, + String gatewayId, Context context) { + Response inner + = this.serviceClient().getGatewayWithResponse(resourceGroupName, privateCloudName, gatewayId, context); if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), - new WorkloadNetworkVMGroupImpl(inner.getValue(), this.manager())); + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new WorkloadNetworkGatewayImpl(inner.getValue(), this.manager())); } else { return null; } } - public WorkloadNetworkVMGroup getVMGroup(String resourceGroupName, String privateCloudName, String vmGroupId) { - WorkloadNetworkVMGroupInner inner = - this.serviceClient().getVMGroup(resourceGroupName, privateCloudName, vmGroupId); + public WorkloadNetworkGateway getGateway(String resourceGroupName, String privateCloudName, String gatewayId) { + WorkloadNetworkGatewayInner inner + = this.serviceClient().getGateway(resourceGroupName, privateCloudName, gatewayId); if (inner != null) { - return new WorkloadNetworkVMGroupImpl(inner, this.manager()); + return new WorkloadNetworkGatewayImpl(inner, this.manager()); } else { return null; } } - public void deleteVMGroup(String resourceGroupName, String vmGroupId, String privateCloudName) { - this.serviceClient().deleteVMGroup(resourceGroupName, vmGroupId, privateCloudName); + public PagedIterable listPortMirroring(String resourceGroupName, + String privateCloudName) { + PagedIterable inner + = this.serviceClient().listPortMirroring(resourceGroupName, privateCloudName); + return ResourceManagerUtils.mapPage(inner, + inner1 -> new WorkloadNetworkPortMirroringImpl(inner1, this.manager())); } - public void deleteVMGroup(String resourceGroupName, String vmGroupId, String privateCloudName, Context context) { - this.serviceClient().deleteVMGroup(resourceGroupName, vmGroupId, privateCloudName, context); + public PagedIterable listPortMirroring(String resourceGroupName, + String privateCloudName, Context context) { + PagedIterable inner + = this.serviceClient().listPortMirroring(resourceGroupName, privateCloudName, context); + return ResourceManagerUtils.mapPage(inner, + inner1 -> new WorkloadNetworkPortMirroringImpl(inner1, this.manager())); } - public PagedIterable listVirtualMachines( - String resourceGroupName, String privateCloudName) { - PagedIterable inner = - this.serviceClient().listVirtualMachines(resourceGroupName, privateCloudName); - return Utils.mapPage(inner, inner1 -> new WorkloadNetworkVirtualMachineImpl(inner1, this.manager())); - } - - public PagedIterable listVirtualMachines( - String resourceGroupName, String privateCloudName, Context context) { - PagedIterable inner = - this.serviceClient().listVirtualMachines(resourceGroupName, privateCloudName, context); - return Utils.mapPage(inner, inner1 -> new WorkloadNetworkVirtualMachineImpl(inner1, this.manager())); - } - - public Response getVirtualMachineWithResponse( - String resourceGroupName, String privateCloudName, String virtualMachineId, Context context) { - Response inner = - this - .serviceClient() - .getVirtualMachineWithResponse(resourceGroupName, privateCloudName, virtualMachineId, context); + public Response getPortMirroringWithResponse(String resourceGroupName, + String privateCloudName, String portMirroringId, Context context) { + Response inner = this.serviceClient() + .getPortMirroringWithResponse(resourceGroupName, privateCloudName, portMirroringId, context); if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), - new WorkloadNetworkVirtualMachineImpl(inner.getValue(), this.manager())); + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new WorkloadNetworkPortMirroringImpl(inner.getValue(), this.manager())); } else { return null; } } - public WorkloadNetworkVirtualMachine getVirtualMachine( - String resourceGroupName, String privateCloudName, String virtualMachineId) { - WorkloadNetworkVirtualMachineInner inner = - this.serviceClient().getVirtualMachine(resourceGroupName, privateCloudName, virtualMachineId); + public WorkloadNetworkPortMirroring getPortMirroring(String resourceGroupName, String privateCloudName, + String portMirroringId) { + WorkloadNetworkPortMirroringInner inner + = this.serviceClient().getPortMirroring(resourceGroupName, privateCloudName, portMirroringId); if (inner != null) { - return new WorkloadNetworkVirtualMachineImpl(inner, this.manager()); + return new WorkloadNetworkPortMirroringImpl(inner, this.manager()); } else { return null; } } - public PagedIterable listDnsServices(String resourceGroupName, String privateCloudName) { - PagedIterable inner = - this.serviceClient().listDnsServices(resourceGroupName, privateCloudName); - return Utils.mapPage(inner, inner1 -> new WorkloadNetworkDnsServiceImpl(inner1, this.manager())); + public void deletePortMirroring(String resourceGroupName, String portMirroringId, String privateCloudName) { + this.serviceClient().deletePortMirroring(resourceGroupName, portMirroringId, privateCloudName); + } + + public void deletePortMirroring(String resourceGroupName, String portMirroringId, String privateCloudName, + Context context) { + this.serviceClient().deletePortMirroring(resourceGroupName, portMirroringId, privateCloudName, context); + } + + public PagedIterable listPublicIPs(String resourceGroupName, String privateCloudName) { + PagedIterable inner + = this.serviceClient().listPublicIPs(resourceGroupName, privateCloudName); + return ResourceManagerUtils.mapPage(inner, inner1 -> new WorkloadNetworkPublicIpImpl(inner1, this.manager())); } - public PagedIterable listDnsServices( - String resourceGroupName, String privateCloudName, Context context) { - PagedIterable inner = - this.serviceClient().listDnsServices(resourceGroupName, privateCloudName, context); - return Utils.mapPage(inner, inner1 -> new WorkloadNetworkDnsServiceImpl(inner1, this.manager())); + public PagedIterable listPublicIPs(String resourceGroupName, String privateCloudName, + Context context) { + PagedIterable inner + = this.serviceClient().listPublicIPs(resourceGroupName, privateCloudName, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new WorkloadNetworkPublicIpImpl(inner1, this.manager())); } - public Response getDnsServiceWithResponse( - String resourceGroupName, String privateCloudName, String dnsServiceId, Context context) { - Response inner = - this.serviceClient().getDnsServiceWithResponse(resourceGroupName, privateCloudName, dnsServiceId, context); + public Response getPublicIpWithResponse(String resourceGroupName, String privateCloudName, + String publicIpId, Context context) { + Response inner + = this.serviceClient().getPublicIpWithResponse(resourceGroupName, privateCloudName, publicIpId, context); if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), - new WorkloadNetworkDnsServiceImpl(inner.getValue(), this.manager())); + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new WorkloadNetworkPublicIpImpl(inner.getValue(), this.manager())); } else { return null; } } - public WorkloadNetworkDnsService getDnsService( - String resourceGroupName, String privateCloudName, String dnsServiceId) { - WorkloadNetworkDnsServiceInner inner = - this.serviceClient().getDnsService(resourceGroupName, privateCloudName, dnsServiceId); + public WorkloadNetworkPublicIp getPublicIp(String resourceGroupName, String privateCloudName, String publicIpId) { + WorkloadNetworkPublicIpInner inner + = this.serviceClient().getPublicIp(resourceGroupName, privateCloudName, publicIpId); if (inner != null) { - return new WorkloadNetworkDnsServiceImpl(inner, this.manager()); + return new WorkloadNetworkPublicIpImpl(inner, this.manager()); } else { return null; } } - public void deleteDnsService(String resourceGroupName, String dnsServiceId, String privateCloudName) { - this.serviceClient().deleteDnsService(resourceGroupName, dnsServiceId, privateCloudName); + public void deletePublicIp(String resourceGroupName, String publicIpId, String privateCloudName) { + this.serviceClient().deletePublicIp(resourceGroupName, publicIpId, privateCloudName); } - public void deleteDnsService( - String resourceGroupName, String dnsServiceId, String privateCloudName, Context context) { - this.serviceClient().deleteDnsService(resourceGroupName, dnsServiceId, privateCloudName, context); + public void deletePublicIp(String resourceGroupName, String publicIpId, String privateCloudName, Context context) { + this.serviceClient().deletePublicIp(resourceGroupName, publicIpId, privateCloudName, context); } - public PagedIterable listDnsZones(String resourceGroupName, String privateCloudName) { - PagedIterable inner = - this.serviceClient().listDnsZones(resourceGroupName, privateCloudName); - return Utils.mapPage(inner, inner1 -> new WorkloadNetworkDnsZoneImpl(inner1, this.manager())); + public PagedIterable listSegments(String resourceGroupName, String privateCloudName) { + PagedIterable inner + = this.serviceClient().listSegments(resourceGroupName, privateCloudName); + return ResourceManagerUtils.mapPage(inner, inner1 -> new WorkloadNetworkSegmentImpl(inner1, this.manager())); } - public PagedIterable listDnsZones( - String resourceGroupName, String privateCloudName, Context context) { - PagedIterable inner = - this.serviceClient().listDnsZones(resourceGroupName, privateCloudName, context); - return Utils.mapPage(inner, inner1 -> new WorkloadNetworkDnsZoneImpl(inner1, this.manager())); + public PagedIterable listSegments(String resourceGroupName, String privateCloudName, + Context context) { + PagedIterable inner + = this.serviceClient().listSegments(resourceGroupName, privateCloudName, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new WorkloadNetworkSegmentImpl(inner1, this.manager())); } - public Response getDnsZoneWithResponse( - String resourceGroupName, String privateCloudName, String dnsZoneId, Context context) { - Response inner = - this.serviceClient().getDnsZoneWithResponse(resourceGroupName, privateCloudName, dnsZoneId, context); + public Response getSegmentWithResponse(String resourceGroupName, String privateCloudName, + String segmentId, Context context) { + Response inner + = this.serviceClient().getSegmentWithResponse(resourceGroupName, privateCloudName, segmentId, context); if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), - new WorkloadNetworkDnsZoneImpl(inner.getValue(), this.manager())); + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new WorkloadNetworkSegmentImpl(inner.getValue(), this.manager())); } else { return null; } } - public WorkloadNetworkDnsZone getDnsZone(String resourceGroupName, String privateCloudName, String dnsZoneId) { - WorkloadNetworkDnsZoneInner inner = - this.serviceClient().getDnsZone(resourceGroupName, privateCloudName, dnsZoneId); + public WorkloadNetworkSegment getSegment(String resourceGroupName, String privateCloudName, String segmentId) { + WorkloadNetworkSegmentInner inner + = this.serviceClient().getSegment(resourceGroupName, privateCloudName, segmentId); if (inner != null) { - return new WorkloadNetworkDnsZoneImpl(inner, this.manager()); + return new WorkloadNetworkSegmentImpl(inner, this.manager()); } else { return null; } } - public void deleteDnsZone(String resourceGroupName, String dnsZoneId, String privateCloudName) { - this.serviceClient().deleteDnsZone(resourceGroupName, dnsZoneId, privateCloudName); + public void deleteSegment(String resourceGroupName, String privateCloudName, String segmentId) { + this.serviceClient().deleteSegment(resourceGroupName, privateCloudName, segmentId); } - public void deleteDnsZone(String resourceGroupName, String dnsZoneId, String privateCloudName, Context context) { - this.serviceClient().deleteDnsZone(resourceGroupName, dnsZoneId, privateCloudName, context); + public void deleteSegment(String resourceGroupName, String privateCloudName, String segmentId, Context context) { + this.serviceClient().deleteSegment(resourceGroupName, privateCloudName, segmentId, context); } - public PagedIterable listPublicIPs(String resourceGroupName, String privateCloudName) { - PagedIterable inner = - this.serviceClient().listPublicIPs(resourceGroupName, privateCloudName); - return Utils.mapPage(inner, inner1 -> new WorkloadNetworkPublicIpImpl(inner1, this.manager())); + public PagedIterable listVirtualMachines(String resourceGroupName, + String privateCloudName) { + PagedIterable inner + = this.serviceClient().listVirtualMachines(resourceGroupName, privateCloudName); + return ResourceManagerUtils.mapPage(inner, + inner1 -> new WorkloadNetworkVirtualMachineImpl(inner1, this.manager())); } - public PagedIterable listPublicIPs( - String resourceGroupName, String privateCloudName, Context context) { - PagedIterable inner = - this.serviceClient().listPublicIPs(resourceGroupName, privateCloudName, context); - return Utils.mapPage(inner, inner1 -> new WorkloadNetworkPublicIpImpl(inner1, this.manager())); + public PagedIterable listVirtualMachines(String resourceGroupName, + String privateCloudName, Context context) { + PagedIterable inner + = this.serviceClient().listVirtualMachines(resourceGroupName, privateCloudName, context); + return ResourceManagerUtils.mapPage(inner, + inner1 -> new WorkloadNetworkVirtualMachineImpl(inner1, this.manager())); } - public Response getPublicIpWithResponse( - String resourceGroupName, String privateCloudName, String publicIpId, Context context) { - Response inner = - this.serviceClient().getPublicIpWithResponse(resourceGroupName, privateCloudName, publicIpId, context); + public Response getVirtualMachineWithResponse(String resourceGroupName, + String privateCloudName, String virtualMachineId, Context context) { + Response inner = this.serviceClient() + .getVirtualMachineWithResponse(resourceGroupName, privateCloudName, virtualMachineId, context); if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), - new WorkloadNetworkPublicIpImpl(inner.getValue(), this.manager())); + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new WorkloadNetworkVirtualMachineImpl(inner.getValue(), this.manager())); } else { return null; } } - public WorkloadNetworkPublicIp getPublicIp(String resourceGroupName, String privateCloudName, String publicIpId) { - WorkloadNetworkPublicIpInner inner = - this.serviceClient().getPublicIp(resourceGroupName, privateCloudName, publicIpId); + public WorkloadNetworkVirtualMachine getVirtualMachine(String resourceGroupName, String privateCloudName, + String virtualMachineId) { + WorkloadNetworkVirtualMachineInner inner + = this.serviceClient().getVirtualMachine(resourceGroupName, privateCloudName, virtualMachineId); if (inner != null) { - return new WorkloadNetworkPublicIpImpl(inner, this.manager()); + return new WorkloadNetworkVirtualMachineImpl(inner, this.manager()); } else { return null; } } - public void deletePublicIp(String resourceGroupName, String publicIpId, String privateCloudName) { - this.serviceClient().deletePublicIp(resourceGroupName, publicIpId, privateCloudName); + public PagedIterable listVMGroups(String resourceGroupName, String privateCloudName) { + PagedIterable inner + = this.serviceClient().listVMGroups(resourceGroupName, privateCloudName); + return ResourceManagerUtils.mapPage(inner, inner1 -> new WorkloadNetworkVMGroupImpl(inner1, this.manager())); } - public void deletePublicIp(String resourceGroupName, String publicIpId, String privateCloudName, Context context) { - this.serviceClient().deletePublicIp(resourceGroupName, publicIpId, privateCloudName, context); + public PagedIterable listVMGroups(String resourceGroupName, String privateCloudName, + Context context) { + PagedIterable inner + = this.serviceClient().listVMGroups(resourceGroupName, privateCloudName, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new WorkloadNetworkVMGroupImpl(inner1, this.manager())); } - public WorkloadNetworkSegment getSegmentById(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 privateCloudName = Utils.getValueFromIdByName(id, "privateClouds"); - if (privateCloudName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'privateClouds'.", id))); - } - String segmentId = Utils.getValueFromIdByName(id, "segments"); - if (segmentId == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'segments'.", id))); + public Response getVMGroupWithResponse(String resourceGroupName, String privateCloudName, + String vmGroupId, Context context) { + Response inner + = this.serviceClient().getVMGroupWithResponse(resourceGroupName, privateCloudName, vmGroupId, context); + if (inner != null) { + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new WorkloadNetworkVMGroupImpl(inner.getValue(), this.manager())); + } else { + return null; } - return this.getSegmentWithResponse(resourceGroupName, privateCloudName, segmentId, Context.NONE).getValue(); } - public Response getSegmentByIdWithResponse(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 privateCloudName = Utils.getValueFromIdByName(id, "privateClouds"); - if (privateCloudName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'privateClouds'.", id))); - } - String segmentId = Utils.getValueFromIdByName(id, "segments"); - if (segmentId == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'segments'.", id))); + public WorkloadNetworkVMGroup getVMGroup(String resourceGroupName, String privateCloudName, String vmGroupId) { + WorkloadNetworkVMGroupInner inner + = this.serviceClient().getVMGroup(resourceGroupName, privateCloudName, vmGroupId); + if (inner != null) { + return new WorkloadNetworkVMGroupImpl(inner, this.manager()); + } else { + return null; } - return this.getSegmentWithResponse(resourceGroupName, privateCloudName, segmentId, context); + } + + public void deleteVMGroup(String resourceGroupName, String vmGroupId, String privateCloudName) { + this.serviceClient().deleteVMGroup(resourceGroupName, vmGroupId, privateCloudName); + } + + public void deleteVMGroup(String resourceGroupName, String vmGroupId, String privateCloudName, Context context) { + this.serviceClient().deleteVMGroup(resourceGroupName, vmGroupId, privateCloudName, context); } public WorkloadNetworkDhcp getDhcpById(String id) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + String resourceGroupName = ResourceManagerUtils.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))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } - String dhcpId = Utils.getValueFromIdByName(id, "dhcpConfigurations"); + String dhcpId = ResourceManagerUtils.getValueFromIdByName(id, "dhcpConfigurations"); if (dhcpId == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format( - "The resource ID '%s' is not valid. Missing path segment 'dhcpConfigurations'.", id))); - } - String privateCloudName = Utils.getValueFromIdByName(id, "privateClouds"); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'dhcpConfigurations'.", id))); + } + String privateCloudName = ResourceManagerUtils.getValueFromIdByName(id, "privateClouds"); if (privateCloudName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'privateClouds'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'privateClouds'.", id))); } return this.getDhcpWithResponse(resourceGroupName, dhcpId, privateCloudName, Context.NONE).getValue(); } public Response getDhcpByIdWithResponse(String id, Context context) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + String resourceGroupName = ResourceManagerUtils.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))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } - String dhcpId = Utils.getValueFromIdByName(id, "dhcpConfigurations"); + String dhcpId = ResourceManagerUtils.getValueFromIdByName(id, "dhcpConfigurations"); if (dhcpId == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format( - "The resource ID '%s' is not valid. Missing path segment 'dhcpConfigurations'.", id))); - } - String privateCloudName = Utils.getValueFromIdByName(id, "privateClouds"); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'dhcpConfigurations'.", id))); + } + String privateCloudName = ResourceManagerUtils.getValueFromIdByName(id, "privateClouds"); if (privateCloudName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'privateClouds'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'privateClouds'.", id))); } return this.getDhcpWithResponse(resourceGroupName, dhcpId, privateCloudName, context); } - public WorkloadNetworkPortMirroring getPortMirroringById(String id) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + public WorkloadNetworkDnsService getDnsServiceById(String id) { + String resourceGroupName = ResourceManagerUtils.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))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } - String privateCloudName = Utils.getValueFromIdByName(id, "privateClouds"); + String privateCloudName = ResourceManagerUtils.getValueFromIdByName(id, "privateClouds"); if (privateCloudName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'privateClouds'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'privateClouds'.", id))); } - String portMirroringId = Utils.getValueFromIdByName(id, "portMirroringProfiles"); - if (portMirroringId == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format( - "The resource ID '%s' is not valid. Missing path segment 'portMirroringProfiles'.", - id))); - } - return this - .getPortMirroringWithResponse(resourceGroupName, privateCloudName, portMirroringId, Context.NONE) + String dnsServiceId = ResourceManagerUtils.getValueFromIdByName(id, "dnsServices"); + if (dnsServiceId == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'dnsServices'.", id))); + } + return this.getDnsServiceWithResponse(resourceGroupName, privateCloudName, dnsServiceId, Context.NONE) .getValue(); } - public Response getPortMirroringByIdWithResponse(String id, Context context) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + public Response getDnsServiceByIdWithResponse(String id, Context context) { + String resourceGroupName = ResourceManagerUtils.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))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } - String privateCloudName = Utils.getValueFromIdByName(id, "privateClouds"); + String privateCloudName = ResourceManagerUtils.getValueFromIdByName(id, "privateClouds"); if (privateCloudName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'privateClouds'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'privateClouds'.", id))); } - String portMirroringId = Utils.getValueFromIdByName(id, "portMirroringProfiles"); - if (portMirroringId == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format( - "The resource ID '%s' is not valid. Missing path segment 'portMirroringProfiles'.", - id))); + String dnsServiceId = ResourceManagerUtils.getValueFromIdByName(id, "dnsServices"); + if (dnsServiceId == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'dnsServices'.", id))); } - return this.getPortMirroringWithResponse(resourceGroupName, privateCloudName, portMirroringId, context); + return this.getDnsServiceWithResponse(resourceGroupName, privateCloudName, dnsServiceId, context); } - public WorkloadNetworkVMGroup getVMGroupById(String id) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + public WorkloadNetworkDnsZone getDnsZoneById(String id) { + String resourceGroupName = ResourceManagerUtils.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))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } - String privateCloudName = Utils.getValueFromIdByName(id, "privateClouds"); + String privateCloudName = ResourceManagerUtils.getValueFromIdByName(id, "privateClouds"); if (privateCloudName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'privateClouds'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'privateClouds'.", id))); } - String vmGroupId = Utils.getValueFromIdByName(id, "vmGroups"); - if (vmGroupId == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'vmGroups'.", id))); + String dnsZoneId = ResourceManagerUtils.getValueFromIdByName(id, "dnsZones"); + if (dnsZoneId == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'dnsZones'.", id))); } - return this.getVMGroupWithResponse(resourceGroupName, privateCloudName, vmGroupId, Context.NONE).getValue(); + return this.getDnsZoneWithResponse(resourceGroupName, privateCloudName, dnsZoneId, Context.NONE).getValue(); } - public Response getVMGroupByIdWithResponse(String id, Context context) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + public Response getDnsZoneByIdWithResponse(String id, Context context) { + String resourceGroupName = ResourceManagerUtils.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))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } - String privateCloudName = Utils.getValueFromIdByName(id, "privateClouds"); + String privateCloudName = ResourceManagerUtils.getValueFromIdByName(id, "privateClouds"); if (privateCloudName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'privateClouds'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'privateClouds'.", id))); } - String vmGroupId = Utils.getValueFromIdByName(id, "vmGroups"); - if (vmGroupId == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'vmGroups'.", id))); + String dnsZoneId = ResourceManagerUtils.getValueFromIdByName(id, "dnsZones"); + if (dnsZoneId == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'dnsZones'.", id))); } - return this.getVMGroupWithResponse(resourceGroupName, privateCloudName, vmGroupId, context); + return this.getDnsZoneWithResponse(resourceGroupName, privateCloudName, dnsZoneId, context); } - public WorkloadNetworkDnsService getDnsServiceById(String id) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + public WorkloadNetworkPortMirroring getPortMirroringById(String id) { + String resourceGroupName = ResourceManagerUtils.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))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } - String privateCloudName = Utils.getValueFromIdByName(id, "privateClouds"); + String privateCloudName = ResourceManagerUtils.getValueFromIdByName(id, "privateClouds"); if (privateCloudName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'privateClouds'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'privateClouds'.", id))); } - String dnsServiceId = Utils.getValueFromIdByName(id, "dnsServices"); - if (dnsServiceId == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'dnsServices'.", id))); + String portMirroringId = ResourceManagerUtils.getValueFromIdByName(id, "portMirroringProfiles"); + if (portMirroringId == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'portMirroringProfiles'.", id))); } - return this - .getDnsServiceWithResponse(resourceGroupName, privateCloudName, dnsServiceId, Context.NONE) + return this.getPortMirroringWithResponse(resourceGroupName, privateCloudName, portMirroringId, Context.NONE) .getValue(); } - public Response getDnsServiceByIdWithResponse(String id, Context context) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + public Response getPortMirroringByIdWithResponse(String id, Context context) { + String resourceGroupName = ResourceManagerUtils.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))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } - String privateCloudName = Utils.getValueFromIdByName(id, "privateClouds"); + String privateCloudName = ResourceManagerUtils.getValueFromIdByName(id, "privateClouds"); if (privateCloudName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'privateClouds'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'privateClouds'.", id))); } - String dnsServiceId = Utils.getValueFromIdByName(id, "dnsServices"); - if (dnsServiceId == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'dnsServices'.", id))); + String portMirroringId = ResourceManagerUtils.getValueFromIdByName(id, "portMirroringProfiles"); + if (portMirroringId == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'portMirroringProfiles'.", id))); } - return this.getDnsServiceWithResponse(resourceGroupName, privateCloudName, dnsServiceId, context); + return this.getPortMirroringWithResponse(resourceGroupName, privateCloudName, portMirroringId, context); } - public WorkloadNetworkDnsZone getDnsZoneById(String id) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + public WorkloadNetworkPublicIp getPublicIpById(String id) { + String resourceGroupName = ResourceManagerUtils.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))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } - String privateCloudName = Utils.getValueFromIdByName(id, "privateClouds"); + String privateCloudName = ResourceManagerUtils.getValueFromIdByName(id, "privateClouds"); if (privateCloudName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'privateClouds'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'privateClouds'.", id))); } - String dnsZoneId = Utils.getValueFromIdByName(id, "dnsZones"); - if (dnsZoneId == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'dnsZones'.", id))); + String publicIpId = ResourceManagerUtils.getValueFromIdByName(id, "publicIPs"); + if (publicIpId == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'publicIPs'.", id))); } - return this.getDnsZoneWithResponse(resourceGroupName, privateCloudName, dnsZoneId, Context.NONE).getValue(); + return this.getPublicIpWithResponse(resourceGroupName, privateCloudName, publicIpId, Context.NONE).getValue(); } - public Response getDnsZoneByIdWithResponse(String id, Context context) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + public Response getPublicIpByIdWithResponse(String id, Context context) { + String resourceGroupName = ResourceManagerUtils.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))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } - String privateCloudName = Utils.getValueFromIdByName(id, "privateClouds"); + String privateCloudName = ResourceManagerUtils.getValueFromIdByName(id, "privateClouds"); if (privateCloudName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'privateClouds'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'privateClouds'.", id))); } - String dnsZoneId = Utils.getValueFromIdByName(id, "dnsZones"); - if (dnsZoneId == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'dnsZones'.", id))); + String publicIpId = ResourceManagerUtils.getValueFromIdByName(id, "publicIPs"); + if (publicIpId == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'publicIPs'.", id))); } - return this.getDnsZoneWithResponse(resourceGroupName, privateCloudName, dnsZoneId, context); + return this.getPublicIpWithResponse(resourceGroupName, privateCloudName, publicIpId, context); } - public WorkloadNetworkPublicIp getPublicIpById(String id) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + public WorkloadNetworkSegment getSegmentById(String id) { + String resourceGroupName = ResourceManagerUtils.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))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } - String privateCloudName = Utils.getValueFromIdByName(id, "privateClouds"); + String privateCloudName = ResourceManagerUtils.getValueFromIdByName(id, "privateClouds"); if (privateCloudName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'privateClouds'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'privateClouds'.", id))); } - String publicIpId = Utils.getValueFromIdByName(id, "publicIPs"); - if (publicIpId == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'publicIPs'.", id))); + String segmentId = ResourceManagerUtils.getValueFromIdByName(id, "segments"); + if (segmentId == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'segments'.", id))); } - return this.getPublicIpWithResponse(resourceGroupName, privateCloudName, publicIpId, Context.NONE).getValue(); + return this.getSegmentWithResponse(resourceGroupName, privateCloudName, segmentId, Context.NONE).getValue(); } - public Response getPublicIpByIdWithResponse(String id, Context context) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + public Response getSegmentByIdWithResponse(String id, Context context) { + String resourceGroupName = ResourceManagerUtils.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))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } - String privateCloudName = Utils.getValueFromIdByName(id, "privateClouds"); + String privateCloudName = ResourceManagerUtils.getValueFromIdByName(id, "privateClouds"); if (privateCloudName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'privateClouds'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'privateClouds'.", id))); } - String publicIpId = Utils.getValueFromIdByName(id, "publicIPs"); - if (publicIpId == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'publicIPs'.", id))); + String segmentId = ResourceManagerUtils.getValueFromIdByName(id, "segments"); + if (segmentId == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'segments'.", id))); } - return this.getPublicIpWithResponse(resourceGroupName, privateCloudName, publicIpId, context); + return this.getSegmentWithResponse(resourceGroupName, privateCloudName, segmentId, context); } - public void deleteSegmentById(String id) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + public WorkloadNetworkVMGroup getVMGroupById(String id) { + String resourceGroupName = ResourceManagerUtils.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))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } - String privateCloudName = Utils.getValueFromIdByName(id, "privateClouds"); + String privateCloudName = ResourceManagerUtils.getValueFromIdByName(id, "privateClouds"); if (privateCloudName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'privateClouds'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'privateClouds'.", id))); } - String segmentId = Utils.getValueFromIdByName(id, "segments"); - if (segmentId == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'segments'.", id))); + String vmGroupId = ResourceManagerUtils.getValueFromIdByName(id, "vmGroups"); + if (vmGroupId == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'vmGroups'.", id))); } - this.deleteSegment(resourceGroupName, privateCloudName, segmentId, Context.NONE); + return this.getVMGroupWithResponse(resourceGroupName, privateCloudName, vmGroupId, Context.NONE).getValue(); } - public void deleteSegmentByIdWithResponse(String id, Context context) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + public Response getVMGroupByIdWithResponse(String id, Context context) { + String resourceGroupName = ResourceManagerUtils.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))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } - String privateCloudName = Utils.getValueFromIdByName(id, "privateClouds"); + String privateCloudName = ResourceManagerUtils.getValueFromIdByName(id, "privateClouds"); if (privateCloudName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'privateClouds'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'privateClouds'.", id))); } - String segmentId = Utils.getValueFromIdByName(id, "segments"); - if (segmentId == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'segments'.", id))); + String vmGroupId = ResourceManagerUtils.getValueFromIdByName(id, "vmGroups"); + if (vmGroupId == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'vmGroups'.", id))); } - this.deleteSegment(resourceGroupName, privateCloudName, segmentId, context); + return this.getVMGroupWithResponse(resourceGroupName, privateCloudName, vmGroupId, context); } public void deleteDhcpById(String id) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + String resourceGroupName = ResourceManagerUtils.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))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } - String privateCloudName = Utils.getValueFromIdByName(id, "privateClouds"); + String privateCloudName = ResourceManagerUtils.getValueFromIdByName(id, "privateClouds"); if (privateCloudName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'privateClouds'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'privateClouds'.", id))); } - String dhcpId = Utils.getValueFromIdByName(id, "dhcpConfigurations"); + String dhcpId = ResourceManagerUtils.getValueFromIdByName(id, "dhcpConfigurations"); if (dhcpId == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format( - "The resource ID '%s' is not valid. Missing path segment 'dhcpConfigurations'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'dhcpConfigurations'.", id))); } this.deleteDhcp(resourceGroupName, privateCloudName, dhcpId, Context.NONE); } public void deleteDhcpByIdWithResponse(String id, Context context) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + String resourceGroupName = ResourceManagerUtils.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))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } - String privateCloudName = Utils.getValueFromIdByName(id, "privateClouds"); + String privateCloudName = ResourceManagerUtils.getValueFromIdByName(id, "privateClouds"); if (privateCloudName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'privateClouds'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'privateClouds'.", id))); } - String dhcpId = Utils.getValueFromIdByName(id, "dhcpConfigurations"); + String dhcpId = ResourceManagerUtils.getValueFromIdByName(id, "dhcpConfigurations"); if (dhcpId == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format( - "The resource ID '%s' is not valid. Missing path segment 'dhcpConfigurations'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'dhcpConfigurations'.", id))); } this.deleteDhcp(resourceGroupName, privateCloudName, dhcpId, context); } - public void deletePortMirroringById(String id) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + public void deleteDnsServiceById(String id) { + String resourceGroupName = ResourceManagerUtils.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))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } - String portMirroringId = Utils.getValueFromIdByName(id, "portMirroringProfiles"); - if (portMirroringId == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format( - "The resource ID '%s' is not valid. Missing path segment 'portMirroringProfiles'.", - id))); - } - String privateCloudName = Utils.getValueFromIdByName(id, "privateClouds"); + String dnsServiceId = ResourceManagerUtils.getValueFromIdByName(id, "dnsServices"); + if (dnsServiceId == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'dnsServices'.", id))); + } + String privateCloudName = ResourceManagerUtils.getValueFromIdByName(id, "privateClouds"); if (privateCloudName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'privateClouds'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'privateClouds'.", id))); } - this.deletePortMirroring(resourceGroupName, portMirroringId, privateCloudName, Context.NONE); + this.deleteDnsService(resourceGroupName, dnsServiceId, privateCloudName, Context.NONE); } - public void deletePortMirroringByIdWithResponse(String id, Context context) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + public void deleteDnsServiceByIdWithResponse(String id, Context context) { + String resourceGroupName = ResourceManagerUtils.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))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } - String portMirroringId = Utils.getValueFromIdByName(id, "portMirroringProfiles"); - if (portMirroringId == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format( - "The resource ID '%s' is not valid. Missing path segment 'portMirroringProfiles'.", - id))); - } - String privateCloudName = Utils.getValueFromIdByName(id, "privateClouds"); + String dnsServiceId = ResourceManagerUtils.getValueFromIdByName(id, "dnsServices"); + if (dnsServiceId == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'dnsServices'.", id))); + } + String privateCloudName = ResourceManagerUtils.getValueFromIdByName(id, "privateClouds"); if (privateCloudName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'privateClouds'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'privateClouds'.", id))); } - this.deletePortMirroring(resourceGroupName, portMirroringId, privateCloudName, context); + this.deleteDnsService(resourceGroupName, dnsServiceId, privateCloudName, context); } - public void deleteVMGroupById(String id) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + public void deleteDnsZoneById(String id) { + String resourceGroupName = ResourceManagerUtils.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))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } - String vmGroupId = Utils.getValueFromIdByName(id, "vmGroups"); - if (vmGroupId == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'vmGroups'.", id))); + String dnsZoneId = ResourceManagerUtils.getValueFromIdByName(id, "dnsZones"); + if (dnsZoneId == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'dnsZones'.", id))); } - String privateCloudName = Utils.getValueFromIdByName(id, "privateClouds"); + String privateCloudName = ResourceManagerUtils.getValueFromIdByName(id, "privateClouds"); if (privateCloudName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'privateClouds'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'privateClouds'.", id))); } - this.deleteVMGroup(resourceGroupName, vmGroupId, privateCloudName, Context.NONE); + this.deleteDnsZone(resourceGroupName, dnsZoneId, privateCloudName, Context.NONE); } - public void deleteVMGroupByIdWithResponse(String id, Context context) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + public void deleteDnsZoneByIdWithResponse(String id, Context context) { + String resourceGroupName = ResourceManagerUtils.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))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } - String vmGroupId = Utils.getValueFromIdByName(id, "vmGroups"); - if (vmGroupId == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'vmGroups'.", id))); + String dnsZoneId = ResourceManagerUtils.getValueFromIdByName(id, "dnsZones"); + if (dnsZoneId == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'dnsZones'.", id))); } - String privateCloudName = Utils.getValueFromIdByName(id, "privateClouds"); + String privateCloudName = ResourceManagerUtils.getValueFromIdByName(id, "privateClouds"); if (privateCloudName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'privateClouds'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'privateClouds'.", id))); } - this.deleteVMGroup(resourceGroupName, vmGroupId, privateCloudName, context); + this.deleteDnsZone(resourceGroupName, dnsZoneId, privateCloudName, context); } - public void deleteDnsServiceById(String id) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + public void deletePortMirroringById(String id) { + String resourceGroupName = ResourceManagerUtils.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))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } - String dnsServiceId = Utils.getValueFromIdByName(id, "dnsServices"); - if (dnsServiceId == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'dnsServices'.", id))); + String portMirroringId = ResourceManagerUtils.getValueFromIdByName(id, "portMirroringProfiles"); + if (portMirroringId == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'portMirroringProfiles'.", id))); } - String privateCloudName = Utils.getValueFromIdByName(id, "privateClouds"); + String privateCloudName = ResourceManagerUtils.getValueFromIdByName(id, "privateClouds"); if (privateCloudName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'privateClouds'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'privateClouds'.", id))); } - this.deleteDnsService(resourceGroupName, dnsServiceId, privateCloudName, Context.NONE); + this.deletePortMirroring(resourceGroupName, portMirroringId, privateCloudName, Context.NONE); } - public void deleteDnsServiceByIdWithResponse(String id, Context context) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + public void deletePortMirroringByIdWithResponse(String id, Context context) { + String resourceGroupName = ResourceManagerUtils.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))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } - String dnsServiceId = Utils.getValueFromIdByName(id, "dnsServices"); - if (dnsServiceId == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'dnsServices'.", id))); + String portMirroringId = ResourceManagerUtils.getValueFromIdByName(id, "portMirroringProfiles"); + if (portMirroringId == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'portMirroringProfiles'.", id))); } - String privateCloudName = Utils.getValueFromIdByName(id, "privateClouds"); + String privateCloudName = ResourceManagerUtils.getValueFromIdByName(id, "privateClouds"); if (privateCloudName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'privateClouds'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'privateClouds'.", id))); } - this.deleteDnsService(resourceGroupName, dnsServiceId, privateCloudName, context); + this.deletePortMirroring(resourceGroupName, portMirroringId, privateCloudName, context); } - public void deleteDnsZoneById(String id) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + public void deletePublicIpById(String id) { + String resourceGroupName = ResourceManagerUtils.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))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } - String dnsZoneId = Utils.getValueFromIdByName(id, "dnsZones"); - if (dnsZoneId == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'dnsZones'.", id))); + String publicIpId = ResourceManagerUtils.getValueFromIdByName(id, "publicIPs"); + if (publicIpId == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'publicIPs'.", id))); } - String privateCloudName = Utils.getValueFromIdByName(id, "privateClouds"); + String privateCloudName = ResourceManagerUtils.getValueFromIdByName(id, "privateClouds"); if (privateCloudName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'privateClouds'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'privateClouds'.", id))); } - this.deleteDnsZone(resourceGroupName, dnsZoneId, privateCloudName, Context.NONE); + this.deletePublicIp(resourceGroupName, publicIpId, privateCloudName, Context.NONE); } - public void deleteDnsZoneByIdWithResponse(String id, Context context) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + public void deletePublicIpByIdWithResponse(String id, Context context) { + String resourceGroupName = ResourceManagerUtils.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))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } - String dnsZoneId = Utils.getValueFromIdByName(id, "dnsZones"); - if (dnsZoneId == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'dnsZones'.", id))); + String publicIpId = ResourceManagerUtils.getValueFromIdByName(id, "publicIPs"); + if (publicIpId == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'publicIPs'.", id))); } - String privateCloudName = Utils.getValueFromIdByName(id, "privateClouds"); + String privateCloudName = ResourceManagerUtils.getValueFromIdByName(id, "privateClouds"); if (privateCloudName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'privateClouds'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'privateClouds'.", id))); } - this.deleteDnsZone(resourceGroupName, dnsZoneId, privateCloudName, context); + this.deletePublicIp(resourceGroupName, publicIpId, privateCloudName, context); } - public void deletePublicIpById(String id) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + public void deleteSegmentById(String id) { + String resourceGroupName = ResourceManagerUtils.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))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } - String publicIpId = Utils.getValueFromIdByName(id, "publicIPs"); - if (publicIpId == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'publicIPs'.", id))); + String privateCloudName = ResourceManagerUtils.getValueFromIdByName(id, "privateClouds"); + if (privateCloudName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'privateClouds'.", id))); } - String privateCloudName = Utils.getValueFromIdByName(id, "privateClouds"); + String segmentId = ResourceManagerUtils.getValueFromIdByName(id, "segments"); + if (segmentId == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'segments'.", id))); + } + this.deleteSegment(resourceGroupName, privateCloudName, segmentId, Context.NONE); + } + + public void deleteSegmentByIdWithResponse(String id, Context context) { + String resourceGroupName = ResourceManagerUtils.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 privateCloudName = ResourceManagerUtils.getValueFromIdByName(id, "privateClouds"); if (privateCloudName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'privateClouds'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'privateClouds'.", id))); } - this.deletePublicIp(resourceGroupName, publicIpId, privateCloudName, Context.NONE); + String segmentId = ResourceManagerUtils.getValueFromIdByName(id, "segments"); + if (segmentId == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'segments'.", id))); + } + this.deleteSegment(resourceGroupName, privateCloudName, segmentId, context); } - public void deletePublicIpByIdWithResponse(String id, Context context) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + public void deleteVMGroupById(String id) { + String resourceGroupName = ResourceManagerUtils.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))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } - String publicIpId = Utils.getValueFromIdByName(id, "publicIPs"); - if (publicIpId == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'publicIPs'.", id))); + String vmGroupId = ResourceManagerUtils.getValueFromIdByName(id, "vmGroups"); + if (vmGroupId == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'vmGroups'.", id))); } - String privateCloudName = Utils.getValueFromIdByName(id, "privateClouds"); + String privateCloudName = ResourceManagerUtils.getValueFromIdByName(id, "privateClouds"); if (privateCloudName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'privateClouds'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'privateClouds'.", id))); } - this.deletePublicIp(resourceGroupName, publicIpId, privateCloudName, context); + this.deleteVMGroup(resourceGroupName, vmGroupId, privateCloudName, Context.NONE); + } + + public void deleteVMGroupByIdWithResponse(String id, Context context) { + String resourceGroupName = ResourceManagerUtils.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 vmGroupId = ResourceManagerUtils.getValueFromIdByName(id, "vmGroups"); + if (vmGroupId == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'vmGroups'.", id))); + } + String privateCloudName = ResourceManagerUtils.getValueFromIdByName(id, "privateClouds"); + if (privateCloudName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'privateClouds'.", id))); + } + this.deleteVMGroup(resourceGroupName, vmGroupId, privateCloudName, context); } private WorkloadNetworksClient serviceClient() { @@ -1250,22 +1000,10 @@ private com.azure.resourcemanager.avs.AvsManager manager() { return this.serviceManager; } - public WorkloadNetworkSegmentImpl defineSegments(String name) { - return new WorkloadNetworkSegmentImpl(name, this.manager()); - } - public WorkloadNetworkDhcpImpl defineDhcp(String name) { return new WorkloadNetworkDhcpImpl(name, this.manager()); } - public WorkloadNetworkPortMirroringImpl definePortMirroring(String name) { - return new WorkloadNetworkPortMirroringImpl(name, this.manager()); - } - - public WorkloadNetworkVMGroupImpl defineVMGroup(String name) { - return new WorkloadNetworkVMGroupImpl(name, this.manager()); - } - public WorkloadNetworkDnsServiceImpl defineDnsService(String name) { return new WorkloadNetworkDnsServiceImpl(name, this.manager()); } @@ -1274,7 +1012,19 @@ public WorkloadNetworkDnsZoneImpl defineDnsZone(String name) { return new WorkloadNetworkDnsZoneImpl(name, this.manager()); } + public WorkloadNetworkPortMirroringImpl definePortMirroring(String name) { + return new WorkloadNetworkPortMirroringImpl(name, this.manager()); + } + public WorkloadNetworkPublicIpImpl definePublicIp(String name) { return new WorkloadNetworkPublicIpImpl(name, this.manager()); } + + public WorkloadNetworkSegmentImpl defineSegments(String name) { + return new WorkloadNetworkSegmentImpl(name, this.manager()); + } + + public WorkloadNetworkVMGroupImpl defineVMGroup(String name) { + return new WorkloadNetworkVMGroupImpl(name, this.manager()); + } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/package-info.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/package-info.java index 98dd9ee386eb7..f4a0631101b9c 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/package-info.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/package-info.java @@ -2,5 +2,8 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -/** Package containing the implementations for AvsClient. Azure VMware Solution API. */ +/** + * Package containing the implementations for AvsClient. + * Azure VMware Solution API. + */ package com.azure.resourcemanager.avs.implementation; diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ActionType.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ActionType.java new file mode 100644 index 0000000000000..303f713599f43 --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ActionType.java @@ -0,0 +1,48 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.avs.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** + * Enum. Indicates the action type. "Internal" refers to actions that are for internal only APIs. + */ +public final class ActionType extends ExpandableStringEnum { + /** + * Static value Internal for ActionType. + */ + public static final ActionType INTERNAL = fromString("Internal"); + + /** + * Creates a new instance of ActionType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ActionType() { + } + + /** + * Creates or finds a ActionType from its string representation. + * + * @param name a name to look for. + * @return the corresponding ActionType. + */ + @JsonCreator + public static ActionType fromString(String name) { + return fromString(name, ActionType.class); + } + + /** + * Gets known ActionType values. + * + * @return known ActionType values. + */ + public static Collection values() { + return values(ActionType.class); + } +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/Addon.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/Addon.java index 7e3e4e79c9434..e3ba21cb4781b 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/Addon.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/Addon.java @@ -4,71 +4,89 @@ package com.azure.resourcemanager.avs.models; +import com.azure.core.management.SystemData; import com.azure.core.util.Context; import com.azure.resourcemanager.avs.fluent.models.AddonInner; -/** An immutable client-side representation of Addon. */ +/** + * An immutable client-side representation of Addon. + */ public interface Addon { /** * Gets the id property: Fully qualified resource Id for the resource. - * + * * @return the id value. */ String id(); /** * Gets the name property: The name of the resource. - * + * * @return the name value. */ String name(); /** * Gets the type property: The type of the resource. - * + * * @return the type value. */ String type(); /** - * Gets the properties property: The properties of an addon resource. - * + * Gets the properties property: The resource-specific properties for this resource. + * * @return the properties value. */ AddonProperties properties(); + /** + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + SystemData systemData(); + /** * Gets the name of the resource group. - * + * * @return the name of the resource group. */ String resourceGroupName(); /** * Gets the inner com.azure.resourcemanager.avs.fluent.models.AddonInner object. - * + * * @return the inner object. */ AddonInner innerModel(); - /** The entirety of the Addon definition. */ + /** + * The entirety of the Addon definition. + */ interface Definition extends DefinitionStages.Blank, DefinitionStages.WithParentResource, DefinitionStages.WithCreate { } - /** The Addon definition stages. */ + /** + * The Addon definition stages. + */ interface DefinitionStages { - /** The first stage of the Addon definition. */ + /** + * The first stage of the Addon definition. + */ interface Blank extends WithParentResource { } - /** The stage of the Addon definition allowing to specify parent resource. */ + /** + * The stage of the Addon definition allowing to specify parent resource. + */ interface WithParentResource { /** * Specifies resourceGroupName, privateCloudName. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName The name of the private cloud. + * @param privateCloudName Name of the private cloud. * @return the next definition stage. */ WithCreate withExistingPrivateCloud(String resourceGroupName, String privateCloudName); @@ -81,26 +99,28 @@ interface WithParentResource { interface WithCreate extends DefinitionStages.WithProperties { /** * Executes the create request. - * + * * @return the created resource. */ Addon create(); /** * Executes the create request. - * + * * @param context The context to associate with this operation. * @return the created resource. */ Addon create(Context context); } - /** The stage of the Addon definition allowing to specify properties. */ + /** + * The stage of the Addon definition allowing to specify properties. + */ interface WithProperties { /** - * Specifies the properties property: The properties of an addon resource. - * - * @param properties The properties of an addon resource. + * Specifies the properties property: The resource-specific properties for this resource.. + * + * @param properties The resource-specific properties for this resource. * @return the next definition stage. */ WithCreate withProperties(AddonProperties properties); @@ -109,53 +129,47 @@ interface WithProperties { /** * Begins update for the Addon resource. - * + * * @return the stage of resource update. */ Addon.Update update(); - /** The template for Addon update. */ - interface Update extends UpdateStages.WithProperties { + /** + * The template for Addon update. + */ + interface Update { /** * Executes the update request. - * + * * @return the updated resource. */ Addon apply(); /** * Executes the update request. - * + * * @param context The context to associate with this operation. * @return the updated resource. */ Addon apply(Context context); } - /** The Addon update stages. */ + /** + * The Addon update stages. + */ interface UpdateStages { - /** The stage of the Addon update allowing to specify properties. */ - interface WithProperties { - /** - * Specifies the properties property: The properties of an addon resource. - * - * @param properties The properties of an addon resource. - * @return the next definition stage. - */ - Update withProperties(AddonProperties properties); - } } /** * Refreshes the resource to sync with Azure. - * + * * @return the refreshed resource. */ Addon refresh(); /** * Refreshes the resource to sync with Azure. - * + * * @param context The context to associate with this operation. * @return the refreshed resource. */ diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/AddonArcProperties.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/AddonArcProperties.java index 80446d49c90aa..cc78cd50141d1 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/AddonArcProperties.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/AddonArcProperties.java @@ -9,7 +9,9 @@ import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; -/** The properties of an Arc addon. */ +/** + * The properties of an Arc addon. + */ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "addonType") @JsonTypeName("Arc") @Fluent @@ -20,13 +22,15 @@ public final class AddonArcProperties extends AddonProperties { @JsonProperty(value = "vCenter") private String vCenter; - /** Creates an instance of AddonArcProperties class. */ + /** + * Creates an instance of AddonArcProperties class. + */ public AddonArcProperties() { } /** * Get the vCenter property: The VMware vCenter resource ID. - * + * * @return the vCenter value. */ public String vCenter() { @@ -35,7 +39,7 @@ public String vCenter() { /** * Set the vCenter property: The VMware vCenter resource ID. - * + * * @param vCenter the vCenter value to set. * @return the AddonArcProperties object itself. */ @@ -46,7 +50,7 @@ public AddonArcProperties withVCenter(String vCenter) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ @Override diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/AddonHcxProperties.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/AddonHcxProperties.java index ce29dab08cce3..ec1d1fd3b3316 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/AddonHcxProperties.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/AddonHcxProperties.java @@ -10,7 +10,9 @@ import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; -/** The properties of an HCX addon. */ +/** + * The properties of an HCX addon. + */ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "addonType") @JsonTypeName("HCX") @Fluent @@ -21,13 +23,15 @@ public final class AddonHcxProperties extends AddonProperties { @JsonProperty(value = "offer", required = true) private String offer; - /** Creates an instance of AddonHcxProperties class. */ + /** + * Creates an instance of AddonHcxProperties class. + */ public AddonHcxProperties() { } /** * Get the offer property: The HCX offer, example VMware MaaS Cloud Provider (Enterprise). - * + * * @return the offer value. */ public String offer() { @@ -36,7 +40,7 @@ public String offer() { /** * Set the offer property: The HCX offer, example VMware MaaS Cloud Provider (Enterprise). - * + * * @param offer the offer value to set. * @return the AddonHcxProperties object itself. */ @@ -47,16 +51,15 @@ public AddonHcxProperties withOffer(String offer) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ @Override public void validate() { super.validate(); if (offer() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property offer in model AddonHcxProperties")); + throw LOGGER.logExceptionAsError( + new IllegalArgumentException("Missing required property offer in model AddonHcxProperties")); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/AddonList.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/AddonList.java deleted file mode 100644 index 0ee7ce36d6f69..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/AddonList.java +++ /dev/null @@ -1,59 +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.avs.models; - -import com.azure.core.annotation.Immutable; -import com.azure.resourcemanager.avs.fluent.models.AddonInner; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** A paged list of addons. */ -@Immutable -public final class AddonList { - /* - * The items on a page - */ - @JsonProperty(value = "value", access = JsonProperty.Access.WRITE_ONLY) - private List value; - - /* - * URL to get the next page if any - */ - @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) - private String nextLink; - - /** Creates an instance of AddonList class. */ - public AddonList() { - } - - /** - * Get the value property: The items on a page. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Get the nextLink property: URL to get the next page if 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/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/AddonListResult.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/AddonListResult.java new file mode 100644 index 0000000000000..152167750996c --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/AddonListResult.java @@ -0,0 +1,80 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.avs.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.avs.fluent.models.AddonInner; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** + * The response of a Addon list operation. + */ +@Fluent +public final class AddonListResult { + /* + * The Addon items on this page + */ + @JsonProperty(value = "value", required = true) + private List value; + + /* + * The link to the next page of items + */ + @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) + private String nextLink; + + /** + * Creates an instance of AddonListResult class. + */ + public AddonListResult() { + } + + /** + * Get the value property: The Addon items on this page. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Set the value property: The Addon items on this page. + * + * @param value the value value to set. + * @return the AddonListResult object itself. + */ + public AddonListResult withValue(List value) { + this.value = value; + return this; + } + + /** + * Get the nextLink property: The link to the next page of items. + * + * @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) { + throw LOGGER.logExceptionAsError( + new IllegalArgumentException("Missing required property value in model AddonListResult")); + } else { + value().forEach(e -> e.validate()); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(AddonListResult.class); +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/AddonProperties.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/AddonProperties.java index 58efc7492e42c..0b48275ac1b5d 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/AddonProperties.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/AddonProperties.java @@ -10,7 +10,9 @@ import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; -/** The properties of an addon. */ +/** + * The properties of an addon. + */ @JsonTypeInfo( use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, @@ -18,11 +20,10 @@ defaultImpl = AddonProperties.class) @JsonTypeName("AddonProperties") @JsonSubTypes({ - @JsonSubTypes.Type(name = "SRM", value = AddonSrmProperties.class), - @JsonSubTypes.Type(name = "VR", value = AddonVrProperties.class), + @JsonSubTypes.Type(name = "Arc", value = AddonArcProperties.class), @JsonSubTypes.Type(name = "HCX", value = AddonHcxProperties.class), - @JsonSubTypes.Type(name = "Arc", value = AddonArcProperties.class) -}) + @JsonSubTypes.Type(name = "SRM", value = AddonSrmProperties.class), + @JsonSubTypes.Type(name = "VR", value = AddonVrProperties.class) }) @Immutable public class AddonProperties { /* @@ -31,13 +32,15 @@ public class AddonProperties { @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) private AddonProvisioningState provisioningState; - /** Creates an instance of AddonProperties class. */ + /** + * Creates an instance of AddonProperties class. + */ public AddonProperties() { } /** * Get the provisioningState property: The state of the addon provisioning. - * + * * @return the provisioningState value. */ public AddonProvisioningState provisioningState() { @@ -46,7 +49,7 @@ public AddonProvisioningState provisioningState() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/AddonProvisioningState.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/AddonProvisioningState.java index ad48d216d0a7b..23b6cef88441e 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/AddonProvisioningState.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/AddonProvisioningState.java @@ -8,32 +8,48 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** The state of the addon provisioning. */ +/** + * Addon provisioning state. + */ public final class AddonProvisioningState extends ExpandableStringEnum { - /** Static value Succeeded for AddonProvisioningState. */ + /** + * Static value Succeeded for AddonProvisioningState. + */ public static final AddonProvisioningState SUCCEEDED = fromString("Succeeded"); - /** Static value Failed for AddonProvisioningState. */ + /** + * Static value Failed for AddonProvisioningState. + */ public static final AddonProvisioningState FAILED = fromString("Failed"); - /** Static value Cancelled for AddonProvisioningState. */ + /** + * Static value Canceled for AddonProvisioningState. + */ + public static final AddonProvisioningState CANCELED = fromString("Canceled"); + + /** + * Static value Cancelled for AddonProvisioningState. + */ public static final AddonProvisioningState CANCELLED = fromString("Cancelled"); - /** Static value Building for AddonProvisioningState. */ + /** + * Static value Building for AddonProvisioningState. + */ public static final AddonProvisioningState BUILDING = fromString("Building"); - /** Static value Deleting for AddonProvisioningState. */ + /** + * Static value Deleting for AddonProvisioningState. + */ public static final AddonProvisioningState DELETING = fromString("Deleting"); - /** Static value Updating for AddonProvisioningState. */ + /** + * Static value Updating for AddonProvisioningState. + */ public static final AddonProvisioningState UPDATING = fromString("Updating"); - /** Static value Canceled for AddonProvisioningState. */ - public static final AddonProvisioningState CANCELED = fromString("Canceled"); - /** * Creates a new instance of AddonProvisioningState value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -42,7 +58,7 @@ public AddonProvisioningState() { /** * Creates or finds a AddonProvisioningState from its string representation. - * + * * @param name a name to look for. * @return the corresponding AddonProvisioningState. */ @@ -53,7 +69,7 @@ public static AddonProvisioningState fromString(String name) { /** * Gets known AddonProvisioningState values. - * + * * @return known AddonProvisioningState values. */ public static Collection values() { diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/AddonSrmProperties.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/AddonSrmProperties.java index 669eca9222a20..8a9b599b5a553 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/AddonSrmProperties.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/AddonSrmProperties.java @@ -9,7 +9,9 @@ import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; -/** The properties of a Site Recovery Manager (SRM) addon. */ +/** + * The properties of a Site Recovery Manager (SRM) addon. + */ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "addonType") @JsonTypeName("SRM") @Fluent @@ -20,13 +22,15 @@ public final class AddonSrmProperties extends AddonProperties { @JsonProperty(value = "licenseKey") private String licenseKey; - /** Creates an instance of AddonSrmProperties class. */ + /** + * Creates an instance of AddonSrmProperties class. + */ public AddonSrmProperties() { } /** * Get the licenseKey property: The Site Recovery Manager (SRM) license. - * + * * @return the licenseKey value. */ public String licenseKey() { @@ -35,7 +39,7 @@ public String licenseKey() { /** * Set the licenseKey property: The Site Recovery Manager (SRM) license. - * + * * @param licenseKey the licenseKey value to set. * @return the AddonSrmProperties object itself. */ @@ -46,7 +50,7 @@ public AddonSrmProperties withLicenseKey(String licenseKey) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ @Override diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/AddonType.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/AddonType.java index dabcc00e6aa57..88aa2291cf46d 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/AddonType.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/AddonType.java @@ -8,23 +8,33 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** The type of private cloud addon. */ +/** + * Addon type. + */ public final class AddonType extends ExpandableStringEnum { - /** Static value SRM for AddonType. */ + /** + * Static value SRM for AddonType. + */ public static final AddonType SRM = fromString("SRM"); - /** Static value VR for AddonType. */ + /** + * Static value VR for AddonType. + */ public static final AddonType VR = fromString("VR"); - /** Static value HCX for AddonType. */ + /** + * Static value HCX for AddonType. + */ public static final AddonType HCX = fromString("HCX"); - /** Static value Arc for AddonType. */ + /** + * Static value Arc for AddonType. + */ public static final AddonType ARC = fromString("Arc"); /** * Creates a new instance of AddonType value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -33,7 +43,7 @@ public AddonType() { /** * Creates or finds a AddonType from its string representation. - * + * * @param name a name to look for. * @return the corresponding AddonType. */ @@ -44,7 +54,7 @@ public static AddonType fromString(String name) { /** * Gets known AddonType values. - * + * * @return known AddonType values. */ public static Collection values() { diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/AddonVrProperties.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/AddonVrProperties.java index 6ea7a60736e96..9536c98477a14 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/AddonVrProperties.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/AddonVrProperties.java @@ -9,7 +9,9 @@ import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; -/** The properties of a vSphere Replication (VR) addon. */ +/** + * The properties of a vSphere Replication (VR) addon. + */ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "addonType") @JsonTypeName("VR") @Fluent @@ -20,13 +22,15 @@ public final class AddonVrProperties extends AddonProperties { @JsonProperty(value = "vrsCount", required = true) private int vrsCount; - /** Creates an instance of AddonVrProperties class. */ + /** + * Creates an instance of AddonVrProperties class. + */ public AddonVrProperties() { } /** * Get the vrsCount property: The vSphere Replication Server (VRS) count. - * + * * @return the vrsCount value. */ public int vrsCount() { @@ -35,7 +39,7 @@ public int vrsCount() { /** * Set the vrsCount property: The vSphere Replication Server (VRS) count. - * + * * @param vrsCount the vrsCount value to set. * @return the AddonVrProperties object itself. */ @@ -46,7 +50,7 @@ public AddonVrProperties withVrsCount(int vrsCount) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ @Override diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/Addons.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/Addons.java index 200999a910969..a0b40291f2e89 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/Addons.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/Addons.java @@ -8,67 +8,69 @@ import com.azure.core.http.rest.Response; import com.azure.core.util.Context; -/** Resource collection API of Addons. */ +/** + * Resource collection API of Addons. + */ public interface Addons { /** - * List addons in a private cloud. - * + * List Addon resources by PrivateCloud. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. * @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 a paged list of addons as paginated response with {@link PagedIterable}. + * @return the response of a Addon list operation as paginated response with {@link PagedIterable}. */ PagedIterable list(String resourceGroupName, String privateCloudName); /** - * List addons in a private cloud. - * + * List Addon resources by PrivateCloud. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. * @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 a paged list of addons as paginated response with {@link PagedIterable}. + * @return the response of a Addon list operation as paginated response with {@link PagedIterable}. */ PagedIterable list(String resourceGroupName, String privateCloudName, Context context); /** - * Get an addon by name in a private cloud. - * + * Get a Addon. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param addonName Name of the addon for the private cloud. + * @param addonName Name of the addon. * @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 an addon by name in a private cloud along with {@link Response}. + * @return a Addon along with {@link Response}. */ - Response getWithResponse( - String resourceGroupName, String privateCloudName, String addonName, Context context); + Response getWithResponse(String resourceGroupName, String privateCloudName, String addonName, + Context context); /** - * Get an addon by name in a private cloud. - * + * Get a Addon. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param addonName Name of the addon for the private cloud. + * @param addonName Name of the addon. * @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 an addon by name in a private cloud. + * @return a Addon. */ Addon get(String resourceGroupName, String privateCloudName, String addonName); /** - * Delete a addon in a private cloud. - * + * Delete a Addon. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param addonName Name of the addon for the private cloud. + * @param addonName Name of the addon. * @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. @@ -76,11 +78,11 @@ Response getWithResponse( void delete(String resourceGroupName, String privateCloudName, String addonName); /** - * Delete a addon in a private cloud. - * + * Delete a Addon. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param addonName Name of the addon for the private cloud. + * @param addonName Name of the addon. * @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. @@ -89,31 +91,31 @@ Response getWithResponse( void delete(String resourceGroupName, String privateCloudName, String addonName, Context context); /** - * Get an addon by name in a private cloud. - * + * Get a Addon. + * * @param id the resource ID. * @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 an addon by name in a private cloud along with {@link Response}. + * @return a Addon along with {@link Response}. */ Addon getById(String id); /** - * Get an addon by name in a private cloud. - * + * Get a Addon. + * * @param id the resource ID. * @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 an addon by name in a private cloud along with {@link Response}. + * @return a Addon along with {@link Response}. */ Response getByIdWithResponse(String id, Context context); /** - * Delete a addon in a private cloud. - * + * Delete a Addon. + * * @param id the resource ID. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -122,8 +124,8 @@ Response getWithResponse( void deleteById(String id); /** - * Delete a addon in a private cloud. - * + * Delete a Addon. + * * @param id the resource ID. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -134,7 +136,7 @@ Response getWithResponse( /** * Begins definition for a new Addon resource. - * + * * @param name resource name. * @return the first stage of the new Addon definition. */ diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/AdminCredentials.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/AdminCredentials.java index c8136800d2040..7abe7069e3433 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/AdminCredentials.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/AdminCredentials.java @@ -6,39 +6,41 @@ import com.azure.resourcemanager.avs.fluent.models.AdminCredentialsInner; -/** An immutable client-side representation of AdminCredentials. */ +/** + * An immutable client-side representation of AdminCredentials. + */ public interface AdminCredentials { /** * Gets the nsxtUsername property: NSX-T Manager username. - * + * * @return the nsxtUsername value. */ String nsxtUsername(); /** * Gets the nsxtPassword property: NSX-T Manager password. - * + * * @return the nsxtPassword value. */ String nsxtPassword(); /** * Gets the vcenterUsername property: vCenter admin username. - * + * * @return the vcenterUsername value. */ String vcenterUsername(); /** * Gets the vcenterPassword property: vCenter admin password. - * + * * @return the vcenterPassword value. */ String vcenterPassword(); /** * Gets the inner com.azure.resourcemanager.avs.fluent.models.AdminCredentialsInner object. - * + * * @return the inner object. */ AdminCredentialsInner innerModel(); diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/AffinityStrength.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/AffinityStrength.java index 7516139f3feff..217e465e05867 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/AffinityStrength.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/AffinityStrength.java @@ -8,17 +8,23 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** VM-Host placement policy affinity strength (should/must). */ +/** + * Affinity Strength. + */ public final class AffinityStrength extends ExpandableStringEnum { - /** Static value Should for AffinityStrength. */ + /** + * Static value Should for AffinityStrength. + */ public static final AffinityStrength SHOULD = fromString("Should"); - /** Static value Must for AffinityStrength. */ + /** + * Static value Must for AffinityStrength. + */ public static final AffinityStrength MUST = fromString("Must"); /** * Creates a new instance of AffinityStrength value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -27,7 +33,7 @@ public AffinityStrength() { /** * Creates or finds a AffinityStrength from its string representation. - * + * * @param name a name to look for. * @return the corresponding AffinityStrength. */ @@ -38,7 +44,7 @@ public static AffinityStrength fromString(String name) { /** * Gets known AffinityStrength values. - * + * * @return known AffinityStrength values. */ public static Collection values() { diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/AffinityType.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/AffinityType.java index 7e918dde4c640..8fb4d14ab3e07 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/AffinityType.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/AffinityType.java @@ -8,17 +8,23 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Placement policy affinity type. */ +/** + * Affinity type. + */ public final class AffinityType extends ExpandableStringEnum { - /** Static value Affinity for AffinityType. */ + /** + * Static value Affinity for AffinityType. + */ public static final AffinityType AFFINITY = fromString("Affinity"); - /** Static value AntiAffinity for AffinityType. */ + /** + * Static value AntiAffinity for AffinityType. + */ public static final AffinityType ANTI_AFFINITY = fromString("AntiAffinity"); /** * Creates a new instance of AffinityType value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -27,7 +33,7 @@ public AffinityType() { /** * Creates or finds a AffinityType from its string representation. - * + * * @param name a name to look for. * @return the corresponding AffinityType. */ @@ -38,7 +44,7 @@ public static AffinityType fromString(String name) { /** * Gets known AffinityType values. - * + * * @return known AffinityType values. */ public static Collection values() { diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/Authorizations.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/Authorizations.java index 5ad49c3b81471..94608027c3b71 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/Authorizations.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/Authorizations.java @@ -8,67 +8,71 @@ import com.azure.core.http.rest.Response; import com.azure.core.util.Context; -/** Resource collection API of Authorizations. */ +/** + * Resource collection API of Authorizations. + */ public interface Authorizations { /** - * List ExpressRoute Circuit Authorizations in a private cloud. - * + * List ExpressRouteAuthorization resources by PrivateCloud. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. * @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 a paged list of ExpressRoute Circuit Authorizations as paginated response with {@link PagedIterable}. + * @return the response of a ExpressRouteAuthorization list operation as paginated response with + * {@link PagedIterable}. */ PagedIterable list(String resourceGroupName, String privateCloudName); /** - * List ExpressRoute Circuit Authorizations in a private cloud. - * + * List ExpressRouteAuthorization resources by PrivateCloud. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. * @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 a paged list of ExpressRoute Circuit Authorizations as paginated response with {@link PagedIterable}. + * @return the response of a ExpressRouteAuthorization list operation as paginated response with + * {@link PagedIterable}. */ PagedIterable list(String resourceGroupName, String privateCloudName, Context context); /** - * Get an ExpressRoute Circuit Authorization by name in a private cloud. - * + * Get a ExpressRouteAuthorization. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param authorizationName Name of the ExpressRoute Circuit Authorization in the private cloud. + * @param authorizationName Name of the ExpressRoute Circuit Authorization. * @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 an ExpressRoute Circuit Authorization by name in a private cloud along with {@link Response}. + * @return a ExpressRouteAuthorization along with {@link Response}. */ - Response getWithResponse( - String resourceGroupName, String privateCloudName, String authorizationName, Context context); + Response getWithResponse(String resourceGroupName, String privateCloudName, + String authorizationName, Context context); /** - * Get an ExpressRoute Circuit Authorization by name in a private cloud. - * + * Get a ExpressRouteAuthorization. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param authorizationName Name of the ExpressRoute Circuit Authorization in the private cloud. + * @param authorizationName Name of the ExpressRoute Circuit Authorization. * @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 an ExpressRoute Circuit Authorization by name in a private cloud. + * @return a ExpressRouteAuthorization. */ ExpressRouteAuthorization get(String resourceGroupName, String privateCloudName, String authorizationName); /** - * Delete an ExpressRoute Circuit Authorization in a private cloud. - * + * Delete a ExpressRouteAuthorization. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param authorizationName Name of the ExpressRoute Circuit Authorization in the private cloud. + * @param authorizationName Name of the ExpressRoute Circuit Authorization. * @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. @@ -76,11 +80,11 @@ Response getWithResponse( void delete(String resourceGroupName, String privateCloudName, String authorizationName); /** - * Delete an ExpressRoute Circuit Authorization in a private cloud. - * + * Delete a ExpressRouteAuthorization. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param authorizationName Name of the ExpressRoute Circuit Authorization in the private cloud. + * @param authorizationName Name of the ExpressRoute Circuit Authorization. * @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. @@ -89,31 +93,31 @@ Response getWithResponse( void delete(String resourceGroupName, String privateCloudName, String authorizationName, Context context); /** - * Get an ExpressRoute Circuit Authorization by name in a private cloud. - * + * Get a ExpressRouteAuthorization. + * * @param id the resource ID. * @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 an ExpressRoute Circuit Authorization by name in a private cloud along with {@link Response}. + * @return a ExpressRouteAuthorization along with {@link Response}. */ ExpressRouteAuthorization getById(String id); /** - * Get an ExpressRoute Circuit Authorization by name in a private cloud. - * + * Get a ExpressRouteAuthorization. + * * @param id the resource ID. * @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 an ExpressRoute Circuit Authorization by name in a private cloud along with {@link Response}. + * @return a ExpressRouteAuthorization along with {@link Response}. */ Response getByIdWithResponse(String id, Context context); /** - * Delete an ExpressRoute Circuit Authorization in a private cloud. - * + * Delete a ExpressRouteAuthorization. + * * @param id the resource ID. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -122,8 +126,8 @@ Response getWithResponse( void deleteById(String id); /** - * Delete an ExpressRoute Circuit Authorization in a private cloud. - * + * Delete a ExpressRouteAuthorization. + * * @param id the resource ID. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -134,7 +138,7 @@ Response getWithResponse( /** * Begins definition for a new ExpressRouteAuthorization resource. - * + * * @param name resource name. * @return the first stage of the new ExpressRouteAuthorization definition. */ diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/AvailabilityProperties.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/AvailabilityProperties.java index c1f9a63e202c5..332abcfef7370 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/AvailabilityProperties.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/AvailabilityProperties.java @@ -7,7 +7,9 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; -/** The properties describing private cloud availability zone distribution. */ +/** + * The properties describing private cloud availability zone distribution. + */ @Fluent public final class AvailabilityProperties { /* @@ -28,13 +30,15 @@ public final class AvailabilityProperties { @JsonProperty(value = "secondaryZone") private Integer secondaryZone; - /** Creates an instance of AvailabilityProperties class. */ + /** + * Creates an instance of AvailabilityProperties class. + */ public AvailabilityProperties() { } /** * Get the strategy property: The availability strategy for the private cloud. - * + * * @return the strategy value. */ public AvailabilityStrategy strategy() { @@ -43,7 +47,7 @@ public AvailabilityStrategy strategy() { /** * Set the strategy property: The availability strategy for the private cloud. - * + * * @param strategy the strategy value to set. * @return the AvailabilityProperties object itself. */ @@ -54,7 +58,7 @@ public AvailabilityProperties withStrategy(AvailabilityStrategy strategy) { /** * Get the zone property: The primary availability zone for the private cloud. - * + * * @return the zone value. */ public Integer zone() { @@ -63,7 +67,7 @@ public Integer zone() { /** * Set the zone property: The primary availability zone for the private cloud. - * + * * @param zone the zone value to set. * @return the AvailabilityProperties object itself. */ @@ -74,7 +78,7 @@ public AvailabilityProperties withZone(Integer zone) { /** * Get the secondaryZone property: The secondary availability zone for the private cloud. - * + * * @return the secondaryZone value. */ public Integer secondaryZone() { @@ -83,7 +87,7 @@ public Integer secondaryZone() { /** * Set the secondaryZone property: The secondary availability zone for the private cloud. - * + * * @param secondaryZone the secondaryZone value to set. * @return the AvailabilityProperties object itself. */ @@ -94,7 +98,7 @@ public AvailabilityProperties withSecondaryZone(Integer secondaryZone) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/AvailabilityStrategy.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/AvailabilityStrategy.java index 65177e6afdc1b..e0d52c3625d2c 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/AvailabilityStrategy.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/AvailabilityStrategy.java @@ -8,17 +8,23 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** The availability strategy for the private cloud. */ +/** + * Whether the private clouds is available in a single zone or two zones. + */ public final class AvailabilityStrategy extends ExpandableStringEnum { - /** Static value SingleZone for AvailabilityStrategy. */ + /** + * Static value SingleZone for AvailabilityStrategy. + */ public static final AvailabilityStrategy SINGLE_ZONE = fromString("SingleZone"); - /** Static value DualZone for AvailabilityStrategy. */ + /** + * Static value DualZone for AvailabilityStrategy. + */ public static final AvailabilityStrategy DUAL_ZONE = fromString("DualZone"); /** * Creates a new instance of AvailabilityStrategy value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -27,7 +33,7 @@ public AvailabilityStrategy() { /** * Creates or finds a AvailabilityStrategy from its string representation. - * + * * @param name a name to look for. * @return the corresponding AvailabilityStrategy. */ @@ -38,7 +44,7 @@ public static AvailabilityStrategy fromString(String name) { /** * Gets known AvailabilityStrategy values. - * + * * @return known AvailabilityStrategy values. */ public static Collection values() { diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/AzureHybridBenefitType.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/AzureHybridBenefitType.java index 7de79deb10e31..1a5696dae4647 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/AzureHybridBenefitType.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/AzureHybridBenefitType.java @@ -8,17 +8,23 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Placement policy hosts opt-in Azure Hybrid Benefit type. */ +/** + * Azure Hybrid Benefit type. + */ public final class AzureHybridBenefitType extends ExpandableStringEnum { - /** Static value SqlHost for AzureHybridBenefitType. */ + /** + * Static value SqlHost for AzureHybridBenefitType. + */ public static final AzureHybridBenefitType SQL_HOST = fromString("SqlHost"); - /** Static value None for AzureHybridBenefitType. */ + /** + * Static value None for AzureHybridBenefitType. + */ public static final AzureHybridBenefitType NONE = fromString("None"); /** * Creates a new instance of AzureHybridBenefitType value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -27,7 +33,7 @@ public AzureHybridBenefitType() { /** * Creates or finds a AzureHybridBenefitType from its string representation. - * + * * @param name a name to look for. * @return the corresponding AzureHybridBenefitType. */ @@ -38,7 +44,7 @@ public static AzureHybridBenefitType fromString(String name) { /** * Gets known AzureHybridBenefitType values. - * + * * @return known AzureHybridBenefitType values. */ public static Collection values() { diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/Circuit.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/Circuit.java index c2754622da1a2..d81bec91d5000 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/Circuit.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/Circuit.java @@ -7,7 +7,9 @@ import com.azure.core.annotation.Immutable; import com.fasterxml.jackson.annotation.JsonProperty; -/** An ExpressRoute Circuit. */ +/** + * An ExpressRoute Circuit. + */ @Immutable public final class Circuit { /* @@ -34,13 +36,15 @@ public final class Circuit { @JsonProperty(value = "expressRoutePrivatePeeringID", access = JsonProperty.Access.WRITE_ONLY) private String expressRoutePrivatePeeringId; - /** Creates an instance of Circuit class. */ + /** + * Creates an instance of Circuit class. + */ public Circuit() { } /** * Get the primarySubnet property: CIDR of primary subnet. - * + * * @return the primarySubnet value. */ public String primarySubnet() { @@ -49,7 +53,7 @@ public String primarySubnet() { /** * Get the secondarySubnet property: CIDR of secondary subnet. - * + * * @return the secondarySubnet value. */ public String secondarySubnet() { @@ -58,7 +62,7 @@ public String secondarySubnet() { /** * Get the expressRouteId property: Identifier of the ExpressRoute Circuit (Microsoft Colo only). - * + * * @return the expressRouteId value. */ public String expressRouteId() { @@ -67,7 +71,7 @@ public String expressRouteId() { /** * Get the expressRoutePrivatePeeringId property: ExpressRoute Circuit private peering identifier. - * + * * @return the expressRoutePrivatePeeringId value. */ public String expressRoutePrivatePeeringId() { @@ -76,7 +80,7 @@ public String expressRoutePrivatePeeringId() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/CloudLink.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/CloudLink.java index 29233605b78f3..13eae37964b90 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/CloudLink.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/CloudLink.java @@ -4,78 +4,103 @@ package com.azure.resourcemanager.avs.models; +import com.azure.core.management.SystemData; import com.azure.core.util.Context; import com.azure.resourcemanager.avs.fluent.models.CloudLinkInner; -/** An immutable client-side representation of CloudLink. */ +/** + * An immutable client-side representation of CloudLink. + */ public interface CloudLink { /** * Gets the id property: Fully qualified resource Id for the resource. - * + * * @return the id value. */ String id(); /** * Gets the name property: The name of the resource. - * + * * @return the name value. */ String name(); /** * Gets the type property: The type of the resource. - * + * * @return the type value. */ String type(); + /** + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + SystemData systemData(); + + /** + * Gets the provisioningState property: The provisioning state of the resource. + * + * @return the provisioningState value. + */ + CloudLinkProvisioningState provisioningState(); + /** * Gets the status property: The state of the cloud link. - * + * * @return the status value. */ CloudLinkStatus status(); /** * Gets the linkedCloud property: Identifier of the other private cloud participating in the link. - * + * * @return the linkedCloud value. */ String linkedCloud(); /** * Gets the name of the resource group. - * + * * @return the name of the resource group. */ String resourceGroupName(); /** * Gets the inner com.azure.resourcemanager.avs.fluent.models.CloudLinkInner object. - * + * * @return the inner object. */ CloudLinkInner innerModel(); - /** The entirety of the CloudLink definition. */ + /** + * The entirety of the CloudLink definition. + */ interface Definition extends DefinitionStages.Blank, DefinitionStages.WithParentResource, DefinitionStages.WithCreate { } - /** The CloudLink definition stages. */ + /** + * The CloudLink definition stages. + */ interface DefinitionStages { - /** The first stage of the CloudLink definition. */ + /** + * The first stage of the CloudLink definition. + */ interface Blank extends WithParentResource { } - /** The stage of the CloudLink definition allowing to specify parent resource. */ + /** + * The stage of the CloudLink definition allowing to specify parent resource. + */ interface WithParentResource { /** * Specifies resourceGroupName, privateCloudName. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName The name of the private cloud. + * @param privateCloudName Name of the private cloud. * @return the next definition stage. */ WithCreate withExistingPrivateCloud(String resourceGroupName, String privateCloudName); @@ -88,25 +113,27 @@ interface WithParentResource { interface WithCreate extends DefinitionStages.WithLinkedCloud { /** * Executes the create request. - * + * * @return the created resource. */ CloudLink create(); /** * Executes the create request. - * + * * @param context The context to associate with this operation. * @return the created resource. */ CloudLink create(Context context); } - /** The stage of the CloudLink definition allowing to specify linkedCloud. */ + /** + * The stage of the CloudLink definition allowing to specify linkedCloud. + */ interface WithLinkedCloud { /** * Specifies the linkedCloud property: Identifier of the other private cloud participating in the link.. - * + * * @param linkedCloud Identifier of the other private cloud participating in the link. * @return the next definition stage. */ @@ -116,36 +143,42 @@ interface WithLinkedCloud { /** * Begins update for the CloudLink resource. - * + * * @return the stage of resource update. */ CloudLink.Update update(); - /** The template for CloudLink update. */ + /** + * The template for CloudLink update. + */ interface Update extends UpdateStages.WithLinkedCloud { /** * Executes the update request. - * + * * @return the updated resource. */ CloudLink apply(); /** * Executes the update request. - * + * * @param context The context to associate with this operation. * @return the updated resource. */ CloudLink apply(Context context); } - /** The CloudLink update stages. */ + /** + * The CloudLink update stages. + */ interface UpdateStages { - /** The stage of the CloudLink update allowing to specify linkedCloud. */ + /** + * The stage of the CloudLink update allowing to specify linkedCloud. + */ interface WithLinkedCloud { /** * Specifies the linkedCloud property: Identifier of the other private cloud participating in the link.. - * + * * @param linkedCloud Identifier of the other private cloud participating in the link. * @return the next definition stage. */ @@ -155,14 +188,14 @@ interface WithLinkedCloud { /** * Refreshes the resource to sync with Azure. - * + * * @return the refreshed resource. */ CloudLink refresh(); /** * Refreshes the resource to sync with Azure. - * + * * @param context The context to associate with this operation. * @return the refreshed resource. */ diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/CloudLinkList.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/CloudLinkList.java deleted file mode 100644 index 0a50fa8b50c87..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/CloudLinkList.java +++ /dev/null @@ -1,59 +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.avs.models; - -import com.azure.core.annotation.Immutable; -import com.azure.resourcemanager.avs.fluent.models.CloudLinkInner; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** A paged list of cloud links. */ -@Immutable -public final class CloudLinkList { - /* - * The items on a page - */ - @JsonProperty(value = "value", access = JsonProperty.Access.WRITE_ONLY) - private List value; - - /* - * URL to get the next page if any - */ - @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) - private String nextLink; - - /** Creates an instance of CloudLinkList class. */ - public CloudLinkList() { - } - - /** - * Get the value property: The items on a page. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Get the nextLink property: URL to get the next page if 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/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/CloudLinkListResult.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/CloudLinkListResult.java new file mode 100644 index 0000000000000..48a32e2c2dc0a --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/CloudLinkListResult.java @@ -0,0 +1,80 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.avs.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.avs.fluent.models.CloudLinkInner; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** + * The response of a CloudLink list operation. + */ +@Fluent +public final class CloudLinkListResult { + /* + * The CloudLink items on this page + */ + @JsonProperty(value = "value", required = true) + private List value; + + /* + * The link to the next page of items + */ + @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) + private String nextLink; + + /** + * Creates an instance of CloudLinkListResult class. + */ + public CloudLinkListResult() { + } + + /** + * Get the value property: The CloudLink items on this page. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Set the value property: The CloudLink items on this page. + * + * @param value the value value to set. + * @return the CloudLinkListResult object itself. + */ + public CloudLinkListResult withValue(List value) { + this.value = value; + return this; + } + + /** + * Get the nextLink property: The link to the next page of items. + * + * @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) { + throw LOGGER.logExceptionAsError( + new IllegalArgumentException("Missing required property value in model CloudLinkListResult")); + } else { + value().forEach(e -> e.validate()); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(CloudLinkListResult.class); +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/CloudLinkProvisioningState.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/CloudLinkProvisioningState.java new file mode 100644 index 0000000000000..45328f2a22765 --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/CloudLinkProvisioningState.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.avs.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** + * cloud link provisioning state. + */ +public final class CloudLinkProvisioningState extends ExpandableStringEnum { + /** + * Static value Succeeded for CloudLinkProvisioningState. + */ + public static final CloudLinkProvisioningState SUCCEEDED = fromString("Succeeded"); + + /** + * Static value Failed for CloudLinkProvisioningState. + */ + public static final CloudLinkProvisioningState FAILED = fromString("Failed"); + + /** + * Static value Canceled for CloudLinkProvisioningState. + */ + public static final CloudLinkProvisioningState CANCELED = fromString("Canceled"); + + /** + * Creates a new instance of CloudLinkProvisioningState value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public CloudLinkProvisioningState() { + } + + /** + * Creates or finds a CloudLinkProvisioningState from its string representation. + * + * @param name a name to look for. + * @return the corresponding CloudLinkProvisioningState. + */ + @JsonCreator + public static CloudLinkProvisioningState fromString(String name) { + return fromString(name, CloudLinkProvisioningState.class); + } + + /** + * Gets known CloudLinkProvisioningState values. + * + * @return known CloudLinkProvisioningState values. + */ + public static Collection values() { + return values(CloudLinkProvisioningState.class); + } +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/CloudLinkStatus.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/CloudLinkStatus.java index a4d109073518e..0752c79ff43fb 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/CloudLinkStatus.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/CloudLinkStatus.java @@ -8,26 +8,38 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** The state of the cloud link. */ +/** + * Cloud Link status. + */ public final class CloudLinkStatus extends ExpandableStringEnum { - /** Static value Active for CloudLinkStatus. */ + /** + * Static value Active for CloudLinkStatus. + */ public static final CloudLinkStatus ACTIVE = fromString("Active"); - /** Static value Building for CloudLinkStatus. */ + /** + * Static value Building for CloudLinkStatus. + */ public static final CloudLinkStatus BUILDING = fromString("Building"); - /** Static value Deleting for CloudLinkStatus. */ + /** + * Static value Deleting for CloudLinkStatus. + */ public static final CloudLinkStatus DELETING = fromString("Deleting"); - /** Static value Failed for CloudLinkStatus. */ + /** + * Static value Failed for CloudLinkStatus. + */ public static final CloudLinkStatus FAILED = fromString("Failed"); - /** Static value Disconnected for CloudLinkStatus. */ + /** + * Static value Disconnected for CloudLinkStatus. + */ public static final CloudLinkStatus DISCONNECTED = fromString("Disconnected"); /** * Creates a new instance of CloudLinkStatus value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -36,7 +48,7 @@ public CloudLinkStatus() { /** * Creates or finds a CloudLinkStatus from its string representation. - * + * * @param name a name to look for. * @return the corresponding CloudLinkStatus. */ @@ -47,7 +59,7 @@ public static CloudLinkStatus fromString(String name) { /** * Gets known CloudLinkStatus values. - * + * * @return known CloudLinkStatus values. */ public static Collection values() { diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/CloudLinks.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/CloudLinks.java index bd7761b6b158b..6f5c96ad6b279 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/CloudLinks.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/CloudLinks.java @@ -8,67 +8,69 @@ import com.azure.core.http.rest.Response; import com.azure.core.util.Context; -/** Resource collection API of CloudLinks. */ +/** + * Resource collection API of CloudLinks. + */ public interface CloudLinks { /** - * List cloud link in a private cloud. - * + * List CloudLink resources by PrivateCloud. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. * @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 a paged list of cloud links as paginated response with {@link PagedIterable}. + * @return the response of a CloudLink list operation as paginated response with {@link PagedIterable}. */ PagedIterable list(String resourceGroupName, String privateCloudName); /** - * List cloud link in a private cloud. - * + * List CloudLink resources by PrivateCloud. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. * @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 a paged list of cloud links as paginated response with {@link PagedIterable}. + * @return the response of a CloudLink list operation as paginated response with {@link PagedIterable}. */ PagedIterable list(String resourceGroupName, String privateCloudName, Context context); /** - * Get an cloud link by name in a private cloud. - * + * Get a CloudLink. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param cloudLinkName Name of the cloud link resource. + * @param cloudLinkName Name of the cloud link. * @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 an cloud link by name in a private cloud along with {@link Response}. + * @return a CloudLink along with {@link Response}. */ - Response getWithResponse( - String resourceGroupName, String privateCloudName, String cloudLinkName, Context context); + Response getWithResponse(String resourceGroupName, String privateCloudName, String cloudLinkName, + Context context); /** - * Get an cloud link by name in a private cloud. - * + * Get a CloudLink. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param cloudLinkName Name of the cloud link resource. + * @param cloudLinkName Name of the cloud link. * @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 an cloud link by name in a private cloud. + * @return a CloudLink. */ CloudLink get(String resourceGroupName, String privateCloudName, String cloudLinkName); /** - * Delete a cloud link in a private cloud. - * + * Delete a CloudLink. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param cloudLinkName Name of the cloud link resource. + * @param cloudLinkName Name of the cloud link. * @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. @@ -76,11 +78,11 @@ Response getWithResponse( void delete(String resourceGroupName, String privateCloudName, String cloudLinkName); /** - * Delete a cloud link in a private cloud. - * + * Delete a CloudLink. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param cloudLinkName Name of the cloud link resource. + * @param cloudLinkName Name of the cloud link. * @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. @@ -89,31 +91,31 @@ Response getWithResponse( void delete(String resourceGroupName, String privateCloudName, String cloudLinkName, Context context); /** - * Get an cloud link by name in a private cloud. - * + * Get a CloudLink. + * * @param id the resource ID. * @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 an cloud link by name in a private cloud along with {@link Response}. + * @return a CloudLink along with {@link Response}. */ CloudLink getById(String id); /** - * Get an cloud link by name in a private cloud. - * + * Get a CloudLink. + * * @param id the resource ID. * @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 an cloud link by name in a private cloud along with {@link Response}. + * @return a CloudLink along with {@link Response}. */ Response getByIdWithResponse(String id, Context context); /** - * Delete a cloud link in a private cloud. - * + * Delete a CloudLink. + * * @param id the resource ID. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -122,8 +124,8 @@ Response getWithResponse( void deleteById(String id); /** - * Delete a cloud link in a private cloud. - * + * Delete a CloudLink. + * * @param id the resource ID. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -134,7 +136,7 @@ Response getWithResponse( /** * Begins definition for a new CloudLink resource. - * + * * @param name resource name. * @return the first stage of the new CloudLink definition. */ diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/Cluster.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/Cluster.java index 7a37a868ef3e6..a925e2ab724f0 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/Cluster.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/Cluster.java @@ -5,114 +5,138 @@ package com.azure.resourcemanager.avs.models; import com.azure.core.http.rest.Response; +import com.azure.core.management.SystemData; import com.azure.core.util.Context; import com.azure.resourcemanager.avs.fluent.models.ClusterInner; import java.util.List; -/** An immutable client-side representation of Cluster. */ +/** + * An immutable client-side representation of Cluster. + */ public interface Cluster { /** * Gets the id property: Fully qualified resource Id for the resource. - * + * * @return the id value. */ String id(); /** * Gets the name property: The name of the resource. - * + * * @return the name value. */ String name(); /** * Gets the type property: The type of the resource. - * + * * @return the type value. */ String type(); /** - * Gets the sku property: The cluster SKU. - * + * Gets the sku property: The SKU (Stock Keeping Unit) assigned to this resource. + * * @return the sku value. */ Sku sku(); + /** + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + SystemData systemData(); + /** * Gets the clusterSize property: The cluster size. - * + * * @return the clusterSize value. */ Integer clusterSize(); /** * Gets the provisioningState property: The state of the cluster provisioning. - * + * * @return the provisioningState value. */ ClusterProvisioningState provisioningState(); /** * Gets the clusterId property: The identity. - * + * * @return the clusterId value. */ Integer clusterId(); /** * Gets the hosts property: The hosts. - * + * * @return the hosts value. */ List hosts(); + /** + * Gets the vsanDatastoreName property: Name of the vsan datastore associated with the cluster. + * + * @return the vsanDatastoreName value. + */ + String vsanDatastoreName(); + /** * Gets the name of the resource group. - * + * * @return the name of the resource group. */ String resourceGroupName(); /** * Gets the inner com.azure.resourcemanager.avs.fluent.models.ClusterInner object. - * + * * @return the inner object. */ ClusterInner innerModel(); - /** The entirety of the Cluster definition. */ - interface Definition - extends DefinitionStages.Blank, - DefinitionStages.WithParentResource, - DefinitionStages.WithSku, - DefinitionStages.WithCreate { + /** + * The entirety of the Cluster definition. + */ + interface Definition extends DefinitionStages.Blank, DefinitionStages.WithParentResource, DefinitionStages.WithSku, + DefinitionStages.WithCreate { } - /** The Cluster definition stages. */ + /** + * The Cluster definition stages. + */ interface DefinitionStages { - /** The first stage of the Cluster definition. */ + /** + * The first stage of the Cluster definition. + */ interface Blank extends WithParentResource { } - /** The stage of the Cluster definition allowing to specify parent resource. */ + /** + * The stage of the Cluster definition allowing to specify parent resource. + */ interface WithParentResource { /** * Specifies resourceGroupName, privateCloudName. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName The name of the private cloud. + * @param privateCloudName Name of the private cloud. * @return the next definition stage. */ WithSku withExistingPrivateCloud(String resourceGroupName, String privateCloudName); } - /** The stage of the Cluster definition allowing to specify sku. */ + /** + * The stage of the Cluster definition allowing to specify sku. + */ interface WithSku { /** - * Specifies the sku property: The cluster SKU. - * - * @param sku The cluster SKU. + * Specifies the sku property: The SKU (Stock Keeping Unit) assigned to this resource.. + * + * @param sku The SKU (Stock Keeping Unit) assigned to this resource. * @return the next definition stage. */ WithCreate withSku(Sku sku); @@ -122,89 +146,128 @@ interface WithSku { * The stage of the Cluster definition which contains all the minimum required properties for the resource to be * created, but also allows for any other optional properties to be specified. */ - interface WithCreate extends DefinitionStages.WithClusterSize, DefinitionStages.WithHosts { + interface WithCreate extends DefinitionStages.WithClusterSize, DefinitionStages.WithHosts, + DefinitionStages.WithVsanDatastoreName { /** * Executes the create request. - * + * * @return the created resource. */ Cluster create(); /** * Executes the create request. - * + * * @param context The context to associate with this operation. * @return the created resource. */ Cluster create(Context context); } - /** The stage of the Cluster definition allowing to specify clusterSize. */ + /** + * The stage of the Cluster definition allowing to specify clusterSize. + */ interface WithClusterSize { /** * Specifies the clusterSize property: The cluster size. - * + * * @param clusterSize The cluster size. * @return the next definition stage. */ WithCreate withClusterSize(Integer clusterSize); } - /** The stage of the Cluster definition allowing to specify hosts. */ + /** + * The stage of the Cluster definition allowing to specify hosts. + */ interface WithHosts { /** * Specifies the hosts property: The hosts. - * + * * @param hosts The hosts. * @return the next definition stage. */ WithCreate withHosts(List hosts); } + + /** + * The stage of the Cluster definition allowing to specify vsanDatastoreName. + */ + interface WithVsanDatastoreName { + /** + * Specifies the vsanDatastoreName property: Name of the vsan datastore associated with the cluster. + * + * @param vsanDatastoreName Name of the vsan datastore associated with the cluster. + * @return the next definition stage. + */ + WithCreate withVsanDatastoreName(String vsanDatastoreName); + } } /** * Begins update for the Cluster resource. - * + * * @return the stage of resource update. */ Cluster.Update update(); - /** The template for Cluster update. */ - interface Update extends UpdateStages.WithClusterSize, UpdateStages.WithHosts { + /** + * The template for Cluster update. + */ + interface Update extends UpdateStages.WithSku, UpdateStages.WithClusterSize, UpdateStages.WithHosts { /** * Executes the update request. - * + * * @return the updated resource. */ Cluster apply(); /** * Executes the update request. - * + * * @param context The context to associate with this operation. * @return the updated resource. */ Cluster apply(Context context); } - /** The Cluster update stages. */ + /** + * The Cluster update stages. + */ interface UpdateStages { - /** The stage of the Cluster update allowing to specify clusterSize. */ + /** + * The stage of the Cluster update allowing to specify sku. + */ + interface WithSku { + /** + * Specifies the sku property: The SKU (Stock Keeping Unit) assigned to this resource.. + * + * @param sku The SKU (Stock Keeping Unit) assigned to this resource. + * @return the next definition stage. + */ + Update withSku(Sku sku); + } + + /** + * The stage of the Cluster update allowing to specify clusterSize. + */ interface WithClusterSize { /** * Specifies the clusterSize property: The cluster size. - * + * * @param clusterSize The cluster size. * @return the next definition stage. */ Update withClusterSize(Integer clusterSize); } - /** The stage of the Cluster update allowing to specify hosts. */ + /** + * The stage of the Cluster update allowing to specify hosts. + */ interface WithHosts { /** * Specifies the hosts property: The hosts. - * + * * @param hosts The hosts. * @return the next definition stage. */ @@ -214,14 +277,14 @@ interface WithHosts { /** * Refreshes the resource to sync with Azure. - * + * * @return the refreshed resource. */ Cluster refresh(); /** * Refreshes the resource to sync with Azure. - * + * * @param context The context to associate with this operation. * @return the refreshed resource. */ @@ -229,7 +292,7 @@ interface WithHosts { /** * List hosts by zone in a cluster. - * + * * @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. @@ -240,7 +303,7 @@ interface WithHosts { /** * List hosts by zone in a cluster. - * + * * @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 all zones and associated hosts for a cluster. diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ClusterList.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ClusterList.java deleted file mode 100644 index 698ec28a47053..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ClusterList.java +++ /dev/null @@ -1,59 +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.avs.models; - -import com.azure.core.annotation.Immutable; -import com.azure.resourcemanager.avs.fluent.models.ClusterInner; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** A paged list of clusters. */ -@Immutable -public final class ClusterList { - /* - * The items on a page - */ - @JsonProperty(value = "value", access = JsonProperty.Access.WRITE_ONLY) - private List value; - - /* - * URL to get the next page if any - */ - @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) - private String nextLink; - - /** Creates an instance of ClusterList class. */ - public ClusterList() { - } - - /** - * Get the value property: The items on a page. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Get the nextLink property: URL to get the next page if 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/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ClusterListResult.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ClusterListResult.java new file mode 100644 index 0000000000000..689243af97884 --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ClusterListResult.java @@ -0,0 +1,80 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.avs.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.avs.fluent.models.ClusterInner; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** + * The response of a Cluster list operation. + */ +@Fluent +public final class ClusterListResult { + /* + * The Cluster items on this page + */ + @JsonProperty(value = "value", required = true) + private List value; + + /* + * The link to the next page of items + */ + @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) + private String nextLink; + + /** + * Creates an instance of ClusterListResult class. + */ + public ClusterListResult() { + } + + /** + * Get the value property: The Cluster items on this page. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Set the value property: The Cluster items on this page. + * + * @param value the value value to set. + * @return the ClusterListResult object itself. + */ + public ClusterListResult withValue(List value) { + this.value = value; + return this; + } + + /** + * Get the nextLink property: The link to the next page of items. + * + * @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) { + throw LOGGER.logExceptionAsError( + new IllegalArgumentException("Missing required property value in model ClusterListResult")); + } else { + value().forEach(e -> e.validate()); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(ClusterListResult.class); +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ClusterProvisioningState.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ClusterProvisioningState.java index 3101b6cec15ed..052d54d0072e6 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ClusterProvisioningState.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ClusterProvisioningState.java @@ -8,29 +8,43 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** The state of the cluster provisioning. */ +/** + * Cluster provisioning state. + */ public final class ClusterProvisioningState extends ExpandableStringEnum { - /** Static value Succeeded for ClusterProvisioningState. */ + /** + * Static value Succeeded for ClusterProvisioningState. + */ public static final ClusterProvisioningState SUCCEEDED = fromString("Succeeded"); - /** Static value Failed for ClusterProvisioningState. */ + /** + * Static value Failed for ClusterProvisioningState. + */ public static final ClusterProvisioningState FAILED = fromString("Failed"); - /** Static value Cancelled for ClusterProvisioningState. */ + /** + * Static value Canceled for ClusterProvisioningState. + */ + public static final ClusterProvisioningState CANCELED = fromString("Canceled"); + + /** + * Static value Cancelled for ClusterProvisioningState. + */ public static final ClusterProvisioningState CANCELLED = fromString("Cancelled"); - /** Static value Deleting for ClusterProvisioningState. */ + /** + * Static value Deleting for ClusterProvisioningState. + */ public static final ClusterProvisioningState DELETING = fromString("Deleting"); - /** Static value Updating for ClusterProvisioningState. */ + /** + * Static value Updating for ClusterProvisioningState. + */ public static final ClusterProvisioningState UPDATING = fromString("Updating"); - /** Static value Canceled for ClusterProvisioningState. */ - public static final ClusterProvisioningState CANCELED = fromString("Canceled"); - /** * Creates a new instance of ClusterProvisioningState value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -39,7 +53,7 @@ public ClusterProvisioningState() { /** * Creates or finds a ClusterProvisioningState from its string representation. - * + * * @param name a name to look for. * @return the corresponding ClusterProvisioningState. */ @@ -50,7 +64,7 @@ public static ClusterProvisioningState fromString(String name) { /** * Gets known ClusterProvisioningState values. - * + * * @return known ClusterProvisioningState values. */ public static Collection values() { diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ClusterUpdate.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ClusterUpdate.java index 4262fdfbb8676..494b51ba6c193 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ClusterUpdate.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ClusterUpdate.java @@ -9,22 +9,52 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** An update of a cluster resource. */ +/** + * An update of a cluster resource. + */ @Fluent public final class ClusterUpdate { + /* + * The SKU (Stock Keeping Unit) assigned to this resource. + */ + @JsonProperty(value = "sku") + private Sku sku; + /* * The properties of a cluster resource that may be updated */ @JsonProperty(value = "properties") private ClusterUpdateProperties innerProperties; - /** Creates an instance of ClusterUpdate class. */ + /** + * Creates an instance of ClusterUpdate class. + */ public ClusterUpdate() { } + /** + * Get the sku property: The SKU (Stock Keeping Unit) assigned to this resource. + * + * @return the sku value. + */ + public Sku sku() { + return this.sku; + } + + /** + * Set the sku property: The SKU (Stock Keeping Unit) assigned to this resource. + * + * @param sku the sku value to set. + * @return the ClusterUpdate object itself. + */ + public ClusterUpdate withSku(Sku sku) { + this.sku = sku; + return this; + } + /** * Get the innerProperties property: The properties of a cluster resource that may be updated. - * + * * @return the innerProperties value. */ private ClusterUpdateProperties innerProperties() { @@ -33,7 +63,7 @@ private ClusterUpdateProperties innerProperties() { /** * Get the clusterSize property: The cluster size. - * + * * @return the clusterSize value. */ public Integer clusterSize() { @@ -42,7 +72,7 @@ public Integer clusterSize() { /** * Set the clusterSize property: The cluster size. - * + * * @param clusterSize the clusterSize value to set. * @return the ClusterUpdate object itself. */ @@ -56,7 +86,7 @@ public ClusterUpdate withClusterSize(Integer clusterSize) { /** * Get the hosts property: The hosts. - * + * * @return the hosts value. */ public List hosts() { @@ -65,7 +95,7 @@ public List hosts() { /** * Set the hosts property: The hosts. - * + * * @param hosts the hosts value to set. * @return the ClusterUpdate object itself. */ @@ -79,10 +109,13 @@ public ClusterUpdate withHosts(List hosts) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { + if (sku() != null) { + sku().validate(); + } if (innerProperties() != null) { innerProperties().validate(); } diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ClusterZone.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ClusterZone.java index 7d1dcfc2aba50..671fe7314d7c1 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ClusterZone.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ClusterZone.java @@ -8,7 +8,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** Zone and associated hosts info. */ +/** + * Zone and associated hosts info. + */ @Immutable public final class ClusterZone { /* @@ -23,13 +25,15 @@ public final class ClusterZone { @JsonProperty(value = "zone", access = JsonProperty.Access.WRITE_ONLY) private String zone; - /** Creates an instance of ClusterZone class. */ + /** + * Creates an instance of ClusterZone class. + */ public ClusterZone() { } /** * Get the hosts property: List of hosts belonging to the availability zone in a cluster. - * + * * @return the hosts value. */ public List hosts() { @@ -38,7 +42,7 @@ public List hosts() { /** * Get the zone property: Availability zone identifier. - * + * * @return the zone value. */ public String zone() { @@ -47,7 +51,7 @@ public String zone() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ClusterZoneList.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ClusterZoneList.java index eb2a3d1a71b2a..350233c2ef309 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ClusterZoneList.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ClusterZoneList.java @@ -7,18 +7,20 @@ import com.azure.resourcemanager.avs.fluent.models.ClusterZoneListInner; import java.util.List; -/** An immutable client-side representation of ClusterZoneList. */ +/** + * An immutable client-side representation of ClusterZoneList. + */ public interface ClusterZoneList { /** * Gets the zones property: Zone and associated hosts info. - * + * * @return the zones value. */ List zones(); /** * Gets the inner com.azure.resourcemanager.avs.fluent.models.ClusterZoneListInner object. - * + * * @return the inner object. */ ClusterZoneListInner innerModel(); diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/Clusters.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/Clusters.java index d6132d16b850e..aa02399e9eb49 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/Clusters.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/Clusters.java @@ -8,67 +8,69 @@ import com.azure.core.http.rest.Response; import com.azure.core.util.Context; -/** Resource collection API of Clusters. */ +/** + * Resource collection API of Clusters. + */ public interface Clusters { /** - * List clusters in a private cloud. - * + * List Cluster resources by PrivateCloud. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. * @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 a paged list of clusters as paginated response with {@link PagedIterable}. + * @return the response of a Cluster list operation as paginated response with {@link PagedIterable}. */ PagedIterable list(String resourceGroupName, String privateCloudName); /** - * List clusters in a private cloud. - * + * List Cluster resources by PrivateCloud. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. * @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 a paged list of clusters as paginated response with {@link PagedIterable}. + * @return the response of a Cluster list operation as paginated response with {@link PagedIterable}. */ PagedIterable list(String resourceGroupName, String privateCloudName, Context context); /** - * Get a cluster by name in a private cloud. - * + * Get a Cluster. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param clusterName Name of the cluster in the private cloud. + * @param clusterName Name of the cluster. * @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 a cluster by name in a private cloud along with {@link Response}. + * @return a Cluster along with {@link Response}. */ - Response getWithResponse( - String resourceGroupName, String privateCloudName, String clusterName, Context context); + Response getWithResponse(String resourceGroupName, String privateCloudName, String clusterName, + Context context); /** - * Get a cluster by name in a private cloud. - * + * Get a Cluster. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param clusterName Name of the cluster in the private cloud. + * @param clusterName Name of the cluster. * @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 a cluster by name in a private cloud. + * @return a Cluster. */ Cluster get(String resourceGroupName, String privateCloudName, String clusterName); /** - * Delete a cluster in a private cloud. - * + * Delete a Cluster. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param clusterName Name of the cluster in the private cloud. + * @param clusterName Name of the cluster. * @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. @@ -76,11 +78,11 @@ Response getWithResponse( void delete(String resourceGroupName, String privateCloudName, String clusterName); /** - * Delete a cluster in a private cloud. - * + * Delete a Cluster. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param clusterName Name of the cluster in the private cloud. + * @param clusterName Name of the cluster. * @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. @@ -90,25 +92,25 @@ Response getWithResponse( /** * List hosts by zone in a cluster. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param clusterName Name of the cluster in the private cloud. + * @param clusterName Name of the cluster. * @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 all zones and associated hosts for a cluster along with {@link Response}. */ - Response listZonesWithResponse( - String resourceGroupName, String privateCloudName, String clusterName, Context context); + Response listZonesWithResponse(String resourceGroupName, String privateCloudName, + String clusterName, Context context); /** * List hosts by zone in a cluster. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param clusterName Name of the cluster in the private cloud. + * @param clusterName Name of the cluster. * @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. @@ -117,31 +119,31 @@ Response listZonesWithResponse( ClusterZoneList listZones(String resourceGroupName, String privateCloudName, String clusterName); /** - * Get a cluster by name in a private cloud. - * + * Get a Cluster. + * * @param id the resource ID. * @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 a cluster by name in a private cloud along with {@link Response}. + * @return a Cluster along with {@link Response}. */ Cluster getById(String id); /** - * Get a cluster by name in a private cloud. - * + * Get a Cluster. + * * @param id the resource ID. * @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 a cluster by name in a private cloud along with {@link Response}. + * @return a Cluster along with {@link Response}. */ Response getByIdWithResponse(String id, Context context); /** - * Delete a cluster in a private cloud. - * + * Delete a Cluster. + * * @param id the resource ID. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -150,8 +152,8 @@ Response listZonesWithResponse( void deleteById(String id); /** - * Delete a cluster in a private cloud. - * + * Delete a Cluster. + * * @param id the resource ID. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -162,7 +164,7 @@ Response listZonesWithResponse( /** * Begins definition for a new Cluster resource. - * + * * @param name resource name. * @return the first stage of the new Cluster definition. */ diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/CommonClusterProperties.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/CommonClusterProperties.java deleted file mode 100644 index 4b007a2eb5639..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/CommonClusterProperties.java +++ /dev/null @@ -1,107 +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.avs.models; - -import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** The common properties of a cluster. */ -@Fluent -public class CommonClusterProperties { - /* - * The cluster size - */ - @JsonProperty(value = "clusterSize") - private Integer clusterSize; - - /* - * The state of the cluster provisioning - */ - @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) - private ClusterProvisioningState provisioningState; - - /* - * The identity - */ - @JsonProperty(value = "clusterId", access = JsonProperty.Access.WRITE_ONLY) - private Integer clusterId; - - /* - * The hosts - */ - @JsonProperty(value = "hosts") - private List hosts; - - /** Creates an instance of CommonClusterProperties class. */ - public CommonClusterProperties() { - } - - /** - * Get the clusterSize property: The cluster size. - * - * @return the clusterSize value. - */ - public Integer clusterSize() { - return this.clusterSize; - } - - /** - * Set the clusterSize property: The cluster size. - * - * @param clusterSize the clusterSize value to set. - * @return the CommonClusterProperties object itself. - */ - public CommonClusterProperties withClusterSize(Integer clusterSize) { - this.clusterSize = clusterSize; - return this; - } - - /** - * Get the provisioningState property: The state of the cluster provisioning. - * - * @return the provisioningState value. - */ - public ClusterProvisioningState provisioningState() { - return this.provisioningState; - } - - /** - * Get the clusterId property: The identity. - * - * @return the clusterId value. - */ - public Integer clusterId() { - return this.clusterId; - } - - /** - * Get the hosts property: The hosts. - * - * @return the hosts value. - */ - public List hosts() { - return this.hosts; - } - - /** - * Set the hosts property: The hosts. - * - * @param hosts the hosts value to set. - * @return the CommonClusterProperties object itself. - */ - public CommonClusterProperties withHosts(List hosts) { - this.hosts = hosts; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/Datastore.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/Datastore.java index 413275082b8a3..b98856d885792 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/Datastore.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/Datastore.java @@ -4,93 +4,118 @@ package com.azure.resourcemanager.avs.models; +import com.azure.core.management.SystemData; import com.azure.core.util.Context; import com.azure.resourcemanager.avs.fluent.models.DatastoreInner; -/** An immutable client-side representation of Datastore. */ +/** + * An immutable client-side representation of Datastore. + */ public interface Datastore { /** * Gets the id property: Fully qualified resource Id for the resource. - * + * * @return the id value. */ String id(); /** * Gets the name property: The name of the resource. - * + * * @return the name value. */ String name(); /** * Gets the type property: The type of the resource. - * + * * @return the type value. */ String type(); + /** + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + SystemData systemData(); + /** * Gets the provisioningState property: The state of the datastore provisioning. - * + * * @return the provisioningState value. */ DatastoreProvisioningState provisioningState(); /** * Gets the netAppVolume property: An Azure NetApp Files volume. - * + * * @return the netAppVolume value. */ NetAppVolume netAppVolume(); /** * Gets the diskPoolVolume property: An iSCSI volume. - * + * * @return the diskPoolVolume value. */ DiskPoolVolume diskPoolVolume(); + /** + * Gets the elasticSanVolume property: An Elastic SAN volume. + * + * @return the elasticSanVolume value. + */ + ElasticSanVolume elasticSanVolume(); + /** * Gets the status property: The operational status of the datastore. - * + * * @return the status value. */ DatastoreStatus status(); /** * Gets the name of the resource group. - * + * * @return the name of the resource group. */ String resourceGroupName(); /** * Gets the inner com.azure.resourcemanager.avs.fluent.models.DatastoreInner object. - * + * * @return the inner object. */ DatastoreInner innerModel(); - /** The entirety of the Datastore definition. */ + /** + * The entirety of the Datastore definition. + */ interface Definition extends DefinitionStages.Blank, DefinitionStages.WithParentResource, DefinitionStages.WithCreate { } - /** The Datastore definition stages. */ + /** + * The Datastore definition stages. + */ interface DefinitionStages { - /** The first stage of the Datastore definition. */ + /** + * The first stage of the Datastore definition. + */ interface Blank extends WithParentResource { } - /** The stage of the Datastore definition allowing to specify parent resource. */ + /** + * The stage of the Datastore definition allowing to specify parent resource. + */ interface WithParentResource { /** * Specifies resourceGroupName, privateCloudName, clusterName. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param clusterName Name of the cluster in the private cloud. + * @param clusterName Name of the cluster. * @return the next definition stage. */ WithCreate withExistingCluster(String resourceGroupName, String privateCloudName, String clusterName); @@ -100,106 +125,146 @@ interface WithParentResource { * The stage of the Datastore definition which contains all the minimum required properties for the resource to * be created, but also allows for any other optional properties to be specified. */ - interface WithCreate extends DefinitionStages.WithNetAppVolume, DefinitionStages.WithDiskPoolVolume { + interface WithCreate extends DefinitionStages.WithNetAppVolume, DefinitionStages.WithDiskPoolVolume, + DefinitionStages.WithElasticSanVolume { /** * Executes the create request. - * + * * @return the created resource. */ Datastore create(); /** * Executes the create request. - * + * * @param context The context to associate with this operation. * @return the created resource. */ Datastore create(Context context); } - /** The stage of the Datastore definition allowing to specify netAppVolume. */ + /** + * The stage of the Datastore definition allowing to specify netAppVolume. + */ interface WithNetAppVolume { /** * Specifies the netAppVolume property: An Azure NetApp Files volume. - * + * * @param netAppVolume An Azure NetApp Files volume. * @return the next definition stage. */ WithCreate withNetAppVolume(NetAppVolume netAppVolume); } - /** The stage of the Datastore definition allowing to specify diskPoolVolume. */ + /** + * The stage of the Datastore definition allowing to specify diskPoolVolume. + */ interface WithDiskPoolVolume { /** * Specifies the diskPoolVolume property: An iSCSI volume. - * + * * @param diskPoolVolume An iSCSI volume. * @return the next definition stage. */ WithCreate withDiskPoolVolume(DiskPoolVolume diskPoolVolume); } + + /** + * The stage of the Datastore definition allowing to specify elasticSanVolume. + */ + interface WithElasticSanVolume { + /** + * Specifies the elasticSanVolume property: An Elastic SAN volume. + * + * @param elasticSanVolume An Elastic SAN volume. + * @return the next definition stage. + */ + WithCreate withElasticSanVolume(ElasticSanVolume elasticSanVolume); + } } /** * Begins update for the Datastore resource. - * + * * @return the stage of resource update. */ Datastore.Update update(); - /** The template for Datastore update. */ - interface Update extends UpdateStages.WithNetAppVolume, UpdateStages.WithDiskPoolVolume { + /** + * The template for Datastore update. + */ + interface Update + extends UpdateStages.WithNetAppVolume, UpdateStages.WithDiskPoolVolume, UpdateStages.WithElasticSanVolume { /** * Executes the update request. - * + * * @return the updated resource. */ Datastore apply(); /** * Executes the update request. - * + * * @param context The context to associate with this operation. * @return the updated resource. */ Datastore apply(Context context); } - /** The Datastore update stages. */ + /** + * The Datastore update stages. + */ interface UpdateStages { - /** The stage of the Datastore update allowing to specify netAppVolume. */ + /** + * The stage of the Datastore update allowing to specify netAppVolume. + */ interface WithNetAppVolume { /** * Specifies the netAppVolume property: An Azure NetApp Files volume. - * + * * @param netAppVolume An Azure NetApp Files volume. * @return the next definition stage. */ Update withNetAppVolume(NetAppVolume netAppVolume); } - /** The stage of the Datastore update allowing to specify diskPoolVolume. */ + /** + * The stage of the Datastore update allowing to specify diskPoolVolume. + */ interface WithDiskPoolVolume { /** * Specifies the diskPoolVolume property: An iSCSI volume. - * + * * @param diskPoolVolume An iSCSI volume. * @return the next definition stage. */ Update withDiskPoolVolume(DiskPoolVolume diskPoolVolume); } + + /** + * The stage of the Datastore update allowing to specify elasticSanVolume. + */ + interface WithElasticSanVolume { + /** + * Specifies the elasticSanVolume property: An Elastic SAN volume. + * + * @param elasticSanVolume An Elastic SAN volume. + * @return the next definition stage. + */ + Update withElasticSanVolume(ElasticSanVolume elasticSanVolume); + } } /** * Refreshes the resource to sync with Azure. - * + * * @return the refreshed resource. */ Datastore refresh(); /** * Refreshes the resource to sync with Azure. - * + * * @param context The context to associate with this operation. * @return the refreshed resource. */ diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/DatastoreList.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/DatastoreList.java deleted file mode 100644 index fc4350052c9b3..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/DatastoreList.java +++ /dev/null @@ -1,59 +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.avs.models; - -import com.azure.core.annotation.Immutable; -import com.azure.resourcemanager.avs.fluent.models.DatastoreInner; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** A paged list of datastores. */ -@Immutable -public final class DatastoreList { - /* - * The items on a page - */ - @JsonProperty(value = "value", access = JsonProperty.Access.WRITE_ONLY) - private List value; - - /* - * URL to get the next page if any - */ - @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) - private String nextLink; - - /** Creates an instance of DatastoreList class. */ - public DatastoreList() { - } - - /** - * Get the value property: The items on a page. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Get the nextLink property: URL to get the next page if 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/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/DatastoreListResult.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/DatastoreListResult.java new file mode 100644 index 0000000000000..7fc7ae8930487 --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/DatastoreListResult.java @@ -0,0 +1,80 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.avs.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.avs.fluent.models.DatastoreInner; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** + * The response of a Datastore list operation. + */ +@Fluent +public final class DatastoreListResult { + /* + * The Datastore items on this page + */ + @JsonProperty(value = "value", required = true) + private List value; + + /* + * The link to the next page of items + */ + @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) + private String nextLink; + + /** + * Creates an instance of DatastoreListResult class. + */ + public DatastoreListResult() { + } + + /** + * Get the value property: The Datastore items on this page. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Set the value property: The Datastore items on this page. + * + * @param value the value value to set. + * @return the DatastoreListResult object itself. + */ + public DatastoreListResult withValue(List value) { + this.value = value; + return this; + } + + /** + * Get the nextLink property: The link to the next page of items. + * + * @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) { + throw LOGGER.logExceptionAsError( + new IllegalArgumentException("Missing required property value in model DatastoreListResult")); + } else { + value().forEach(e -> e.validate()); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(DatastoreListResult.class); +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/DatastoreProvisioningState.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/DatastoreProvisioningState.java index a935a7c377899..e5393bb1f9225 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/DatastoreProvisioningState.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/DatastoreProvisioningState.java @@ -8,35 +8,53 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** The state of the datastore provisioning. */ +/** + * datastore provisioning state. + */ public final class DatastoreProvisioningState extends ExpandableStringEnum { - /** Static value Succeeded for DatastoreProvisioningState. */ + /** + * Static value Succeeded for DatastoreProvisioningState. + */ public static final DatastoreProvisioningState SUCCEEDED = fromString("Succeeded"); - /** Static value Failed for DatastoreProvisioningState. */ + /** + * Static value Failed for DatastoreProvisioningState. + */ public static final DatastoreProvisioningState FAILED = fromString("Failed"); - /** Static value Cancelled for DatastoreProvisioningState. */ + /** + * Static value Canceled for DatastoreProvisioningState. + */ + public static final DatastoreProvisioningState CANCELED = fromString("Canceled"); + + /** + * Static value Cancelled for DatastoreProvisioningState. + */ public static final DatastoreProvisioningState CANCELLED = fromString("Cancelled"); - /** Static value Pending for DatastoreProvisioningState. */ + /** + * Static value Pending for DatastoreProvisioningState. + */ public static final DatastoreProvisioningState PENDING = fromString("Pending"); - /** Static value Creating for DatastoreProvisioningState. */ + /** + * Static value Creating for DatastoreProvisioningState. + */ public static final DatastoreProvisioningState CREATING = fromString("Creating"); - /** Static value Updating for DatastoreProvisioningState. */ + /** + * Static value Updating for DatastoreProvisioningState. + */ public static final DatastoreProvisioningState UPDATING = fromString("Updating"); - /** Static value Deleting for DatastoreProvisioningState. */ + /** + * Static value Deleting for DatastoreProvisioningState. + */ public static final DatastoreProvisioningState DELETING = fromString("Deleting"); - /** Static value Canceled for DatastoreProvisioningState. */ - public static final DatastoreProvisioningState CANCELED = fromString("Canceled"); - /** * Creates a new instance of DatastoreProvisioningState value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -45,7 +63,7 @@ public DatastoreProvisioningState() { /** * Creates or finds a DatastoreProvisioningState from its string representation. - * + * * @param name a name to look for. * @return the corresponding DatastoreProvisioningState. */ @@ -56,7 +74,7 @@ public static DatastoreProvisioningState fromString(String name) { /** * Gets known DatastoreProvisioningState values. - * + * * @return known DatastoreProvisioningState values. */ public static Collection values() { diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/DatastoreStatus.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/DatastoreStatus.java index 86c524b6673d7..9b9087712db3b 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/DatastoreStatus.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/DatastoreStatus.java @@ -8,32 +8,48 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** The operational status of the datastore. */ +/** + * datastore status. + */ public final class DatastoreStatus extends ExpandableStringEnum { - /** Static value Unknown for DatastoreStatus. */ + /** + * Static value Unknown for DatastoreStatus. + */ public static final DatastoreStatus UNKNOWN = fromString("Unknown"); - /** Static value Accessible for DatastoreStatus. */ + /** + * Static value Accessible for DatastoreStatus. + */ public static final DatastoreStatus ACCESSIBLE = fromString("Accessible"); - /** Static value Inaccessible for DatastoreStatus. */ + /** + * Static value Inaccessible for DatastoreStatus. + */ public static final DatastoreStatus INACCESSIBLE = fromString("Inaccessible"); - /** Static value Attached for DatastoreStatus. */ + /** + * Static value Attached for DatastoreStatus. + */ public static final DatastoreStatus ATTACHED = fromString("Attached"); - /** Static value Detached for DatastoreStatus. */ + /** + * Static value Detached for DatastoreStatus. + */ public static final DatastoreStatus DETACHED = fromString("Detached"); - /** Static value LostCommunication for DatastoreStatus. */ + /** + * Static value LostCommunication for DatastoreStatus. + */ public static final DatastoreStatus LOST_COMMUNICATION = fromString("LostCommunication"); - /** Static value DeadOrError for DatastoreStatus. */ + /** + * Static value DeadOrError for DatastoreStatus. + */ public static final DatastoreStatus DEAD_OR_ERROR = fromString("DeadOrError"); /** * Creates a new instance of DatastoreStatus value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -42,7 +58,7 @@ public DatastoreStatus() { /** * Creates or finds a DatastoreStatus from its string representation. - * + * * @param name a name to look for. * @return the corresponding DatastoreStatus. */ @@ -53,7 +69,7 @@ public static DatastoreStatus fromString(String name) { /** * Gets known DatastoreStatus values. - * + * * @return known DatastoreStatus values. */ public static Collection values() { diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/Datastores.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/Datastores.java index d17b66844d949..b0670e79c7273 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/Datastores.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/Datastores.java @@ -8,73 +8,75 @@ import com.azure.core.http.rest.Response; import com.azure.core.util.Context; -/** Resource collection API of Datastores. */ +/** + * Resource collection API of Datastores. + */ public interface Datastores { /** - * List datastores in a private cloud cluster. - * + * List Datastore resources by Cluster. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param clusterName Name of the cluster in the private cloud. + * @param clusterName Name of the cluster. * @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 a paged list of datastores as paginated response with {@link PagedIterable}. + * @return the response of a Datastore list operation as paginated response with {@link PagedIterable}. */ PagedIterable list(String resourceGroupName, String privateCloudName, String clusterName); /** - * List datastores in a private cloud cluster. - * + * List Datastore resources by Cluster. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param clusterName Name of the cluster in the private cloud. + * @param clusterName Name of the cluster. * @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 a paged list of datastores as paginated response with {@link PagedIterable}. + * @return the response of a Datastore list operation as paginated response with {@link PagedIterable}. */ - PagedIterable list( - String resourceGroupName, String privateCloudName, String clusterName, Context context); + PagedIterable list(String resourceGroupName, String privateCloudName, String clusterName, + Context context); /** - * Get a datastore in a private cloud cluster. - * + * Get a Datastore. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param clusterName Name of the cluster in the private cloud. - * @param datastoreName Name of the datastore in the private cloud cluster. + * @param clusterName Name of the cluster. + * @param datastoreName Name of the datastore. * @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 a datastore in a private cloud cluster along with {@link Response}. + * @return a Datastore along with {@link Response}. */ - Response getWithResponse( - String resourceGroupName, String privateCloudName, String clusterName, String datastoreName, Context context); + Response getWithResponse(String resourceGroupName, String privateCloudName, String clusterName, + String datastoreName, Context context); /** - * Get a datastore in a private cloud cluster. - * + * Get a Datastore. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param clusterName Name of the cluster in the private cloud. - * @param datastoreName Name of the datastore in the private cloud cluster. + * @param clusterName Name of the cluster. + * @param datastoreName Name of the datastore. * @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 a datastore in a private cloud cluster. + * @return a Datastore. */ Datastore get(String resourceGroupName, String privateCloudName, String clusterName, String datastoreName); /** - * Delete a datastore in a private cloud cluster. - * + * Delete a Datastore. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param clusterName Name of the cluster in the private cloud. - * @param datastoreName Name of the datastore in the private cloud cluster. + * @param clusterName Name of the cluster. + * @param datastoreName Name of the datastore. * @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. @@ -82,46 +84,46 @@ Response getWithResponse( void delete(String resourceGroupName, String privateCloudName, String clusterName, String datastoreName); /** - * Delete a datastore in a private cloud cluster. - * + * Delete a Datastore. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param clusterName Name of the cluster in the private cloud. - * @param datastoreName Name of the datastore in the private cloud cluster. + * @param clusterName Name of the cluster. + * @param datastoreName Name of the datastore. * @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. */ - void delete( - String resourceGroupName, String privateCloudName, String clusterName, String datastoreName, Context context); + void delete(String resourceGroupName, String privateCloudName, String clusterName, String datastoreName, + Context context); /** - * Get a datastore in a private cloud cluster. - * + * Get a Datastore. + * * @param id the resource ID. * @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 a datastore in a private cloud cluster along with {@link Response}. + * @return a Datastore along with {@link Response}. */ Datastore getById(String id); /** - * Get a datastore in a private cloud cluster. - * + * Get a Datastore. + * * @param id the resource ID. * @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 a datastore in a private cloud cluster along with {@link Response}. + * @return a Datastore along with {@link Response}. */ Response getByIdWithResponse(String id, Context context); /** - * Delete a datastore in a private cloud cluster. - * + * Delete a Datastore. + * * @param id the resource ID. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -130,8 +132,8 @@ void delete( void deleteById(String id); /** - * Delete a datastore in a private cloud cluster. - * + * Delete a Datastore. + * * @param id the resource ID. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -142,7 +144,7 @@ void delete( /** * Begins definition for a new Datastore resource. - * + * * @param name resource name. * @return the first stage of the new Datastore definition. */ diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/DhcpTypeEnum.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/DhcpTypeEnum.java index 6401c1ea5a32a..bdc0a13923060 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/DhcpTypeEnum.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/DhcpTypeEnum.java @@ -8,17 +8,23 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Type of DHCP: SERVER or RELAY. */ +/** + * Type of DHCP: SERVER or RELAY. + */ public final class DhcpTypeEnum extends ExpandableStringEnum { - /** Static value SERVER for DhcpTypeEnum. */ + /** + * Static value SERVER for DhcpTypeEnum. + */ public static final DhcpTypeEnum SERVER = fromString("SERVER"); - /** Static value RELAY for DhcpTypeEnum. */ + /** + * Static value RELAY for DhcpTypeEnum. + */ public static final DhcpTypeEnum RELAY = fromString("RELAY"); /** * Creates a new instance of DhcpTypeEnum value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -27,7 +33,7 @@ public DhcpTypeEnum() { /** * Creates or finds a DhcpTypeEnum from its string representation. - * + * * @param name a name to look for. * @return the corresponding DhcpTypeEnum. */ @@ -38,7 +44,7 @@ public static DhcpTypeEnum fromString(String name) { /** * Gets known DhcpTypeEnum values. - * + * * @return known DhcpTypeEnum values. */ public static Collection values() { diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/DiskPoolVolume.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/DiskPoolVolume.java index dfdb8fc94aab5..a2a8247c4181d 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/DiskPoolVolume.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/DiskPoolVolume.java @@ -8,7 +8,9 @@ import com.azure.core.util.logging.ClientLogger; import com.fasterxml.jackson.annotation.JsonProperty; -/** An iSCSI volume from Microsoft.StoragePool provider. */ +/** + * An iSCSI volume from Microsoft.StoragePool provider. + */ @Fluent public final class DiskPoolVolume { /* @@ -24,7 +26,8 @@ public final class DiskPoolVolume { private String lunName; /* - * Mode that describes whether the LUN has to be mounted as a datastore or attached as a LUN + * Mode that describes whether the LUN has to be mounted as a datastore or + * attached as a LUN */ @JsonProperty(value = "mountOption") private MountOptionEnum mountOption; @@ -35,13 +38,15 @@ public final class DiskPoolVolume { @JsonProperty(value = "path", access = JsonProperty.Access.WRITE_ONLY) private String path; - /** Creates an instance of DiskPoolVolume class. */ + /** + * Creates an instance of DiskPoolVolume class. + */ public DiskPoolVolume() { } /** * Get the targetId property: Azure resource ID of the iSCSI target. - * + * * @return the targetId value. */ public String targetId() { @@ -50,7 +55,7 @@ public String targetId() { /** * Set the targetId property: Azure resource ID of the iSCSI target. - * + * * @param targetId the targetId value to set. * @return the DiskPoolVolume object itself. */ @@ -61,7 +66,7 @@ public DiskPoolVolume withTargetId(String targetId) { /** * Get the lunName property: Name of the LUN to be used for datastore. - * + * * @return the lunName value. */ public String lunName() { @@ -70,7 +75,7 @@ public String lunName() { /** * Set the lunName property: Name of the LUN to be used for datastore. - * + * * @param lunName the lunName value to set. * @return the DiskPoolVolume object itself. */ @@ -80,9 +85,9 @@ public DiskPoolVolume withLunName(String lunName) { } /** - * Get the mountOption property: Mode that describes whether the LUN has to be mounted as a datastore or attached as - * a LUN. - * + * Get the mountOption property: Mode that describes whether the LUN has to be mounted as a datastore or + * attached as a LUN. + * * @return the mountOption value. */ public MountOptionEnum mountOption() { @@ -90,9 +95,9 @@ public MountOptionEnum mountOption() { } /** - * Set the mountOption property: Mode that describes whether the LUN has to be mounted as a datastore or attached as - * a LUN. - * + * Set the mountOption property: Mode that describes whether the LUN has to be mounted as a datastore or + * attached as a LUN. + * * @param mountOption the mountOption value to set. * @return the DiskPoolVolume object itself. */ @@ -103,7 +108,7 @@ public DiskPoolVolume withMountOption(MountOptionEnum mountOption) { /** * Get the path property: Device path. - * + * * @return the path value. */ public String path() { @@ -112,19 +117,17 @@ public String path() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { if (targetId() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property targetId in model DiskPoolVolume")); + throw LOGGER.logExceptionAsError( + new IllegalArgumentException("Missing required property targetId in model DiskPoolVolume")); } if (lunName() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property lunName in model DiskPoolVolume")); + throw LOGGER.logExceptionAsError( + new IllegalArgumentException("Missing required property lunName in model DiskPoolVolume")); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/DnsServiceLogLevelEnum.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/DnsServiceLogLevelEnum.java index bf521fde586df..35cce41759d32 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/DnsServiceLogLevelEnum.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/DnsServiceLogLevelEnum.java @@ -8,26 +8,38 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** DNS Service log level. */ +/** + * DNS service log level. + */ public final class DnsServiceLogLevelEnum extends ExpandableStringEnum { - /** Static value DEBUG for DnsServiceLogLevelEnum. */ + /** + * Static value DEBUG for DnsServiceLogLevelEnum. + */ public static final DnsServiceLogLevelEnum DEBUG = fromString("DEBUG"); - /** Static value INFO for DnsServiceLogLevelEnum. */ + /** + * Static value INFO for DnsServiceLogLevelEnum. + */ public static final DnsServiceLogLevelEnum INFO = fromString("INFO"); - /** Static value WARNING for DnsServiceLogLevelEnum. */ + /** + * Static value WARNING for DnsServiceLogLevelEnum. + */ public static final DnsServiceLogLevelEnum WARNING = fromString("WARNING"); - /** Static value ERROR for DnsServiceLogLevelEnum. */ + /** + * Static value ERROR for DnsServiceLogLevelEnum. + */ public static final DnsServiceLogLevelEnum ERROR = fromString("ERROR"); - /** Static value FATAL for DnsServiceLogLevelEnum. */ + /** + * Static value FATAL for DnsServiceLogLevelEnum. + */ public static final DnsServiceLogLevelEnum FATAL = fromString("FATAL"); /** * Creates a new instance of DnsServiceLogLevelEnum value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -36,7 +48,7 @@ public DnsServiceLogLevelEnum() { /** * Creates or finds a DnsServiceLogLevelEnum from its string representation. - * + * * @param name a name to look for. * @return the corresponding DnsServiceLogLevelEnum. */ @@ -47,7 +59,7 @@ public static DnsServiceLogLevelEnum fromString(String name) { /** * Gets known DnsServiceLogLevelEnum values. - * + * * @return known DnsServiceLogLevelEnum values. */ public static Collection values() { diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/DnsServiceStatusEnum.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/DnsServiceStatusEnum.java index f1fd54ee59842..0d3c32e204a59 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/DnsServiceStatusEnum.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/DnsServiceStatusEnum.java @@ -8,17 +8,23 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** DNS Service status. */ +/** + * DNS service status. + */ public final class DnsServiceStatusEnum extends ExpandableStringEnum { - /** Static value SUCCESS for DnsServiceStatusEnum. */ + /** + * Static value SUCCESS for DnsServiceStatusEnum. + */ public static final DnsServiceStatusEnum SUCCESS = fromString("SUCCESS"); - /** Static value FAILURE for DnsServiceStatusEnum. */ + /** + * Static value FAILURE for DnsServiceStatusEnum. + */ public static final DnsServiceStatusEnum FAILURE = fromString("FAILURE"); /** * Creates a new instance of DnsServiceStatusEnum value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -27,7 +33,7 @@ public DnsServiceStatusEnum() { /** * Creates or finds a DnsServiceStatusEnum from its string representation. - * + * * @param name a name to look for. * @return the corresponding DnsServiceStatusEnum. */ @@ -38,7 +44,7 @@ public static DnsServiceStatusEnum fromString(String name) { /** * Gets known DnsServiceStatusEnum values. - * + * * @return known DnsServiceStatusEnum values. */ public static Collection values() { diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/DnsZoneType.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/DnsZoneType.java new file mode 100644 index 0000000000000..ba38d01c4ae97 --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/DnsZoneType.java @@ -0,0 +1,53 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.avs.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** + * The type of DNS zone. + */ +public final class DnsZoneType extends ExpandableStringEnum { + /** + * Static value Public for DnsZoneType. + */ + public static final DnsZoneType PUBLIC = fromString("Public"); + + /** + * Static value Private for DnsZoneType. + */ + public static final DnsZoneType PRIVATE = fromString("Private"); + + /** + * Creates a new instance of DnsZoneType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public DnsZoneType() { + } + + /** + * Creates or finds a DnsZoneType from its string representation. + * + * @param name a name to look for. + * @return the corresponding DnsZoneType. + */ + @JsonCreator + public static DnsZoneType fromString(String name) { + return fromString(name, DnsZoneType.class); + } + + /** + * Gets known DnsZoneType values. + * + * @return known DnsZoneType values. + */ + public static Collection values() { + return values(DnsZoneType.class); + } +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ElasticSanVolume.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ElasticSanVolume.java new file mode 100644 index 0000000000000..6f21358803a09 --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ElasticSanVolume.java @@ -0,0 +1,61 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.avs.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * An Elastic SAN volume from Microsoft.ElasticSan provider. + */ +@Fluent +public final class ElasticSanVolume { + /* + * Azure resource ID of the Elastic SAN Volume + */ + @JsonProperty(value = "targetId", required = true) + private String targetId; + + /** + * Creates an instance of ElasticSanVolume class. + */ + public ElasticSanVolume() { + } + + /** + * Get the targetId property: Azure resource ID of the Elastic SAN Volume. + * + * @return the targetId value. + */ + public String targetId() { + return this.targetId; + } + + /** + * Set the targetId property: Azure resource ID of the Elastic SAN Volume. + * + * @param targetId the targetId value to set. + * @return the ElasticSanVolume object itself. + */ + public ElasticSanVolume withTargetId(String targetId) { + this.targetId = targetId; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (targetId() == null) { + throw LOGGER.logExceptionAsError( + new IllegalArgumentException("Missing required property targetId in model ElasticSanVolume")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(ElasticSanVolume.class); +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/Encryption.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/Encryption.java index 96c7d0e8c1e5b..34a99f6382f63 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/Encryption.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/Encryption.java @@ -7,7 +7,9 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; -/** The properties of customer managed encryption key. */ +/** + * The properties of customer managed encryption key. + */ @Fluent public final class Encryption { /* @@ -22,13 +24,15 @@ public final class Encryption { @JsonProperty(value = "keyVaultProperties") private EncryptionKeyVaultProperties keyVaultProperties; - /** Creates an instance of Encryption class. */ + /** + * Creates an instance of Encryption class. + */ public Encryption() { } /** * Get the status property: Status of customer managed encryption key. - * + * * @return the status value. */ public EncryptionState status() { @@ -37,7 +41,7 @@ public EncryptionState status() { /** * Set the status property: Status of customer managed encryption key. - * + * * @param status the status value to set. * @return the Encryption object itself. */ @@ -48,7 +52,7 @@ public Encryption withStatus(EncryptionState status) { /** * Get the keyVaultProperties property: The key vault where the encryption key is stored. - * + * * @return the keyVaultProperties value. */ public EncryptionKeyVaultProperties keyVaultProperties() { @@ -57,7 +61,7 @@ public EncryptionKeyVaultProperties keyVaultProperties() { /** * Set the keyVaultProperties property: The key vault where the encryption key is stored. - * + * * @param keyVaultProperties the keyVaultProperties value to set. * @return the Encryption object itself. */ @@ -68,7 +72,7 @@ public Encryption withKeyVaultProperties(EncryptionKeyVaultProperties keyVaultPr /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/EncryptionKeyStatus.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/EncryptionKeyStatus.java index 3d7f2f7174298..b67dd7528e7f2 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/EncryptionKeyStatus.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/EncryptionKeyStatus.java @@ -8,17 +8,23 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** The state of key provided. */ +/** + * Whether the the encryption key is connected or access denied. + */ public final class EncryptionKeyStatus extends ExpandableStringEnum { - /** Static value Connected for EncryptionKeyStatus. */ + /** + * Static value Connected for EncryptionKeyStatus. + */ public static final EncryptionKeyStatus CONNECTED = fromString("Connected"); - /** Static value AccessDenied for EncryptionKeyStatus. */ + /** + * Static value AccessDenied for EncryptionKeyStatus. + */ public static final EncryptionKeyStatus ACCESS_DENIED = fromString("AccessDenied"); /** * Creates a new instance of EncryptionKeyStatus value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -27,7 +33,7 @@ public EncryptionKeyStatus() { /** * Creates or finds a EncryptionKeyStatus from its string representation. - * + * * @param name a name to look for. * @return the corresponding EncryptionKeyStatus. */ @@ -38,7 +44,7 @@ public static EncryptionKeyStatus fromString(String name) { /** * Gets known EncryptionKeyStatus values. - * + * * @return known EncryptionKeyStatus values. */ public static Collection values() { diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/EncryptionKeyVaultProperties.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/EncryptionKeyVaultProperties.java index bf93ec50e582e..3b31e2de86410 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/EncryptionKeyVaultProperties.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/EncryptionKeyVaultProperties.java @@ -7,7 +7,9 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; -/** An Encryption Key. */ +/** + * An Encryption Key. + */ @Fluent public final class EncryptionKeyVaultProperties { /* @@ -46,13 +48,15 @@ public final class EncryptionKeyVaultProperties { @JsonProperty(value = "versionType", access = JsonProperty.Access.WRITE_ONLY) private EncryptionVersionType versionType; - /** Creates an instance of EncryptionKeyVaultProperties class. */ + /** + * Creates an instance of EncryptionKeyVaultProperties class. + */ public EncryptionKeyVaultProperties() { } /** * Get the keyName property: The name of the key. - * + * * @return the keyName value. */ public String keyName() { @@ -61,7 +65,7 @@ public String keyName() { /** * Set the keyName property: The name of the key. - * + * * @param keyName the keyName value to set. * @return the EncryptionKeyVaultProperties object itself. */ @@ -72,7 +76,7 @@ public EncryptionKeyVaultProperties withKeyName(String keyName) { /** * Get the keyVersion property: The version of the key. - * + * * @return the keyVersion value. */ public String keyVersion() { @@ -81,7 +85,7 @@ public String keyVersion() { /** * Set the keyVersion property: The version of the key. - * + * * @param keyVersion the keyVersion value to set. * @return the EncryptionKeyVaultProperties object itself. */ @@ -92,7 +96,7 @@ public EncryptionKeyVaultProperties withKeyVersion(String keyVersion) { /** * Get the autoDetectedKeyVersion property: The auto-detected version of the key if versionType is auto-detected. - * + * * @return the autoDetectedKeyVersion value. */ public String autoDetectedKeyVersion() { @@ -101,7 +105,7 @@ public String autoDetectedKeyVersion() { /** * Get the keyVaultUrl property: The URL of the vault. - * + * * @return the keyVaultUrl value. */ public String keyVaultUrl() { @@ -110,7 +114,7 @@ public String keyVaultUrl() { /** * Set the keyVaultUrl property: The URL of the vault. - * + * * @param keyVaultUrl the keyVaultUrl value to set. * @return the EncryptionKeyVaultProperties object itself. */ @@ -121,7 +125,7 @@ public EncryptionKeyVaultProperties withKeyVaultUrl(String keyVaultUrl) { /** * Get the keyState property: The state of key provided. - * + * * @return the keyState value. */ public EncryptionKeyStatus keyState() { @@ -130,7 +134,7 @@ public EncryptionKeyStatus keyState() { /** * Get the versionType property: Property of the key if user provided or auto detected. - * + * * @return the versionType value. */ public EncryptionVersionType versionType() { @@ -139,7 +143,7 @@ public EncryptionVersionType versionType() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/EncryptionState.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/EncryptionState.java index e28216412a77a..d30466664cdd6 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/EncryptionState.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/EncryptionState.java @@ -8,17 +8,23 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Status of customer managed encryption key. */ +/** + * Whether encryption is enabled or disabled. + */ public final class EncryptionState extends ExpandableStringEnum { - /** Static value Enabled for EncryptionState. */ + /** + * Static value Enabled for EncryptionState. + */ public static final EncryptionState ENABLED = fromString("Enabled"); - /** Static value Disabled for EncryptionState. */ + /** + * Static value Disabled for EncryptionState. + */ public static final EncryptionState DISABLED = fromString("Disabled"); /** * Creates a new instance of EncryptionState value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -27,7 +33,7 @@ public EncryptionState() { /** * Creates or finds a EncryptionState from its string representation. - * + * * @param name a name to look for. * @return the corresponding EncryptionState. */ @@ -38,7 +44,7 @@ public static EncryptionState fromString(String name) { /** * Gets known EncryptionState values. - * + * * @return known EncryptionState values. */ public static Collection values() { diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/EncryptionVersionType.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/EncryptionVersionType.java index d7db1505fd842..d8fedaece1fe9 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/EncryptionVersionType.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/EncryptionVersionType.java @@ -8,17 +8,23 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Property of the key if user provided or auto detected. */ +/** + * Whether the encryption version is fixed or auto-detected. + */ public final class EncryptionVersionType extends ExpandableStringEnum { - /** Static value Fixed for EncryptionVersionType. */ + /** + * Static value Fixed for EncryptionVersionType. + */ public static final EncryptionVersionType FIXED = fromString("Fixed"); - /** Static value AutoDetected for EncryptionVersionType. */ + /** + * Static value AutoDetected for EncryptionVersionType. + */ public static final EncryptionVersionType AUTO_DETECTED = fromString("AutoDetected"); /** * Creates a new instance of EncryptionVersionType value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -27,7 +33,7 @@ public EncryptionVersionType() { /** * Creates or finds a EncryptionVersionType from its string representation. - * + * * @param name a name to look for. * @return the corresponding EncryptionVersionType. */ @@ -38,7 +44,7 @@ public static EncryptionVersionType fromString(String name) { /** * Gets known EncryptionVersionType values. - * + * * @return known EncryptionVersionType values. */ public static Collection values() { diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/Endpoints.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/Endpoints.java index b17d025d67235..6fbc9f7076299 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/Endpoints.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/Endpoints.java @@ -7,34 +7,56 @@ import com.azure.core.annotation.Immutable; import com.fasterxml.jackson.annotation.JsonProperty; -/** Endpoint addresses. */ +/** + * Endpoint addresses. + */ @Immutable public final class Endpoints { /* - * Endpoint for the NSX-T Data Center manager + * Endpoint FQDN for the NSX-T Data Center manager */ @JsonProperty(value = "nsxtManager", access = JsonProperty.Access.WRITE_ONLY) private String nsxtManager; /* - * Endpoint for Virtual Center Server Appliance + * Endpoint FQDN for Virtual Center Server Appliance */ @JsonProperty(value = "vcsa", access = JsonProperty.Access.WRITE_ONLY) private String vcsa; /* - * Endpoint for the HCX Cloud Manager + * Endpoint FQDN for the HCX Cloud Manager */ @JsonProperty(value = "hcxCloudManager", access = JsonProperty.Access.WRITE_ONLY) private String hcxCloudManager; - /** Creates an instance of Endpoints class. */ + /* + * Endpoint IP for the NSX-T Data Center manager + */ + @JsonProperty(value = "nsxtManagerIp", access = JsonProperty.Access.WRITE_ONLY) + private String nsxtManagerIp; + + /* + * Endpoint IP for Virtual Center Server Appliance + */ + @JsonProperty(value = "vcenterIp", access = JsonProperty.Access.WRITE_ONLY) + private String vcenterIp; + + /* + * Endpoint IP for the HCX Cloud Manager + */ + @JsonProperty(value = "hcxCloudManagerIp", access = JsonProperty.Access.WRITE_ONLY) + private String hcxCloudManagerIp; + + /** + * Creates an instance of Endpoints class. + */ public Endpoints() { } /** - * Get the nsxtManager property: Endpoint for the NSX-T Data Center manager. - * + * Get the nsxtManager property: Endpoint FQDN for the NSX-T Data Center manager. + * * @return the nsxtManager value. */ public String nsxtManager() { @@ -42,8 +64,8 @@ public String nsxtManager() { } /** - * Get the vcsa property: Endpoint for Virtual Center Server Appliance. - * + * Get the vcsa property: Endpoint FQDN for Virtual Center Server Appliance. + * * @return the vcsa value. */ public String vcsa() { @@ -51,17 +73,44 @@ public String vcsa() { } /** - * Get the hcxCloudManager property: Endpoint for the HCX Cloud Manager. - * + * Get the hcxCloudManager property: Endpoint FQDN for the HCX Cloud Manager. + * * @return the hcxCloudManager value. */ public String hcxCloudManager() { return this.hcxCloudManager; } + /** + * Get the nsxtManagerIp property: Endpoint IP for the NSX-T Data Center manager. + * + * @return the nsxtManagerIp value. + */ + public String nsxtManagerIp() { + return this.nsxtManagerIp; + } + + /** + * Get the vcenterIp property: Endpoint IP for Virtual Center Server Appliance. + * + * @return the vcenterIp value. + */ + public String vcenterIp() { + return this.vcenterIp; + } + + /** + * Get the hcxCloudManagerIp property: Endpoint IP for the HCX Cloud Manager. + * + * @return the hcxCloudManagerIp value. + */ + public String hcxCloudManagerIp() { + return this.hcxCloudManagerIp; + } + /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ExpressRouteAuthorization.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ExpressRouteAuthorization.java index 19644c48840cf..04c550c0e92a4 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ExpressRouteAuthorization.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ExpressRouteAuthorization.java @@ -4,92 +4,110 @@ package com.azure.resourcemanager.avs.models; +import com.azure.core.management.SystemData; import com.azure.core.util.Context; import com.azure.resourcemanager.avs.fluent.models.ExpressRouteAuthorizationInner; -/** An immutable client-side representation of ExpressRouteAuthorization. */ +/** + * An immutable client-side representation of ExpressRouteAuthorization. + */ public interface ExpressRouteAuthorization { /** * Gets the id property: Fully qualified resource Id for the resource. - * + * * @return the id value. */ String id(); /** * Gets the name property: The name of the resource. - * + * * @return the name value. */ String name(); /** * Gets the type property: The type of the resource. - * + * * @return the type value. */ String type(); + /** + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + SystemData systemData(); + /** * Gets the provisioningState property: The state of the ExpressRoute Circuit Authorization provisioning. - * + * * @return the provisioningState value. */ ExpressRouteAuthorizationProvisioningState provisioningState(); /** * Gets the expressRouteAuthorizationId property: The ID of the ExpressRoute Circuit Authorization. - * + * * @return the expressRouteAuthorizationId value. */ String expressRouteAuthorizationId(); /** * Gets the expressRouteAuthorizationKey property: The key of the ExpressRoute Circuit Authorization. - * + * * @return the expressRouteAuthorizationKey value. */ String expressRouteAuthorizationKey(); /** * Gets the expressRouteId property: The ID of the ExpressRoute Circuit. - * + * * @return the expressRouteId value. */ String expressRouteId(); /** * Gets the name of the resource group. - * + * * @return the name of the resource group. */ String resourceGroupName(); /** * Gets the inner com.azure.resourcemanager.avs.fluent.models.ExpressRouteAuthorizationInner object. - * + * * @return the inner object. */ ExpressRouteAuthorizationInner innerModel(); - /** The entirety of the ExpressRouteAuthorization definition. */ + /** + * The entirety of the ExpressRouteAuthorization definition. + */ interface Definition extends DefinitionStages.Blank, DefinitionStages.WithParentResource, DefinitionStages.WithCreate { } - /** The ExpressRouteAuthorization definition stages. */ + /** + * The ExpressRouteAuthorization definition stages. + */ interface DefinitionStages { - /** The first stage of the ExpressRouteAuthorization definition. */ + /** + * The first stage of the ExpressRouteAuthorization definition. + */ interface Blank extends WithParentResource { } - /** The stage of the ExpressRouteAuthorization definition allowing to specify parent resource. */ + /** + * The stage of the ExpressRouteAuthorization definition allowing to specify parent resource. + */ interface WithParentResource { /** * Specifies resourceGroupName, privateCloudName. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName The name of the private cloud. + * @param privateCloudName Name of the private cloud. * @return the next definition stage. */ WithCreate withExistingPrivateCloud(String resourceGroupName, String privateCloudName); @@ -99,63 +117,92 @@ interface WithParentResource { * The stage of the ExpressRouteAuthorization definition which contains all the minimum required properties for * the resource to be created, but also allows for any other optional properties to be specified. */ - interface WithCreate { + interface WithCreate extends DefinitionStages.WithExpressRouteId { /** * Executes the create request. - * + * * @return the created resource. */ ExpressRouteAuthorization create(); /** * Executes the create request. - * + * * @param context The context to associate with this operation. * @return the created resource. */ ExpressRouteAuthorization create(Context context); } + + /** + * The stage of the ExpressRouteAuthorization definition allowing to specify expressRouteId. + */ + interface WithExpressRouteId { + /** + * Specifies the expressRouteId property: The ID of the ExpressRoute Circuit. + * + * @param expressRouteId The ID of the ExpressRoute Circuit. + * @return the next definition stage. + */ + WithCreate withExpressRouteId(String expressRouteId); + } } /** * Begins update for the ExpressRouteAuthorization resource. - * + * * @return the stage of resource update. */ ExpressRouteAuthorization.Update update(); - /** The template for ExpressRouteAuthorization update. */ - interface Update { + /** + * The template for ExpressRouteAuthorization update. + */ + interface Update extends UpdateStages.WithExpressRouteId { /** * Executes the update request. - * + * * @return the updated resource. */ ExpressRouteAuthorization apply(); /** * Executes the update request. - * + * * @param context The context to associate with this operation. * @return the updated resource. */ ExpressRouteAuthorization apply(Context context); } - /** The ExpressRouteAuthorization update stages. */ + /** + * The ExpressRouteAuthorization update stages. + */ interface UpdateStages { + /** + * The stage of the ExpressRouteAuthorization update allowing to specify expressRouteId. + */ + interface WithExpressRouteId { + /** + * Specifies the expressRouteId property: The ID of the ExpressRoute Circuit. + * + * @param expressRouteId The ID of the ExpressRoute Circuit. + * @return the next definition stage. + */ + Update withExpressRouteId(String expressRouteId); + } } /** * Refreshes the resource to sync with Azure. - * + * * @return the refreshed resource. */ ExpressRouteAuthorization refresh(); /** * Refreshes the resource to sync with Azure. - * + * * @param context The context to associate with this operation. * @return the refreshed resource. */ diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ExpressRouteAuthorizationList.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ExpressRouteAuthorizationList.java deleted file mode 100644 index 21a78e738c8ca..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ExpressRouteAuthorizationList.java +++ /dev/null @@ -1,59 +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.avs.models; - -import com.azure.core.annotation.Immutable; -import com.azure.resourcemanager.avs.fluent.models.ExpressRouteAuthorizationInner; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** A paged list of ExpressRoute Circuit Authorizations. */ -@Immutable -public final class ExpressRouteAuthorizationList { - /* - * The items on a page - */ - @JsonProperty(value = "value", access = JsonProperty.Access.WRITE_ONLY) - private List value; - - /* - * URL to get the next page if any - */ - @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) - private String nextLink; - - /** Creates an instance of ExpressRouteAuthorizationList class. */ - public ExpressRouteAuthorizationList() { - } - - /** - * Get the value property: The items on a page. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Get the nextLink property: URL to get the next page if 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/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ExpressRouteAuthorizationListResult.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ExpressRouteAuthorizationListResult.java new file mode 100644 index 0000000000000..7cf78da8699a3 --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ExpressRouteAuthorizationListResult.java @@ -0,0 +1,80 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.avs.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.avs.fluent.models.ExpressRouteAuthorizationInner; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** + * The response of a ExpressRouteAuthorization list operation. + */ +@Fluent +public final class ExpressRouteAuthorizationListResult { + /* + * The ExpressRouteAuthorization items on this page + */ + @JsonProperty(value = "value", required = true) + private List value; + + /* + * The link to the next page of items + */ + @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) + private String nextLink; + + /** + * Creates an instance of ExpressRouteAuthorizationListResult class. + */ + public ExpressRouteAuthorizationListResult() { + } + + /** + * Get the value property: The ExpressRouteAuthorization items on this page. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Set the value property: The ExpressRouteAuthorization items on this page. + * + * @param value the value value to set. + * @return the ExpressRouteAuthorizationListResult object itself. + */ + public ExpressRouteAuthorizationListResult withValue(List value) { + this.value = value; + return this; + } + + /** + * Get the nextLink property: The link to the next page of items. + * + * @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) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + "Missing required property value in model ExpressRouteAuthorizationListResult")); + } else { + value().forEach(e -> e.validate()); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(ExpressRouteAuthorizationListResult.class); +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ExpressRouteAuthorizationProvisioningState.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ExpressRouteAuthorizationProvisioningState.java index ad07c10cb86ca..1bcc994f73576 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ExpressRouteAuthorizationProvisioningState.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ExpressRouteAuthorizationProvisioningState.java @@ -8,24 +8,34 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** The state of the ExpressRoute Circuit Authorization provisioning. */ +/** + * Express Route Circuit Authorization provisioning state. + */ public final class ExpressRouteAuthorizationProvisioningState extends ExpandableStringEnum { - /** Static value Succeeded for ExpressRouteAuthorizationProvisioningState. */ + /** + * Static value Succeeded for ExpressRouteAuthorizationProvisioningState. + */ public static final ExpressRouteAuthorizationProvisioningState SUCCEEDED = fromString("Succeeded"); - /** Static value Failed for ExpressRouteAuthorizationProvisioningState. */ + /** + * Static value Failed for ExpressRouteAuthorizationProvisioningState. + */ public static final ExpressRouteAuthorizationProvisioningState FAILED = fromString("Failed"); - /** Static value Updating for ExpressRouteAuthorizationProvisioningState. */ - public static final ExpressRouteAuthorizationProvisioningState UPDATING = fromString("Updating"); - - /** Static value Canceled for ExpressRouteAuthorizationProvisioningState. */ + /** + * Static value Canceled for ExpressRouteAuthorizationProvisioningState. + */ public static final ExpressRouteAuthorizationProvisioningState CANCELED = fromString("Canceled"); + /** + * Static value Updating for ExpressRouteAuthorizationProvisioningState. + */ + public static final ExpressRouteAuthorizationProvisioningState UPDATING = fromString("Updating"); + /** * Creates a new instance of ExpressRouteAuthorizationProvisioningState value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -34,7 +44,7 @@ public ExpressRouteAuthorizationProvisioningState() { /** * Creates or finds a ExpressRouteAuthorizationProvisioningState from its string representation. - * + * * @param name a name to look for. * @return the corresponding ExpressRouteAuthorizationProvisioningState. */ @@ -45,7 +55,7 @@ public static ExpressRouteAuthorizationProvisioningState fromString(String name) /** * Gets known ExpressRouteAuthorizationProvisioningState values. - * + * * @return known ExpressRouteAuthorizationProvisioningState values. */ public static Collection values() { diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/GlobalReachConnection.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/GlobalReachConnection.java index 1f7000469cbbf..12d6133eecadd 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/GlobalReachConnection.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/GlobalReachConnection.java @@ -4,35 +4,45 @@ package com.azure.resourcemanager.avs.models; +import com.azure.core.management.SystemData; import com.azure.core.util.Context; import com.azure.resourcemanager.avs.fluent.models.GlobalReachConnectionInner; -/** An immutable client-side representation of GlobalReachConnection. */ +/** + * An immutable client-side representation of GlobalReachConnection. + */ public interface GlobalReachConnection { /** * Gets the id property: Fully qualified resource Id for the resource. - * + * * @return the id value. */ String id(); /** * Gets the name property: The name of the resource. - * + * * @return the name value. */ String name(); /** * Gets the type property: The type of the resource. - * + * * @return the type value. */ String type(); + /** + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + SystemData systemData(); + /** * Gets the provisioningState property: The state of the ExpressRoute Circuit Authorization provisioning. - * + * * @return the provisioningState value. */ GlobalReachConnectionProvisioningState provisioningState(); @@ -40,7 +50,7 @@ public interface GlobalReachConnection { /** * Gets the addressPrefix property: The network used for global reach carved out from the original network block * provided for the private cloud. - * + * * @return the addressPrefix value. */ String addressPrefix(); @@ -48,22 +58,23 @@ public interface GlobalReachConnection { /** * Gets the authorizationKey property: Authorization key from the peer express route used for the global reach * connection. - * + * * @return the authorizationKey value. */ String authorizationKey(); /** * Gets the circuitConnectionStatus property: The connection status of the global reach connection. - * + * * @return the circuitConnectionStatus value. */ GlobalReachConnectionStatus circuitConnectionStatus(); /** * Gets the peerExpressRouteCircuit property: Identifier of the ExpressRoute Circuit to peer with in the global - * reach connection. - * + * reach + * connection. + * * @return the peerExpressRouteCircuit value. */ String peerExpressRouteCircuit(); @@ -71,43 +82,51 @@ public interface GlobalReachConnection { /** * Gets the expressRouteId property: The ID of the Private Cloud's ExpressRoute Circuit that is participating in the * global reach connection. - * + * * @return the expressRouteId value. */ String expressRouteId(); /** * Gets the name of the resource group. - * + * * @return the name of the resource group. */ String resourceGroupName(); /** * Gets the inner com.azure.resourcemanager.avs.fluent.models.GlobalReachConnectionInner object. - * + * * @return the inner object. */ GlobalReachConnectionInner innerModel(); - /** The entirety of the GlobalReachConnection definition. */ + /** + * The entirety of the GlobalReachConnection definition. + */ interface Definition extends DefinitionStages.Blank, DefinitionStages.WithParentResource, DefinitionStages.WithCreate { } - /** The GlobalReachConnection definition stages. */ + /** + * The GlobalReachConnection definition stages. + */ interface DefinitionStages { - /** The first stage of the GlobalReachConnection definition. */ + /** + * The first stage of the GlobalReachConnection definition. + */ interface Blank extends WithParentResource { } - /** The stage of the GlobalReachConnection definition allowing to specify parent resource. */ + /** + * The stage of the GlobalReachConnection definition allowing to specify parent resource. + */ interface WithParentResource { /** * Specifies resourceGroupName, privateCloudName. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName The name of the private cloud. + * @param privateCloudName Name of the private cloud. * @return the next definition stage. */ WithCreate withExistingPrivateCloud(String resourceGroupName, String privateCloudName); @@ -117,60 +136,67 @@ interface WithParentResource { * The stage of the GlobalReachConnection definition which contains all the minimum required properties for the * resource to be created, but also allows for any other optional properties to be specified. */ - interface WithCreate - extends DefinitionStages.WithAuthorizationKey, - DefinitionStages.WithPeerExpressRouteCircuit, - DefinitionStages.WithExpressRouteId { + interface WithCreate extends DefinitionStages.WithAuthorizationKey, + DefinitionStages.WithPeerExpressRouteCircuit, DefinitionStages.WithExpressRouteId { /** * Executes the create request. - * + * * @return the created resource. */ GlobalReachConnection create(); /** * Executes the create request. - * + * * @param context The context to associate with this operation. * @return the created resource. */ GlobalReachConnection create(Context context); } - /** The stage of the GlobalReachConnection definition allowing to specify authorizationKey. */ + /** + * The stage of the GlobalReachConnection definition allowing to specify authorizationKey. + */ interface WithAuthorizationKey { /** * Specifies the authorizationKey property: Authorization key from the peer express route used for the - * global reach connection. - * + * global reach + * connection. + * * @param authorizationKey Authorization key from the peer express route used for the global reach - * connection. + * connection. * @return the next definition stage. */ WithCreate withAuthorizationKey(String authorizationKey); } - /** The stage of the GlobalReachConnection definition allowing to specify peerExpressRouteCircuit. */ + /** + * The stage of the GlobalReachConnection definition allowing to specify peerExpressRouteCircuit. + */ interface WithPeerExpressRouteCircuit { /** * Specifies the peerExpressRouteCircuit property: Identifier of the ExpressRoute Circuit to peer with in - * the global reach connection. - * + * the global reach + * connection. + * * @param peerExpressRouteCircuit Identifier of the ExpressRoute Circuit to peer with in the global reach - * connection. + * connection. * @return the next definition stage. */ WithCreate withPeerExpressRouteCircuit(String peerExpressRouteCircuit); } - /** The stage of the GlobalReachConnection definition allowing to specify expressRouteId. */ + /** + * The stage of the GlobalReachConnection definition allowing to specify expressRouteId. + */ interface WithExpressRouteId { /** * Specifies the expressRouteId property: The ID of the Private Cloud's ExpressRoute Circuit that is - * participating in the global reach connection. - * + * participating in the + * global reach connection. + * * @param expressRouteId The ID of the Private Cloud's ExpressRoute Circuit that is participating in the - * global reach connection. + * global reach connection. * @return the next definition stage. */ WithCreate withExpressRouteId(String expressRouteId); @@ -179,68 +205,79 @@ interface WithExpressRouteId { /** * Begins update for the GlobalReachConnection resource. - * + * * @return the stage of resource update. */ GlobalReachConnection.Update update(); - /** The template for GlobalReachConnection update. */ - interface Update - extends UpdateStages.WithAuthorizationKey, - UpdateStages.WithPeerExpressRouteCircuit, - UpdateStages.WithExpressRouteId { + /** + * The template for GlobalReachConnection update. + */ + interface Update extends UpdateStages.WithAuthorizationKey, UpdateStages.WithPeerExpressRouteCircuit, + UpdateStages.WithExpressRouteId { /** * Executes the update request. - * + * * @return the updated resource. */ GlobalReachConnection apply(); /** * Executes the update request. - * + * * @param context The context to associate with this operation. * @return the updated resource. */ GlobalReachConnection apply(Context context); } - /** The GlobalReachConnection update stages. */ + /** + * The GlobalReachConnection update stages. + */ interface UpdateStages { - /** The stage of the GlobalReachConnection update allowing to specify authorizationKey. */ + /** + * The stage of the GlobalReachConnection update allowing to specify authorizationKey. + */ interface WithAuthorizationKey { /** * Specifies the authorizationKey property: Authorization key from the peer express route used for the - * global reach connection. - * + * global reach + * connection. + * * @param authorizationKey Authorization key from the peer express route used for the global reach - * connection. + * connection. * @return the next definition stage. */ Update withAuthorizationKey(String authorizationKey); } - /** The stage of the GlobalReachConnection update allowing to specify peerExpressRouteCircuit. */ + /** + * The stage of the GlobalReachConnection update allowing to specify peerExpressRouteCircuit. + */ interface WithPeerExpressRouteCircuit { /** * Specifies the peerExpressRouteCircuit property: Identifier of the ExpressRoute Circuit to peer with in - * the global reach connection. - * + * the global reach + * connection. + * * @param peerExpressRouteCircuit Identifier of the ExpressRoute Circuit to peer with in the global reach - * connection. + * connection. * @return the next definition stage. */ Update withPeerExpressRouteCircuit(String peerExpressRouteCircuit); } - /** The stage of the GlobalReachConnection update allowing to specify expressRouteId. */ + /** + * The stage of the GlobalReachConnection update allowing to specify expressRouteId. + */ interface WithExpressRouteId { /** * Specifies the expressRouteId property: The ID of the Private Cloud's ExpressRoute Circuit that is - * participating in the global reach connection. - * + * participating in the + * global reach connection. + * * @param expressRouteId The ID of the Private Cloud's ExpressRoute Circuit that is participating in the - * global reach connection. + * global reach connection. * @return the next definition stage. */ Update withExpressRouteId(String expressRouteId); @@ -249,14 +286,14 @@ interface WithExpressRouteId { /** * Refreshes the resource to sync with Azure. - * + * * @return the refreshed resource. */ GlobalReachConnection refresh(); /** * Refreshes the resource to sync with Azure. - * + * * @param context The context to associate with this operation. * @return the refreshed resource. */ diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/GlobalReachConnectionList.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/GlobalReachConnectionList.java deleted file mode 100644 index e73d1e22c2fbe..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/GlobalReachConnectionList.java +++ /dev/null @@ -1,59 +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.avs.models; - -import com.azure.core.annotation.Immutable; -import com.azure.resourcemanager.avs.fluent.models.GlobalReachConnectionInner; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** A paged list of global reach connections. */ -@Immutable -public final class GlobalReachConnectionList { - /* - * The items on a page - */ - @JsonProperty(value = "value", access = JsonProperty.Access.WRITE_ONLY) - private List value; - - /* - * URL to get the next page if any - */ - @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) - private String nextLink; - - /** Creates an instance of GlobalReachConnectionList class. */ - public GlobalReachConnectionList() { - } - - /** - * Get the value property: The items on a page. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Get the nextLink property: URL to get the next page if 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/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/GlobalReachConnectionListResult.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/GlobalReachConnectionListResult.java new file mode 100644 index 0000000000000..8735e99e44f61 --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/GlobalReachConnectionListResult.java @@ -0,0 +1,80 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.avs.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.avs.fluent.models.GlobalReachConnectionInner; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** + * The response of a GlobalReachConnection list operation. + */ +@Fluent +public final class GlobalReachConnectionListResult { + /* + * The GlobalReachConnection items on this page + */ + @JsonProperty(value = "value", required = true) + private List value; + + /* + * The link to the next page of items + */ + @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) + private String nextLink; + + /** + * Creates an instance of GlobalReachConnectionListResult class. + */ + public GlobalReachConnectionListResult() { + } + + /** + * Get the value property: The GlobalReachConnection items on this page. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Set the value property: The GlobalReachConnection items on this page. + * + * @param value the value value to set. + * @return the GlobalReachConnectionListResult object itself. + */ + public GlobalReachConnectionListResult withValue(List value) { + this.value = value; + return this; + } + + /** + * Get the nextLink property: The link to the next page of items. + * + * @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) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + "Missing required property value in model GlobalReachConnectionListResult")); + } else { + value().forEach(e -> e.validate()); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(GlobalReachConnectionListResult.class); +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/GlobalReachConnectionProvisioningState.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/GlobalReachConnectionProvisioningState.java index 74a4289c7bffd..b522f855c6d38 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/GlobalReachConnectionProvisioningState.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/GlobalReachConnectionProvisioningState.java @@ -8,24 +8,34 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** The state of the ExpressRoute Circuit Authorization provisioning. */ +/** + * Global Reach Connection provisioning state. + */ public final class GlobalReachConnectionProvisioningState extends ExpandableStringEnum { - /** Static value Succeeded for GlobalReachConnectionProvisioningState. */ + /** + * Static value Succeeded for GlobalReachConnectionProvisioningState. + */ public static final GlobalReachConnectionProvisioningState SUCCEEDED = fromString("Succeeded"); - /** Static value Failed for GlobalReachConnectionProvisioningState. */ + /** + * Static value Failed for GlobalReachConnectionProvisioningState. + */ public static final GlobalReachConnectionProvisioningState FAILED = fromString("Failed"); - /** Static value Updating for GlobalReachConnectionProvisioningState. */ - public static final GlobalReachConnectionProvisioningState UPDATING = fromString("Updating"); - - /** Static value Canceled for GlobalReachConnectionProvisioningState. */ + /** + * Static value Canceled for GlobalReachConnectionProvisioningState. + */ public static final GlobalReachConnectionProvisioningState CANCELED = fromString("Canceled"); + /** + * Static value Updating for GlobalReachConnectionProvisioningState. + */ + public static final GlobalReachConnectionProvisioningState UPDATING = fromString("Updating"); + /** * Creates a new instance of GlobalReachConnectionProvisioningState value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -34,7 +44,7 @@ public GlobalReachConnectionProvisioningState() { /** * Creates or finds a GlobalReachConnectionProvisioningState from its string representation. - * + * * @param name a name to look for. * @return the corresponding GlobalReachConnectionProvisioningState. */ @@ -45,7 +55,7 @@ public static GlobalReachConnectionProvisioningState fromString(String name) { /** * Gets known GlobalReachConnectionProvisioningState values. - * + * * @return known GlobalReachConnectionProvisioningState values. */ public static Collection values() { diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/GlobalReachConnectionStatus.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/GlobalReachConnectionStatus.java index f48e652849f8b..e60c6ff520154 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/GlobalReachConnectionStatus.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/GlobalReachConnectionStatus.java @@ -8,20 +8,28 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** The connection status of the global reach connection. */ +/** + * Global Reach Connection status. + */ public final class GlobalReachConnectionStatus extends ExpandableStringEnum { - /** Static value Connected for GlobalReachConnectionStatus. */ + /** + * Static value Connected for GlobalReachConnectionStatus. + */ public static final GlobalReachConnectionStatus CONNECTED = fromString("Connected"); - /** Static value Connecting for GlobalReachConnectionStatus. */ + /** + * Static value Connecting for GlobalReachConnectionStatus. + */ public static final GlobalReachConnectionStatus CONNECTING = fromString("Connecting"); - /** Static value Disconnected for GlobalReachConnectionStatus. */ + /** + * Static value Disconnected for GlobalReachConnectionStatus. + */ public static final GlobalReachConnectionStatus DISCONNECTED = fromString("Disconnected"); /** * Creates a new instance of GlobalReachConnectionStatus value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -30,7 +38,7 @@ public GlobalReachConnectionStatus() { /** * Creates or finds a GlobalReachConnectionStatus from its string representation. - * + * * @param name a name to look for. * @return the corresponding GlobalReachConnectionStatus. */ @@ -41,7 +49,7 @@ public static GlobalReachConnectionStatus fromString(String name) { /** * Gets known GlobalReachConnectionStatus values. - * + * * @return known GlobalReachConnectionStatus values. */ public static Collection values() { diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/GlobalReachConnections.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/GlobalReachConnections.java index 0836f07b11a1e..aff4eaf201963 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/GlobalReachConnections.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/GlobalReachConnections.java @@ -8,67 +8,69 @@ import com.azure.core.http.rest.Response; import com.azure.core.util.Context; -/** Resource collection API of GlobalReachConnections. */ +/** + * Resource collection API of GlobalReachConnections. + */ public interface GlobalReachConnections { /** - * List global reach connections in a private cloud. - * + * List GlobalReachConnection resources by PrivateCloud. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. * @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 a paged list of global reach connections as paginated response with {@link PagedIterable}. + * @return the response of a GlobalReachConnection list operation as paginated response with {@link PagedIterable}. */ PagedIterable list(String resourceGroupName, String privateCloudName); /** - * List global reach connections in a private cloud. - * + * List GlobalReachConnection resources by PrivateCloud. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. * @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 a paged list of global reach connections as paginated response with {@link PagedIterable}. + * @return the response of a GlobalReachConnection list operation as paginated response with {@link PagedIterable}. */ PagedIterable list(String resourceGroupName, String privateCloudName, Context context); /** - * Get a global reach connection by name in a private cloud. - * + * Get a GlobalReachConnection. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param globalReachConnectionName Name of the global reach connection in the private cloud. + * @param globalReachConnectionName Name of the global reach connection. * @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 a global reach connection by name in a private cloud along with {@link Response}. + * @return a GlobalReachConnection along with {@link Response}. */ - Response getWithResponse( - String resourceGroupName, String privateCloudName, String globalReachConnectionName, Context context); + Response getWithResponse(String resourceGroupName, String privateCloudName, + String globalReachConnectionName, Context context); /** - * Get a global reach connection by name in a private cloud. - * + * Get a GlobalReachConnection. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param globalReachConnectionName Name of the global reach connection in the private cloud. + * @param globalReachConnectionName Name of the global reach connection. * @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 a global reach connection by name in a private cloud. + * @return a GlobalReachConnection. */ GlobalReachConnection get(String resourceGroupName, String privateCloudName, String globalReachConnectionName); /** - * Delete a global reach connection in a private cloud. - * + * Delete a GlobalReachConnection. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param globalReachConnectionName Name of the global reach connection in the private cloud. + * @param globalReachConnectionName Name of the global reach connection. * @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. @@ -76,11 +78,11 @@ Response getWithResponse( void delete(String resourceGroupName, String privateCloudName, String globalReachConnectionName); /** - * Delete a global reach connection in a private cloud. - * + * Delete a GlobalReachConnection. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param globalReachConnectionName Name of the global reach connection in the private cloud. + * @param globalReachConnectionName Name of the global reach connection. * @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. @@ -89,31 +91,31 @@ Response getWithResponse( void delete(String resourceGroupName, String privateCloudName, String globalReachConnectionName, Context context); /** - * Get a global reach connection by name in a private cloud. - * + * Get a GlobalReachConnection. + * * @param id the resource ID. * @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 a global reach connection by name in a private cloud along with {@link Response}. + * @return a GlobalReachConnection along with {@link Response}. */ GlobalReachConnection getById(String id); /** - * Get a global reach connection by name in a private cloud. - * + * Get a GlobalReachConnection. + * * @param id the resource ID. * @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 a global reach connection by name in a private cloud along with {@link Response}. + * @return a GlobalReachConnection along with {@link Response}. */ Response getByIdWithResponse(String id, Context context); /** - * Delete a global reach connection in a private cloud. - * + * Delete a GlobalReachConnection. + * * @param id the resource ID. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -122,8 +124,8 @@ Response getWithResponse( void deleteById(String id); /** - * Delete a global reach connection in a private cloud. - * + * Delete a GlobalReachConnection. + * * @param id the resource ID. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -134,7 +136,7 @@ Response getWithResponse( /** * Begins definition for a new GlobalReachConnection resource. - * + * * @param name resource name. * @return the first stage of the new GlobalReachConnection definition. */ diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/HcxEnterpriseSite.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/HcxEnterpriseSite.java index 5d11e3a57d543..d215efe368cca 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/HcxEnterpriseSite.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/HcxEnterpriseSite.java @@ -4,78 +4,103 @@ package com.azure.resourcemanager.avs.models; +import com.azure.core.management.SystemData; import com.azure.core.util.Context; import com.azure.resourcemanager.avs.fluent.models.HcxEnterpriseSiteInner; -/** An immutable client-side representation of HcxEnterpriseSite. */ +/** + * An immutable client-side representation of HcxEnterpriseSite. + */ public interface HcxEnterpriseSite { /** * Gets the id property: Fully qualified resource Id for the resource. - * + * * @return the id value. */ String id(); /** * Gets the name property: The name of the resource. - * + * * @return the name value. */ String name(); /** * Gets the type property: The type of the resource. - * + * * @return the type value. */ String type(); + /** + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + SystemData systemData(); + + /** + * Gets the provisioningState property: The provisioning state of the resource. + * + * @return the provisioningState value. + */ + HcxEnterpriseSiteProvisioningState provisioningState(); + /** * Gets the activationKey property: The activation key. - * + * * @return the activationKey value. */ String activationKey(); /** * Gets the status property: The status of the HCX Enterprise Site. - * + * * @return the status value. */ HcxEnterpriseSiteStatus status(); /** * Gets the name of the resource group. - * + * * @return the name of the resource group. */ String resourceGroupName(); /** * Gets the inner com.azure.resourcemanager.avs.fluent.models.HcxEnterpriseSiteInner object. - * + * * @return the inner object. */ HcxEnterpriseSiteInner innerModel(); - /** The entirety of the HcxEnterpriseSite definition. */ + /** + * The entirety of the HcxEnterpriseSite definition. + */ interface Definition extends DefinitionStages.Blank, DefinitionStages.WithParentResource, DefinitionStages.WithCreate { } - /** The HcxEnterpriseSite definition stages. */ + /** + * The HcxEnterpriseSite definition stages. + */ interface DefinitionStages { - /** The first stage of the HcxEnterpriseSite definition. */ + /** + * The first stage of the HcxEnterpriseSite definition. + */ interface Blank extends WithParentResource { } - /** The stage of the HcxEnterpriseSite definition allowing to specify parent resource. */ + /** + * The stage of the HcxEnterpriseSite definition allowing to specify parent resource. + */ interface WithParentResource { /** * Specifies resourceGroupName, privateCloudName. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName The name of the private cloud. + * @param privateCloudName Name of the private cloud. * @return the next definition stage. */ WithCreate withExistingPrivateCloud(String resourceGroupName, String privateCloudName); @@ -88,14 +113,14 @@ interface WithParentResource { interface WithCreate { /** * Executes the create request. - * + * * @return the created resource. */ HcxEnterpriseSite create(); /** * Executes the create request. - * + * * @param context The context to associate with this operation. * @return the created resource. */ @@ -105,43 +130,47 @@ interface WithCreate { /** * Begins update for the HcxEnterpriseSite resource. - * + * * @return the stage of resource update. */ HcxEnterpriseSite.Update update(); - /** The template for HcxEnterpriseSite update. */ + /** + * The template for HcxEnterpriseSite update. + */ interface Update { /** * Executes the update request. - * + * * @return the updated resource. */ HcxEnterpriseSite apply(); /** * Executes the update request. - * + * * @param context The context to associate with this operation. * @return the updated resource. */ HcxEnterpriseSite apply(Context context); } - /** The HcxEnterpriseSite update stages. */ + /** + * The HcxEnterpriseSite update stages. + */ interface UpdateStages { } /** * Refreshes the resource to sync with Azure. - * + * * @return the refreshed resource. */ HcxEnterpriseSite refresh(); /** * Refreshes the resource to sync with Azure. - * + * * @param context The context to associate with this operation. * @return the refreshed resource. */ diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/HcxEnterpriseSiteList.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/HcxEnterpriseSiteList.java deleted file mode 100644 index 46623c57f8baf..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/HcxEnterpriseSiteList.java +++ /dev/null @@ -1,59 +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.avs.models; - -import com.azure.core.annotation.Immutable; -import com.azure.resourcemanager.avs.fluent.models.HcxEnterpriseSiteInner; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** A paged list of HCX Enterprise Sites. */ -@Immutable -public final class HcxEnterpriseSiteList { - /* - * The items on a page - */ - @JsonProperty(value = "value", access = JsonProperty.Access.WRITE_ONLY) - private List value; - - /* - * URL to get the next page if any - */ - @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) - private String nextLink; - - /** Creates an instance of HcxEnterpriseSiteList class. */ - public HcxEnterpriseSiteList() { - } - - /** - * Get the value property: The items on a page. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Get the nextLink property: URL to get the next page if 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/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/HcxEnterpriseSiteListResult.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/HcxEnterpriseSiteListResult.java new file mode 100644 index 0000000000000..1a7aaa3dfc61c --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/HcxEnterpriseSiteListResult.java @@ -0,0 +1,80 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.avs.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.avs.fluent.models.HcxEnterpriseSiteInner; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** + * The response of a HcxEnterpriseSite list operation. + */ +@Fluent +public final class HcxEnterpriseSiteListResult { + /* + * The HcxEnterpriseSite items on this page + */ + @JsonProperty(value = "value", required = true) + private List value; + + /* + * The link to the next page of items + */ + @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) + private String nextLink; + + /** + * Creates an instance of HcxEnterpriseSiteListResult class. + */ + public HcxEnterpriseSiteListResult() { + } + + /** + * Get the value property: The HcxEnterpriseSite items on this page. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Set the value property: The HcxEnterpriseSite items on this page. + * + * @param value the value value to set. + * @return the HcxEnterpriseSiteListResult object itself. + */ + public HcxEnterpriseSiteListResult withValue(List value) { + this.value = value; + return this; + } + + /** + * Get the nextLink property: The link to the next page of items. + * + * @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) { + throw LOGGER.logExceptionAsError( + new IllegalArgumentException("Missing required property value in model HcxEnterpriseSiteListResult")); + } else { + value().forEach(e -> e.validate()); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(HcxEnterpriseSiteListResult.class); +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/HcxEnterpriseSiteProvisioningState.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/HcxEnterpriseSiteProvisioningState.java new file mode 100644 index 0000000000000..03dec9b2434b3 --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/HcxEnterpriseSiteProvisioningState.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.avs.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** + * HCX Enterprise Site provisioning state. + */ +public final class HcxEnterpriseSiteProvisioningState extends ExpandableStringEnum { + /** + * Static value Succeeded for HcxEnterpriseSiteProvisioningState. + */ + public static final HcxEnterpriseSiteProvisioningState SUCCEEDED = fromString("Succeeded"); + + /** + * Static value Failed for HcxEnterpriseSiteProvisioningState. + */ + public static final HcxEnterpriseSiteProvisioningState FAILED = fromString("Failed"); + + /** + * Static value Canceled for HcxEnterpriseSiteProvisioningState. + */ + public static final HcxEnterpriseSiteProvisioningState CANCELED = fromString("Canceled"); + + /** + * Creates a new instance of HcxEnterpriseSiteProvisioningState value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public HcxEnterpriseSiteProvisioningState() { + } + + /** + * Creates or finds a HcxEnterpriseSiteProvisioningState from its string representation. + * + * @param name a name to look for. + * @return the corresponding HcxEnterpriseSiteProvisioningState. + */ + @JsonCreator + public static HcxEnterpriseSiteProvisioningState fromString(String name) { + return fromString(name, HcxEnterpriseSiteProvisioningState.class); + } + + /** + * Gets known HcxEnterpriseSiteProvisioningState values. + * + * @return known HcxEnterpriseSiteProvisioningState values. + */ + public static Collection values() { + return values(HcxEnterpriseSiteProvisioningState.class); + } +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/HcxEnterpriseSiteStatus.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/HcxEnterpriseSiteStatus.java index 26ac0f3183235..e75b28be6c6f0 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/HcxEnterpriseSiteStatus.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/HcxEnterpriseSiteStatus.java @@ -8,23 +8,33 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** The status of the HCX Enterprise Site. */ +/** + * HCX Enterprise Site status. + */ public final class HcxEnterpriseSiteStatus extends ExpandableStringEnum { - /** Static value Available for HcxEnterpriseSiteStatus. */ + /** + * Static value Available for HcxEnterpriseSiteStatus. + */ public static final HcxEnterpriseSiteStatus AVAILABLE = fromString("Available"); - /** Static value Consumed for HcxEnterpriseSiteStatus. */ + /** + * Static value Consumed for HcxEnterpriseSiteStatus. + */ public static final HcxEnterpriseSiteStatus CONSUMED = fromString("Consumed"); - /** Static value Deactivated for HcxEnterpriseSiteStatus. */ + /** + * Static value Deactivated for HcxEnterpriseSiteStatus. + */ public static final HcxEnterpriseSiteStatus DEACTIVATED = fromString("Deactivated"); - /** Static value Deleted for HcxEnterpriseSiteStatus. */ + /** + * Static value Deleted for HcxEnterpriseSiteStatus. + */ public static final HcxEnterpriseSiteStatus DELETED = fromString("Deleted"); /** * Creates a new instance of HcxEnterpriseSiteStatus value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -33,7 +43,7 @@ public HcxEnterpriseSiteStatus() { /** * Creates or finds a HcxEnterpriseSiteStatus from its string representation. - * + * * @param name a name to look for. * @return the corresponding HcxEnterpriseSiteStatus. */ @@ -44,7 +54,7 @@ public static HcxEnterpriseSiteStatus fromString(String name) { /** * Gets known HcxEnterpriseSiteStatus values. - * + * * @return known HcxEnterpriseSiteStatus values. */ public static Collection values() { diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/HcxEnterpriseSites.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/HcxEnterpriseSites.java index 8490270770bab..4b7f89f923ac1 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/HcxEnterpriseSites.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/HcxEnterpriseSites.java @@ -8,82 +8,84 @@ import com.azure.core.http.rest.Response; import com.azure.core.util.Context; -/** Resource collection API of HcxEnterpriseSites. */ +/** + * Resource collection API of HcxEnterpriseSites. + */ public interface HcxEnterpriseSites { /** - * List HCX on-premises key in a private cloud. - * + * List HcxEnterpriseSite resources by PrivateCloud. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. * @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 a paged list of HCX Enterprise Sites as paginated response with {@link PagedIterable}. + * @return the response of a HcxEnterpriseSite list operation as paginated response with {@link PagedIterable}. */ PagedIterable list(String resourceGroupName, String privateCloudName); /** - * List HCX on-premises key in a private cloud. - * + * List HcxEnterpriseSite resources by PrivateCloud. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. * @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 a paged list of HCX Enterprise Sites as paginated response with {@link PagedIterable}. + * @return the response of a HcxEnterpriseSite list operation as paginated response with {@link PagedIterable}. */ PagedIterable list(String resourceGroupName, String privateCloudName, Context context); /** - * Get an HCX on-premises key by name in a private cloud. - * + * Get a HcxEnterpriseSite. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param hcxEnterpriseSiteName Name of the HCX Enterprise Site in the private cloud. + * @param hcxEnterpriseSiteName Name of the HCX Enterprise Site. * @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 an HCX on-premises key by name in a private cloud along with {@link Response}. + * @return a HcxEnterpriseSite along with {@link Response}. */ - Response getWithResponse( - String resourceGroupName, String privateCloudName, String hcxEnterpriseSiteName, Context context); + Response getWithResponse(String resourceGroupName, String privateCloudName, + String hcxEnterpriseSiteName, Context context); /** - * Get an HCX on-premises key by name in a private cloud. - * + * Get a HcxEnterpriseSite. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param hcxEnterpriseSiteName Name of the HCX Enterprise Site in the private cloud. + * @param hcxEnterpriseSiteName Name of the HCX Enterprise Site. * @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 an HCX on-premises key by name in a private cloud. + * @return a HcxEnterpriseSite. */ HcxEnterpriseSite get(String resourceGroupName, String privateCloudName, String hcxEnterpriseSiteName); /** - * Delete HCX on-premises key in a private cloud. - * + * Delete a HcxEnterpriseSite. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param hcxEnterpriseSiteName Name of the HCX Enterprise Site in the private cloud. + * @param hcxEnterpriseSiteName Name of the HCX Enterprise Site. * @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}. */ - Response deleteWithResponse( - String resourceGroupName, String privateCloudName, String hcxEnterpriseSiteName, Context context); + Response deleteWithResponse(String resourceGroupName, String privateCloudName, String hcxEnterpriseSiteName, + Context context); /** - * Delete HCX on-premises key in a private cloud. - * + * Delete a HcxEnterpriseSite. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param hcxEnterpriseSiteName Name of the HCX Enterprise Site in the private cloud. + * @param hcxEnterpriseSiteName Name of the HCX Enterprise Site. * @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. @@ -91,31 +93,31 @@ Response deleteWithResponse( void delete(String resourceGroupName, String privateCloudName, String hcxEnterpriseSiteName); /** - * Get an HCX on-premises key by name in a private cloud. - * + * Get a HcxEnterpriseSite. + * * @param id the resource ID. * @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 an HCX on-premises key by name in a private cloud along with {@link Response}. + * @return a HcxEnterpriseSite along with {@link Response}. */ HcxEnterpriseSite getById(String id); /** - * Get an HCX on-premises key by name in a private cloud. - * + * Get a HcxEnterpriseSite. + * * @param id the resource ID. * @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 an HCX on-premises key by name in a private cloud along with {@link Response}. + * @return a HcxEnterpriseSite along with {@link Response}. */ Response getByIdWithResponse(String id, Context context); /** - * Delete HCX on-premises key in a private cloud. - * + * Delete a HcxEnterpriseSite. + * * @param id the resource ID. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -124,8 +126,8 @@ Response deleteWithResponse( void deleteById(String id); /** - * Delete HCX on-premises key in a private cloud. - * + * Delete a HcxEnterpriseSite. + * * @param id the resource ID. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -137,7 +139,7 @@ Response deleteWithResponse( /** * Begins definition for a new HcxEnterpriseSite resource. - * + * * @param name resource name. * @return the first stage of the new HcxEnterpriseSite definition. */ diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/IdentitySource.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/IdentitySource.java index 9c44383590655..44bc748adf6b7 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/IdentitySource.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/IdentitySource.java @@ -7,7 +7,9 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; -/** vCenter Single Sign On Identity Source. */ +/** + * vCenter Single Sign On Identity Source. + */ @Fluent public final class IdentitySource { /* @@ -59,24 +61,28 @@ public final class IdentitySource { private SslEnum ssl; /* - * The ID of an Active Directory user with a minimum of read-only access to Base DN for users and group + * The ID of an Active Directory user with a minimum of read-only access to Base + * DN for users and group */ @JsonProperty(value = "username") private String username; /* - * The password of the Active Directory user with a minimum of read-only access to Base DN for users and groups. + * The password of the Active Directory user with a minimum of read-only access to + * Base DN for users and groups. */ @JsonProperty(value = "password") private String password; - /** Creates an instance of IdentitySource class. */ + /** + * Creates an instance of IdentitySource class. + */ public IdentitySource() { } /** * Get the name property: The name of the identity source. - * + * * @return the name value. */ public String name() { @@ -85,7 +91,7 @@ public String name() { /** * Set the name property: The name of the identity source. - * + * * @param name the name value to set. * @return the IdentitySource object itself. */ @@ -96,7 +102,7 @@ public IdentitySource withName(String name) { /** * Get the alias property: The domain's NetBIOS name. - * + * * @return the alias value. */ public String alias() { @@ -105,7 +111,7 @@ public String alias() { /** * Set the alias property: The domain's NetBIOS name. - * + * * @param alias the alias value to set. * @return the IdentitySource object itself. */ @@ -116,7 +122,7 @@ public IdentitySource withAlias(String alias) { /** * Get the domain property: The domain's dns name. - * + * * @return the domain value. */ public String domain() { @@ -125,7 +131,7 @@ public String domain() { /** * Set the domain property: The domain's dns name. - * + * * @param domain the domain value to set. * @return the IdentitySource object itself. */ @@ -136,7 +142,7 @@ public IdentitySource withDomain(String domain) { /** * Get the baseUserDN property: The base distinguished name for users. - * + * * @return the baseUserDN value. */ public String baseUserDN() { @@ -145,7 +151,7 @@ public String baseUserDN() { /** * Set the baseUserDN property: The base distinguished name for users. - * + * * @param baseUserDN the baseUserDN value to set. * @return the IdentitySource object itself. */ @@ -156,7 +162,7 @@ public IdentitySource withBaseUserDN(String baseUserDN) { /** * Get the baseGroupDN property: The base distinguished name for groups. - * + * * @return the baseGroupDN value. */ public String baseGroupDN() { @@ -165,7 +171,7 @@ public String baseGroupDN() { /** * Set the baseGroupDN property: The base distinguished name for groups. - * + * * @param baseGroupDN the baseGroupDN value to set. * @return the IdentitySource object itself. */ @@ -176,7 +182,7 @@ public IdentitySource withBaseGroupDN(String baseGroupDN) { /** * Get the primaryServer property: Primary server URL. - * + * * @return the primaryServer value. */ public String primaryServer() { @@ -185,7 +191,7 @@ public String primaryServer() { /** * Set the primaryServer property: Primary server URL. - * + * * @param primaryServer the primaryServer value to set. * @return the IdentitySource object itself. */ @@ -196,7 +202,7 @@ public IdentitySource withPrimaryServer(String primaryServer) { /** * Get the secondaryServer property: Secondary server URL. - * + * * @return the secondaryServer value. */ public String secondaryServer() { @@ -205,7 +211,7 @@ public String secondaryServer() { /** * Set the secondaryServer property: Secondary server URL. - * + * * @param secondaryServer the secondaryServer value to set. * @return the IdentitySource object itself. */ @@ -216,7 +222,7 @@ public IdentitySource withSecondaryServer(String secondaryServer) { /** * Get the ssl property: Protect LDAP communication using SSL certificate (LDAPS). - * + * * @return the ssl value. */ public SslEnum ssl() { @@ -225,7 +231,7 @@ public SslEnum ssl() { /** * Set the ssl property: Protect LDAP communication using SSL certificate (LDAPS). - * + * * @param ssl the ssl value to set. * @return the IdentitySource object itself. */ @@ -235,9 +241,9 @@ public IdentitySource withSsl(SslEnum ssl) { } /** - * Get the username property: The ID of an Active Directory user with a minimum of read-only access to Base DN for - * users and group. - * + * Get the username property: The ID of an Active Directory user with a minimum of read-only access to Base + * DN for users and group. + * * @return the username value. */ public String username() { @@ -245,9 +251,9 @@ public String username() { } /** - * Set the username property: The ID of an Active Directory user with a minimum of read-only access to Base DN for - * users and group. - * + * Set the username property: The ID of an Active Directory user with a minimum of read-only access to Base + * DN for users and group. + * * @param username the username value to set. * @return the IdentitySource object itself. */ @@ -257,9 +263,9 @@ public IdentitySource withUsername(String username) { } /** - * Get the password property: The password of the Active Directory user with a minimum of read-only access to Base - * DN for users and groups. - * + * Get the password property: The password of the Active Directory user with a minimum of read-only access to + * Base DN for users and groups. + * * @return the password value. */ public String password() { @@ -267,9 +273,9 @@ public String password() { } /** - * Set the password property: The password of the Active Directory user with a minimum of read-only access to Base - * DN for users and groups. - * + * Set the password property: The password of the Active Directory user with a minimum of read-only access to + * Base DN for users and groups. + * * @param password the password value to set. * @return the IdentitySource object itself. */ @@ -280,7 +286,7 @@ public IdentitySource withPassword(String password) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/InternetEnum.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/InternetEnum.java index 972bc30b9bf2d..9b69c91b50fb4 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/InternetEnum.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/InternetEnum.java @@ -8,17 +8,23 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Connectivity to internet is enabled or disabled. */ +/** + * Whether internet is enabled or disabled. + */ public final class InternetEnum extends ExpandableStringEnum { - /** Static value Enabled for InternetEnum. */ + /** + * Static value Enabled for InternetEnum. + */ public static final InternetEnum ENABLED = fromString("Enabled"); - /** Static value Disabled for InternetEnum. */ + /** + * Static value Disabled for InternetEnum. + */ public static final InternetEnum DISABLED = fromString("Disabled"); /** * Creates a new instance of InternetEnum value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -27,7 +33,7 @@ public InternetEnum() { /** * Creates or finds a InternetEnum from its string representation. - * + * * @param name a name to look for. * @return the corresponding InternetEnum. */ @@ -38,7 +44,7 @@ public static InternetEnum fromString(String name) { /** * Gets known InternetEnum values. - * + * * @return known InternetEnum values. */ public static Collection values() { diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/IscsiPath.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/IscsiPath.java new file mode 100644 index 0000000000000..dbaa6e5efb253 --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/IscsiPath.java @@ -0,0 +1,62 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.avs.models; + +import com.azure.core.management.SystemData; +import com.azure.resourcemanager.avs.fluent.models.IscsiPathInner; + +/** + * An immutable client-side representation of IscsiPath. + */ +public interface IscsiPath { + /** + * Gets the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + String id(); + + /** + * Gets the name property: The name of the resource. + * + * @return the name value. + */ + String name(); + + /** + * Gets the type property: The type of the resource. + * + * @return the type value. + */ + String type(); + + /** + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + SystemData systemData(); + + /** + * Gets the provisioningState property: The state of the iSCSI path provisioning. + * + * @return the provisioningState value. + */ + IscsiPathProvisioningState provisioningState(); + + /** + * Gets the networkBlock property: CIDR Block for iSCSI path. + * + * @return the networkBlock value. + */ + String networkBlock(); + + /** + * Gets the inner com.azure.resourcemanager.avs.fluent.models.IscsiPathInner object. + * + * @return the inner object. + */ + IscsiPathInner innerModel(); +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/IscsiPathListResult.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/IscsiPathListResult.java new file mode 100644 index 0000000000000..83846e89a226e --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/IscsiPathListResult.java @@ -0,0 +1,80 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.avs.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.avs.fluent.models.IscsiPathInner; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** + * The response of a IscsiPath list operation. + */ +@Fluent +public final class IscsiPathListResult { + /* + * The IscsiPath items on this page + */ + @JsonProperty(value = "value", required = true) + private List value; + + /* + * The link to the next page of items + */ + @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) + private String nextLink; + + /** + * Creates an instance of IscsiPathListResult class. + */ + public IscsiPathListResult() { + } + + /** + * Get the value property: The IscsiPath items on this page. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Set the value property: The IscsiPath items on this page. + * + * @param value the value value to set. + * @return the IscsiPathListResult object itself. + */ + public IscsiPathListResult withValue(List value) { + this.value = value; + return this; + } + + /** + * Get the nextLink property: The link to the next page of items. + * + * @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) { + throw LOGGER.logExceptionAsError( + new IllegalArgumentException("Missing required property value in model IscsiPathListResult")); + } else { + value().forEach(e -> e.validate()); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(IscsiPathListResult.class); +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/IscsiPathProvisioningState.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/IscsiPathProvisioningState.java new file mode 100644 index 0000000000000..8f75bcb014991 --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/IscsiPathProvisioningState.java @@ -0,0 +1,78 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.avs.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** + * private cloud provisioning state. + */ +public final class IscsiPathProvisioningState extends ExpandableStringEnum { + /** + * Static value Succeeded for IscsiPathProvisioningState. + */ + public static final IscsiPathProvisioningState SUCCEEDED = fromString("Succeeded"); + + /** + * Static value Failed for IscsiPathProvisioningState. + */ + public static final IscsiPathProvisioningState FAILED = fromString("Failed"); + + /** + * Static value Canceled for IscsiPathProvisioningState. + */ + public static final IscsiPathProvisioningState CANCELED = fromString("Canceled"); + + /** + * Static value Pending for IscsiPathProvisioningState. + */ + public static final IscsiPathProvisioningState PENDING = fromString("Pending"); + + /** + * Static value Building for IscsiPathProvisioningState. + */ + public static final IscsiPathProvisioningState BUILDING = fromString("Building"); + + /** + * Static value Deleting for IscsiPathProvisioningState. + */ + public static final IscsiPathProvisioningState DELETING = fromString("Deleting"); + + /** + * Static value Updating for IscsiPathProvisioningState. + */ + public static final IscsiPathProvisioningState UPDATING = fromString("Updating"); + + /** + * Creates a new instance of IscsiPathProvisioningState value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public IscsiPathProvisioningState() { + } + + /** + * Creates or finds a IscsiPathProvisioningState from its string representation. + * + * @param name a name to look for. + * @return the corresponding IscsiPathProvisioningState. + */ + @JsonCreator + public static IscsiPathProvisioningState fromString(String name) { + return fromString(name, IscsiPathProvisioningState.class); + } + + /** + * Gets known IscsiPathProvisioningState values. + * + * @return known IscsiPathProvisioningState values. + */ + public static Collection values() { + return values(IscsiPathProvisioningState.class); + } +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/IscsiPaths.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/IscsiPaths.java new file mode 100644 index 0000000000000..c4cb34ba241c7 --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/IscsiPaths.java @@ -0,0 +1,116 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.avs.models; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; +import com.azure.resourcemanager.avs.fluent.models.IscsiPathInner; + +/** + * Resource collection API of IscsiPaths. + */ +public interface IscsiPaths { + /** + * List IscsiPath resources by PrivateCloud. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @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 response of a IscsiPath list operation as paginated response with {@link PagedIterable}. + */ + PagedIterable listByPrivateCloud(String resourceGroupName, String privateCloudName); + + /** + * List IscsiPath resources by PrivateCloud. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @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 response of a IscsiPath list operation as paginated response with {@link PagedIterable}. + */ + PagedIterable listByPrivateCloud(String resourceGroupName, String privateCloudName, Context context); + + /** + * Get a IscsiPath. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @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 a IscsiPath along with {@link Response}. + */ + Response getWithResponse(String resourceGroupName, String privateCloudName, Context context); + + /** + * Get a IscsiPath. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @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 a IscsiPath. + */ + IscsiPath get(String resourceGroupName, String privateCloudName); + + /** + * Create a IscsiPath. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param resource Resource create parameters. + * @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 an iSCSI path resource. + */ + IscsiPath createOrUpdate(String resourceGroupName, String privateCloudName, IscsiPathInner resource); + + /** + * Create a IscsiPath. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param resource Resource create parameters. + * @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 an iSCSI path resource. + */ + IscsiPath createOrUpdate(String resourceGroupName, String privateCloudName, IscsiPathInner resource, + Context context); + + /** + * Delete a IscsiPath. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @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. + */ + void deleteByResourceGroup(String resourceGroupName, String privateCloudName); + + /** + * Delete a IscsiPath. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @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. + */ + void delete(String resourceGroupName, String privateCloudName, Context context); +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/Locations.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/Locations.java index 14b6b212efde1..1fdd347f62d2a 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/Locations.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/Locations.java @@ -7,52 +7,54 @@ import com.azure.core.http.rest.Response; import com.azure.core.util.Context; -/** Resource collection API of Locations. */ +/** + * Resource collection API of Locations. + */ public interface Locations { /** - * Return trial status for subscription by region. - * - * @param location Azure region. - * @param sku The sku to check for trial availability. + * Return quota for subscription by region. + * + * @param location The name of the Azure region. * @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 subscription trial availability along with {@link Response}. + * @return subscription quotas along with {@link Response}. */ - Response checkTrialAvailabilityWithResponse(String location, Sku sku, Context context); + Response checkQuotaAvailabilityWithResponse(String location, Context context); /** - * Return trial status for subscription by region. - * - * @param location Azure region. + * Return quota for subscription by region. + * + * @param location The name of the Azure region. * @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 subscription trial availability. + * @return subscription quotas. */ - Trial checkTrialAvailability(String location); + Quota checkQuotaAvailability(String location); /** - * Return quota for subscription by region. - * - * @param location Azure region. + * Return trial status for subscription by region. + * + * @param location The name of the Azure region. + * @param sku Optionally, check for a specific SKU. * @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 subscription quotas along with {@link Response}. + * @return subscription trial availability along with {@link Response}. */ - Response checkQuotaAvailabilityWithResponse(String location, Context context); + Response checkTrialAvailabilityWithResponse(String location, Sku sku, Context context); /** - * Return quota for subscription by region. - * - * @param location Azure region. + * Return trial status for subscription by region. + * + * @param location The name of the Azure region. * @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 subscription quotas. + * @return subscription trial availability. */ - Quota checkQuotaAvailability(String location); + Trial checkTrialAvailability(String location); } diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/LogSpecification.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/LogSpecification.java deleted file mode 100644 index 4740950751a3f..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/LogSpecification.java +++ /dev/null @@ -1,102 +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.avs.models; - -import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Specifications of the Log for Azure Monitoring. */ -@Fluent -public final class LogSpecification { - /* - * Name of the log - */ - @JsonProperty(value = "name") - private String name; - - /* - * Localized friendly display name of the log - */ - @JsonProperty(value = "displayName") - private String displayName; - - /* - * Blob duration of the log - */ - @JsonProperty(value = "blobDuration") - private String blobDuration; - - /** Creates an instance of LogSpecification class. */ - public LogSpecification() { - } - - /** - * Get the name property: Name of the log. - * - * @return the name value. - */ - public String name() { - return this.name; - } - - /** - * Set the name property: Name of the log. - * - * @param name the name value to set. - * @return the LogSpecification object itself. - */ - public LogSpecification withName(String name) { - this.name = name; - return this; - } - - /** - * Get the displayName property: Localized friendly display name of the log. - * - * @return the displayName value. - */ - public String displayName() { - return this.displayName; - } - - /** - * Set the displayName property: Localized friendly display name of the log. - * - * @param displayName the displayName value to set. - * @return the LogSpecification object itself. - */ - public LogSpecification withDisplayName(String displayName) { - this.displayName = displayName; - return this; - } - - /** - * Get the blobDuration property: Blob duration of the log. - * - * @return the blobDuration value. - */ - public String blobDuration() { - return this.blobDuration; - } - - /** - * Set the blobDuration property: Blob duration of the log. - * - * @param blobDuration the blobDuration value to set. - * @return the LogSpecification object itself. - */ - public LogSpecification withBlobDuration(String blobDuration) { - this.blobDuration = blobDuration; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ManagementCluster.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ManagementCluster.java index 7f1e6434c851f..5ab4ec38ac5f7 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ManagementCluster.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ManagementCluster.java @@ -5,36 +5,133 @@ package com.azure.resourcemanager.avs.models; import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** The properties of a management cluster. */ +/** + * The properties of a management cluster. + */ @Fluent -public final class ManagementCluster extends CommonClusterProperties { - /** Creates an instance of ManagementCluster class. */ +public final class ManagementCluster { + /* + * The cluster size + */ + @JsonProperty(value = "clusterSize") + private Integer clusterSize; + + /* + * The state of the cluster provisioning + */ + @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private ClusterProvisioningState provisioningState; + + /* + * The identity + */ + @JsonProperty(value = "clusterId", access = JsonProperty.Access.WRITE_ONLY) + private Integer clusterId; + + /* + * The hosts + */ + @JsonProperty(value = "hosts") + private List hosts; + + /* + * Name of the vsan datastore associated with the cluster + */ + @JsonProperty(value = "vsanDatastoreName") + private String vsanDatastoreName; + + /** + * Creates an instance of ManagementCluster class. + */ public ManagementCluster() { } - /** {@inheritDoc} */ - @Override + /** + * Get the clusterSize property: The cluster size. + * + * @return the clusterSize value. + */ + public Integer clusterSize() { + return this.clusterSize; + } + + /** + * Set the clusterSize property: The cluster size. + * + * @param clusterSize the clusterSize value to set. + * @return the ManagementCluster object itself. + */ public ManagementCluster withClusterSize(Integer clusterSize) { - super.withClusterSize(clusterSize); + this.clusterSize = clusterSize; return this; } - /** {@inheritDoc} */ - @Override + /** + * Get the provisioningState property: The state of the cluster provisioning. + * + * @return the provisioningState value. + */ + public ClusterProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Get the clusterId property: The identity. + * + * @return the clusterId value. + */ + public Integer clusterId() { + return this.clusterId; + } + + /** + * Get the hosts property: The hosts. + * + * @return the hosts value. + */ + public List hosts() { + return this.hosts; + } + + /** + * Set the hosts property: The hosts. + * + * @param hosts the hosts value to set. + * @return the ManagementCluster object itself. + */ public ManagementCluster withHosts(List hosts) { - super.withHosts(hosts); + this.hosts = hosts; + return this; + } + + /** + * Get the vsanDatastoreName property: Name of the vsan datastore associated with the cluster. + * + * @return the vsanDatastoreName value. + */ + public String vsanDatastoreName() { + return this.vsanDatastoreName; + } + + /** + * Set the vsanDatastoreName property: Name of the vsan datastore associated with the cluster. + * + * @param vsanDatastoreName the vsanDatastoreName value to set. + * @return the ManagementCluster object itself. + */ + public ManagementCluster withVsanDatastoreName(String vsanDatastoreName) { + this.vsanDatastoreName = vsanDatastoreName; return this; } /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ - @Override public void validate() { - super.validate(); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/MetricDimension.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/MetricDimension.java deleted file mode 100644 index c46df6fe18e8a..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/MetricDimension.java +++ /dev/null @@ -1,130 +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.avs.models; - -import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Specifications of the Dimension of metrics. */ -@Fluent -public final class MetricDimension { - /* - * Name of the dimension - */ - @JsonProperty(value = "name") - private String name; - - /* - * Localized friendly display name of the dimension - */ - @JsonProperty(value = "displayName") - private String displayName; - - /* - * Name of the dimension as it appears in MDM - */ - @JsonProperty(value = "internalName") - private String internalName; - - /* - * A boolean flag indicating whether this dimension should be included for the shoebox export scenario - */ - @JsonProperty(value = "toBeExportedForShoebox") - private Boolean toBeExportedForShoebox; - - /** Creates an instance of MetricDimension class. */ - public MetricDimension() { - } - - /** - * Get the name property: Name of the dimension. - * - * @return the name value. - */ - public String name() { - return this.name; - } - - /** - * Set the name property: Name of the dimension. - * - * @param name the name value to set. - * @return the MetricDimension object itself. - */ - public MetricDimension withName(String name) { - this.name = name; - return this; - } - - /** - * Get the displayName property: Localized friendly display name of the dimension. - * - * @return the displayName value. - */ - public String displayName() { - return this.displayName; - } - - /** - * Set the displayName property: Localized friendly display name of the dimension. - * - * @param displayName the displayName value to set. - * @return the MetricDimension object itself. - */ - public MetricDimension withDisplayName(String displayName) { - this.displayName = displayName; - return this; - } - - /** - * Get the internalName property: Name of the dimension as it appears in MDM. - * - * @return the internalName value. - */ - public String internalName() { - return this.internalName; - } - - /** - * Set the internalName property: Name of the dimension as it appears in MDM. - * - * @param internalName the internalName value to set. - * @return the MetricDimension object itself. - */ - public MetricDimension withInternalName(String internalName) { - this.internalName = internalName; - return this; - } - - /** - * Get the toBeExportedForShoebox property: A boolean flag indicating whether this dimension should be included for - * the shoebox export scenario. - * - * @return the toBeExportedForShoebox value. - */ - public Boolean toBeExportedForShoebox() { - return this.toBeExportedForShoebox; - } - - /** - * Set the toBeExportedForShoebox property: A boolean flag indicating whether this dimension should be included for - * the shoebox export scenario. - * - * @param toBeExportedForShoebox the toBeExportedForShoebox value to set. - * @return the MetricDimension object itself. - */ - public MetricDimension withToBeExportedForShoebox(Boolean toBeExportedForShoebox) { - this.toBeExportedForShoebox = toBeExportedForShoebox; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/MetricSpecification.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/MetricSpecification.java deleted file mode 100644 index dc41d71395563..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/MetricSpecification.java +++ /dev/null @@ -1,372 +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.avs.models; - -import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** Specifications of the Metrics for Azure Monitoring. */ -@Fluent -public final class MetricSpecification { - /* - * Name of the metric - */ - @JsonProperty(value = "name") - private String name; - - /* - * Localized friendly display name of the metric - */ - @JsonProperty(value = "displayName") - private String displayName; - - /* - * Localized friendly description of the metric - */ - @JsonProperty(value = "displayDescription") - private String displayDescription; - - /* - * Unit that makes sense for the metric - */ - @JsonProperty(value = "unit") - private String unit; - - /* - * Name of the metric category that the metric belongs to. A metric can only belong to a single category. - */ - @JsonProperty(value = "category") - private String category; - - /* - * Only provide one value for this field. Valid values: Average, Minimum, Maximum, Total, Count. - */ - @JsonProperty(value = "aggregationType") - private String aggregationType; - - /* - * Supported aggregation types - */ - @JsonProperty(value = "supportedAggregationTypes") - private List supportedAggregationTypes; - - /* - * Supported time grain types - */ - @JsonProperty(value = "supportedTimeGrainTypes") - private List supportedTimeGrainTypes; - - /* - * Optional. If set to true, then zero will be returned for time duration where no metric is emitted/published. - */ - @JsonProperty(value = "fillGapWithZero") - private Boolean fillGapWithZero; - - /* - * Dimensions of the metric - */ - @JsonProperty(value = "dimensions") - private List dimensions; - - /* - * Whether or not the service is using regional MDM accounts. - */ - @JsonProperty(value = "enableRegionalMdmAccount") - private String enableRegionalMdmAccount; - - /* - * The name of the MDM account. - */ - @JsonProperty(value = "sourceMdmAccount") - private String sourceMdmAccount; - - /* - * The name of the MDM namespace. - */ - @JsonProperty(value = "sourceMdmNamespace") - private String sourceMdmNamespace; - - /** Creates an instance of MetricSpecification class. */ - public MetricSpecification() { - } - - /** - * Get the name property: Name of the metric. - * - * @return the name value. - */ - public String name() { - return this.name; - } - - /** - * Set the name property: Name of the metric. - * - * @param name the name value to set. - * @return the MetricSpecification object itself. - */ - public MetricSpecification withName(String name) { - this.name = name; - return this; - } - - /** - * Get the displayName property: Localized friendly display name of the metric. - * - * @return the displayName value. - */ - public String displayName() { - return this.displayName; - } - - /** - * Set the displayName property: Localized friendly display name of the metric. - * - * @param displayName the displayName value to set. - * @return the MetricSpecification object itself. - */ - public MetricSpecification withDisplayName(String displayName) { - this.displayName = displayName; - return this; - } - - /** - * Get the displayDescription property: Localized friendly description of the metric. - * - * @return the displayDescription value. - */ - public String displayDescription() { - return this.displayDescription; - } - - /** - * Set the displayDescription property: Localized friendly description of the metric. - * - * @param displayDescription the displayDescription value to set. - * @return the MetricSpecification object itself. - */ - public MetricSpecification withDisplayDescription(String displayDescription) { - this.displayDescription = displayDescription; - return this; - } - - /** - * Get the unit property: Unit that makes sense for the metric. - * - * @return the unit value. - */ - public String unit() { - return this.unit; - } - - /** - * Set the unit property: Unit that makes sense for the metric. - * - * @param unit the unit value to set. - * @return the MetricSpecification object itself. - */ - public MetricSpecification withUnit(String unit) { - this.unit = unit; - return this; - } - - /** - * Get the category property: Name of the metric category that the metric belongs to. A metric can only belong to a - * single category. - * - * @return the category value. - */ - public String category() { - return this.category; - } - - /** - * Set the category property: Name of the metric category that the metric belongs to. A metric can only belong to a - * single category. - * - * @param category the category value to set. - * @return the MetricSpecification object itself. - */ - public MetricSpecification withCategory(String category) { - this.category = category; - return this; - } - - /** - * Get the aggregationType property: Only provide one value for this field. Valid values: Average, Minimum, Maximum, - * Total, Count. - * - * @return the aggregationType value. - */ - public String aggregationType() { - return this.aggregationType; - } - - /** - * Set the aggregationType property: Only provide one value for this field. Valid values: Average, Minimum, Maximum, - * Total, Count. - * - * @param aggregationType the aggregationType value to set. - * @return the MetricSpecification object itself. - */ - public MetricSpecification withAggregationType(String aggregationType) { - this.aggregationType = aggregationType; - return this; - } - - /** - * Get the supportedAggregationTypes property: Supported aggregation types. - * - * @return the supportedAggregationTypes value. - */ - public List supportedAggregationTypes() { - return this.supportedAggregationTypes; - } - - /** - * Set the supportedAggregationTypes property: Supported aggregation types. - * - * @param supportedAggregationTypes the supportedAggregationTypes value to set. - * @return the MetricSpecification object itself. - */ - public MetricSpecification withSupportedAggregationTypes(List supportedAggregationTypes) { - this.supportedAggregationTypes = supportedAggregationTypes; - return this; - } - - /** - * Get the supportedTimeGrainTypes property: Supported time grain types. - * - * @return the supportedTimeGrainTypes value. - */ - public List supportedTimeGrainTypes() { - return this.supportedTimeGrainTypes; - } - - /** - * Set the supportedTimeGrainTypes property: Supported time grain types. - * - * @param supportedTimeGrainTypes the supportedTimeGrainTypes value to set. - * @return the MetricSpecification object itself. - */ - public MetricSpecification withSupportedTimeGrainTypes(List supportedTimeGrainTypes) { - this.supportedTimeGrainTypes = supportedTimeGrainTypes; - return this; - } - - /** - * Get the fillGapWithZero property: Optional. If set to true, then zero will be returned for time duration where no - * metric is emitted/published. - * - * @return the fillGapWithZero value. - */ - public Boolean fillGapWithZero() { - return this.fillGapWithZero; - } - - /** - * Set the fillGapWithZero property: Optional. If set to true, then zero will be returned for time duration where no - * metric is emitted/published. - * - * @param fillGapWithZero the fillGapWithZero value to set. - * @return the MetricSpecification object itself. - */ - public MetricSpecification withFillGapWithZero(Boolean fillGapWithZero) { - this.fillGapWithZero = fillGapWithZero; - return this; - } - - /** - * Get the dimensions property: Dimensions of the metric. - * - * @return the dimensions value. - */ - public List dimensions() { - return this.dimensions; - } - - /** - * Set the dimensions property: Dimensions of the metric. - * - * @param dimensions the dimensions value to set. - * @return the MetricSpecification object itself. - */ - public MetricSpecification withDimensions(List dimensions) { - this.dimensions = dimensions; - return this; - } - - /** - * Get the enableRegionalMdmAccount property: Whether or not the service is using regional MDM accounts. - * - * @return the enableRegionalMdmAccount value. - */ - public String enableRegionalMdmAccount() { - return this.enableRegionalMdmAccount; - } - - /** - * Set the enableRegionalMdmAccount property: Whether or not the service is using regional MDM accounts. - * - * @param enableRegionalMdmAccount the enableRegionalMdmAccount value to set. - * @return the MetricSpecification object itself. - */ - public MetricSpecification withEnableRegionalMdmAccount(String enableRegionalMdmAccount) { - this.enableRegionalMdmAccount = enableRegionalMdmAccount; - return this; - } - - /** - * Get the sourceMdmAccount property: The name of the MDM account. - * - * @return the sourceMdmAccount value. - */ - public String sourceMdmAccount() { - return this.sourceMdmAccount; - } - - /** - * Set the sourceMdmAccount property: The name of the MDM account. - * - * @param sourceMdmAccount the sourceMdmAccount value to set. - * @return the MetricSpecification object itself. - */ - public MetricSpecification withSourceMdmAccount(String sourceMdmAccount) { - this.sourceMdmAccount = sourceMdmAccount; - return this; - } - - /** - * Get the sourceMdmNamespace property: The name of the MDM namespace. - * - * @return the sourceMdmNamespace value. - */ - public String sourceMdmNamespace() { - return this.sourceMdmNamespace; - } - - /** - * Set the sourceMdmNamespace property: The name of the MDM namespace. - * - * @param sourceMdmNamespace the sourceMdmNamespace value to set. - * @return the MetricSpecification object itself. - */ - public MetricSpecification withSourceMdmNamespace(String sourceMdmNamespace) { - this.sourceMdmNamespace = sourceMdmNamespace; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (dimensions() != null) { - dimensions().forEach(e -> e.validate()); - } - } -} diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/MountOptionEnum.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/MountOptionEnum.java index 4825595db6d10..432d322dce550 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/MountOptionEnum.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/MountOptionEnum.java @@ -8,17 +8,24 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Mode that describes whether the LUN has to be mounted as a datastore or attached as a LUN. */ +/** + * Mode that describes whether the LUN has to be mounted as a datastore or + * attached as a LUN. + */ public final class MountOptionEnum extends ExpandableStringEnum { - /** Static value MOUNT for MountOptionEnum. */ + /** + * Static value MOUNT for MountOptionEnum. + */ public static final MountOptionEnum MOUNT = fromString("MOUNT"); - /** Static value ATTACH for MountOptionEnum. */ + /** + * Static value ATTACH for MountOptionEnum. + */ public static final MountOptionEnum ATTACH = fromString("ATTACH"); /** * Creates a new instance of MountOptionEnum value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -27,7 +34,7 @@ public MountOptionEnum() { /** * Creates or finds a MountOptionEnum from its string representation. - * + * * @param name a name to look for. * @return the corresponding MountOptionEnum. */ @@ -38,7 +45,7 @@ public static MountOptionEnum fromString(String name) { /** * Gets known MountOptionEnum values. - * + * * @return known MountOptionEnum values. */ public static Collection values() { diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/NetAppVolume.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/NetAppVolume.java index a891e2bbb9bf6..26fa4939fbb31 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/NetAppVolume.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/NetAppVolume.java @@ -8,7 +8,9 @@ import com.azure.core.util.logging.ClientLogger; import com.fasterxml.jackson.annotation.JsonProperty; -/** An Azure NetApp Files volume from Microsoft.NetApp provider. */ +/** + * An Azure NetApp Files volume from Microsoft.NetApp provider. + */ @Fluent public final class NetAppVolume { /* @@ -17,13 +19,15 @@ public final class NetAppVolume { @JsonProperty(value = "id", required = true) private String id; - /** Creates an instance of NetAppVolume class. */ + /** + * Creates an instance of NetAppVolume class. + */ public NetAppVolume() { } /** * Get the id property: Azure resource ID of the NetApp volume. - * + * * @return the id value. */ public String id() { @@ -32,7 +36,7 @@ public String id() { /** * Set the id property: Azure resource ID of the NetApp volume. - * + * * @param id the id value to set. * @return the NetAppVolume object itself. */ @@ -43,14 +47,13 @@ public NetAppVolume withId(String id) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { if (id() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property id in model NetAppVolume")); + throw LOGGER.logExceptionAsError( + new IllegalArgumentException("Missing required property id in model NetAppVolume")); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/NsxPublicIpQuotaRaisedEnum.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/NsxPublicIpQuotaRaisedEnum.java index 97ba0c7705324..f7fa7fb4cd208 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/NsxPublicIpQuotaRaisedEnum.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/NsxPublicIpQuotaRaisedEnum.java @@ -9,18 +9,22 @@ import java.util.Collection; /** - * Flag to indicate whether the private cloud has the quota for provisioned NSX Public IP count raised from 64 to 1024. + * NSX public IP quota raised. */ public final class NsxPublicIpQuotaRaisedEnum extends ExpandableStringEnum { - /** Static value Enabled for NsxPublicIpQuotaRaisedEnum. */ + /** + * Static value Enabled for NsxPublicIpQuotaRaisedEnum. + */ public static final NsxPublicIpQuotaRaisedEnum ENABLED = fromString("Enabled"); - /** Static value Disabled for NsxPublicIpQuotaRaisedEnum. */ + /** + * Static value Disabled for NsxPublicIpQuotaRaisedEnum. + */ public static final NsxPublicIpQuotaRaisedEnum DISABLED = fromString("Disabled"); /** * Creates a new instance of NsxPublicIpQuotaRaisedEnum value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -29,7 +33,7 @@ public NsxPublicIpQuotaRaisedEnum() { /** * Creates or finds a NsxPublicIpQuotaRaisedEnum from its string representation. - * + * * @param name a name to look for. * @return the corresponding NsxPublicIpQuotaRaisedEnum. */ @@ -40,7 +44,7 @@ public static NsxPublicIpQuotaRaisedEnum fromString(String name) { /** * Gets known NsxPublicIpQuotaRaisedEnum values. - * + * * @return known NsxPublicIpQuotaRaisedEnum values. */ public static Collection values() { diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/Operation.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/Operation.java index 6afa83bc4ba5e..2fc37eedfbcae 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/Operation.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/Operation.java @@ -6,46 +6,52 @@ import com.azure.resourcemanager.avs.fluent.models.OperationInner; -/** An immutable client-side representation of Operation. */ +/** + * An immutable client-side representation of Operation. + */ public interface Operation { /** - * Gets the name property: Name of the operation being performed on this object. - * + * Gets the name property: The name of the operation, as per Resource-Based Access Control (RBAC). Examples: + * "Microsoft.Compute/virtualMachines/write", "Microsoft.Compute/virtualMachines/capture/action". + * * @return the name value. */ String name(); /** - * Gets the display property: Contains the localized display information for this operation. - * - * @return the display value. + * Gets the isDataAction property: Whether the operation applies to data-plane. This is "true" for data-plane + * operations and "false" for ARM/control-plane operations. + * + * @return the isDataAction value. */ - OperationDisplay display(); + Boolean isDataAction(); /** - * Gets the isDataAction property: Gets or sets a value indicating whether the operation is a data action or not. - * - * @return the isDataAction value. + * Gets the display property: Localized display information for this particular operation. + * + * @return the display value. */ - Boolean isDataAction(); + OperationDisplay display(); /** - * Gets the origin property: Origin of the operation. - * + * Gets the origin property: The intended executor of the operation; as in Resource Based Access Control (RBAC) and + * audit logs UX. Default value is "user,system". + * * @return the origin value. */ - String origin(); + Origin origin(); /** - * Gets the properties property: Properties of the operation. - * - * @return the properties value. + * Gets the actionType property: Enum. Indicates the action type. "Internal" refers to actions that are for internal + * only APIs. + * + * @return the actionType value. */ - OperationProperties properties(); + ActionType actionType(); /** * Gets the inner com.azure.resourcemanager.avs.fluent.models.OperationInner object. - * + * * @return the inner object. */ OperationInner innerModel(); diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/OperationDisplay.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/OperationDisplay.java index 816f07571bdbd..06b371efb1fee 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/OperationDisplay.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/OperationDisplay.java @@ -7,40 +7,48 @@ import com.azure.core.annotation.Immutable; import com.fasterxml.jackson.annotation.JsonProperty; -/** Contains the localized display information for this operation. */ +/** + * Localized display information for this particular operation. + */ @Immutable public final class OperationDisplay { /* - * Localized friendly form of the resource provider name + * The localized friendly form of the resource provider name, e.g. "Microsoft Monitoring Insights" or "Microsoft + * Compute". */ @JsonProperty(value = "provider", access = JsonProperty.Access.WRITE_ONLY) private String provider; /* - * Localized friendly form of the resource type related to this operation + * The localized friendly name of the resource type related to this operation. E.g. "Virtual Machines" or "Job + * Schedule Collections". */ @JsonProperty(value = "resource", access = JsonProperty.Access.WRITE_ONLY) private String resource; /* - * Localized friendly name for the operation + * The concise, localized friendly name for the operation; suitable for dropdowns. E.g. "Create or Update Virtual + * Machine", "Restart Virtual Machine". */ @JsonProperty(value = "operation", access = JsonProperty.Access.WRITE_ONLY) private String operation; /* - * Localized friendly description for the operation + * The short, localized friendly description of the operation; suitable for tool tips and detailed views. */ @JsonProperty(value = "description", access = JsonProperty.Access.WRITE_ONLY) private String description; - /** Creates an instance of OperationDisplay class. */ + /** + * Creates an instance of OperationDisplay class. + */ public OperationDisplay() { } /** - * Get the provider property: Localized friendly form of the resource provider name. - * + * Get the provider property: The localized friendly form of the resource provider name, e.g. "Microsoft Monitoring + * Insights" or "Microsoft Compute". + * * @return the provider value. */ public String provider() { @@ -48,8 +56,9 @@ public String provider() { } /** - * Get the resource property: Localized friendly form of the resource type related to this operation. - * + * Get the resource property: The localized friendly name of the resource type related to this operation. E.g. + * "Virtual Machines" or "Job Schedule Collections". + * * @return the resource value. */ public String resource() { @@ -57,8 +66,9 @@ public String resource() { } /** - * Get the operation property: Localized friendly name for the operation. - * + * Get the operation property: The concise, localized friendly name for the operation; suitable for dropdowns. E.g. + * "Create or Update Virtual Machine", "Restart Virtual Machine". + * * @return the operation value. */ public String operation() { @@ -66,8 +76,9 @@ public String operation() { } /** - * Get the description property: Localized friendly description for the operation. - * + * Get the description property: The short, localized friendly description of the operation; suitable for tool tips + * and detailed views. + * * @return the description value. */ public String description() { @@ -76,7 +87,7 @@ public String description() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/OperationList.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/OperationListResult.java similarity index 64% rename from sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/OperationList.java rename to sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/OperationListResult.java index db2ba6e2ae71c..d31c8d6264850 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/OperationList.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/OperationListResult.java @@ -9,28 +9,33 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** Pageable list of operations. */ +/** + * 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 OperationList { +public final class OperationListResult { /* - * List of operations + * List of operations supported by the resource provider */ @JsonProperty(value = "value", access = JsonProperty.Access.WRITE_ONLY) private List value; /* - * URL to get the next page if any + * 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; - /** Creates an instance of OperationList class. */ - public OperationList() { + /** + * Creates an instance of OperationListResult class. + */ + public OperationListResult() { } /** - * Get the value property: List of operations. - * + * Get the value property: List of operations supported by the resource provider. + * * @return the value value. */ public List value() { @@ -38,8 +43,8 @@ public List value() { } /** - * Get the nextLink property: URL to get the next page if any. - * + * 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() { @@ -48,7 +53,7 @@ public String nextLink() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/OperationProperties.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/OperationProperties.java deleted file mode 100644 index 004cddca52d74..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/OperationProperties.java +++ /dev/null @@ -1,53 +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.avs.models; - -import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Extra Operation properties. */ -@Fluent -public final class OperationProperties { - /* - * Service specifications of the operation - */ - @JsonProperty(value = "serviceSpecification") - private ServiceSpecification serviceSpecification; - - /** Creates an instance of OperationProperties class. */ - public OperationProperties() { - } - - /** - * Get the serviceSpecification property: Service specifications of the operation. - * - * @return the serviceSpecification value. - */ - public ServiceSpecification serviceSpecification() { - return this.serviceSpecification; - } - - /** - * Set the serviceSpecification property: Service specifications of the operation. - * - * @param serviceSpecification the serviceSpecification value to set. - * @return the OperationProperties object itself. - */ - public OperationProperties withServiceSpecification(ServiceSpecification serviceSpecification) { - this.serviceSpecification = serviceSpecification; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (serviceSpecification() != null) { - serviceSpecification().validate(); - } - } -} diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/Operations.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/Operations.java index 4fbbe1e188a65..cb222779caf17 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/Operations.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/Operations.java @@ -7,25 +7,29 @@ import com.azure.core.http.rest.PagedIterable; import com.azure.core.util.Context; -/** Resource collection API of Operations. */ +/** + * Resource collection API of Operations. + */ public interface Operations { /** - * Lists all of the available operations. - * + * List the operations for the provider. + * * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return pageable list of operations as paginated response with {@link PagedIterable}. + * @return a list of REST API operations supported by an Azure Resource Provider as paginated response with + * {@link PagedIterable}. */ PagedIterable list(); /** - * Lists all of the available operations. - * + * List the operations for the provider. + * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return pageable list of operations as paginated response with {@link PagedIterable}. + * @return a list of REST API operations supported by an Azure Resource Provider as paginated response with + * {@link PagedIterable}. */ PagedIterable list(Context context); } diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/OptionalParamEnum.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/OptionalParamEnum.java index bed8128e0e575..e84a628f35d96 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/OptionalParamEnum.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/OptionalParamEnum.java @@ -8,17 +8,23 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Is this parameter required or optional. */ +/** + * Optional Param. + */ public final class OptionalParamEnum extends ExpandableStringEnum { - /** Static value Optional for OptionalParamEnum. */ + /** + * Static value Optional for OptionalParamEnum. + */ public static final OptionalParamEnum OPTIONAL = fromString("Optional"); - /** Static value Required for OptionalParamEnum. */ + /** + * Static value Required for OptionalParamEnum. + */ public static final OptionalParamEnum REQUIRED = fromString("Required"); /** * Creates a new instance of OptionalParamEnum value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -27,7 +33,7 @@ public OptionalParamEnum() { /** * Creates or finds a OptionalParamEnum from its string representation. - * + * * @param name a name to look for. * @return the corresponding OptionalParamEnum. */ @@ -38,7 +44,7 @@ public static OptionalParamEnum fromString(String name) { /** * Gets known OptionalParamEnum values. - * + * * @return known OptionalParamEnum values. */ public static Collection values() { diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/Origin.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/Origin.java new file mode 100644 index 0000000000000..6300122be9e9d --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/Origin.java @@ -0,0 +1,59 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.avs.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** + * The intended executor of the operation; as in Resource Based Access Control (RBAC) and audit logs UX. Default value + * is "user,system". + */ +public final class Origin extends ExpandableStringEnum { + /** + * Static value user for Origin. + */ + public static final Origin USER = fromString("user"); + + /** + * Static value system for Origin. + */ + public static final Origin SYSTEM = fromString("system"); + + /** + * Static value user,system for Origin. + */ + public static final Origin USER_SYSTEM = fromString("user,system"); + + /** + * Creates a new instance of Origin value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public Origin() { + } + + /** + * Creates or finds a Origin from its string representation. + * + * @param name a name to look for. + * @return the corresponding Origin. + */ + @JsonCreator + public static Origin fromString(String name) { + return fromString(name, Origin.class); + } + + /** + * Gets known Origin values. + * + * @return known Origin values. + */ + public static Collection values() { + return values(Origin.class); + } +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/PSCredentialExecutionParameter.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/PSCredentialExecutionParameter.java index 1f69de84e47a2..21dd810326170 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/PSCredentialExecutionParameter.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/PSCredentialExecutionParameter.java @@ -9,7 +9,9 @@ import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; -/** a powershell credential object. */ +/** + * a powershell credential object. + */ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type") @JsonTypeName("Credential") @Fluent @@ -26,13 +28,15 @@ public final class PSCredentialExecutionParameter extends ScriptExecutionParamet @JsonProperty(value = "password") private String password; - /** Creates an instance of PSCredentialExecutionParameter class. */ + /** + * Creates an instance of PSCredentialExecutionParameter class. + */ public PSCredentialExecutionParameter() { } /** * Get the username property: username for login. - * + * * @return the username value. */ public String username() { @@ -41,7 +45,7 @@ public String username() { /** * Set the username property: username for login. - * + * * @param username the username value to set. * @return the PSCredentialExecutionParameter object itself. */ @@ -52,7 +56,7 @@ public PSCredentialExecutionParameter withUsername(String username) { /** * Get the password property: password for login. - * + * * @return the password value. */ public String password() { @@ -61,7 +65,7 @@ public String password() { /** * Set the password property: password for login. - * + * * @param password the password value to set. * @return the PSCredentialExecutionParameter object itself. */ @@ -70,7 +74,9 @@ public PSCredentialExecutionParameter withPassword(String password) { return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public PSCredentialExecutionParameter withName(String name) { super.withName(name); @@ -79,7 +85,7 @@ public PSCredentialExecutionParameter withName(String name) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ @Override diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/PlacementPolicies.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/PlacementPolicies.java index 72f2987469ded..feb1138cf5df8 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/PlacementPolicies.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/PlacementPolicies.java @@ -8,78 +8,76 @@ import com.azure.core.http.rest.Response; import com.azure.core.util.Context; -/** Resource collection API of PlacementPolicies. */ +/** + * Resource collection API of PlacementPolicies. + */ public interface PlacementPolicies { /** - * List placement policies in a private cloud cluster. - * + * List PlacementPolicy resources by Cluster. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param clusterName Name of the cluster in the private cloud. + * @param clusterName Name of the cluster. * @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 represents list of placement policies as paginated response with {@link PagedIterable}. + * @return the response of a PlacementPolicy list operation as paginated response with {@link PagedIterable}. */ PagedIterable list(String resourceGroupName, String privateCloudName, String clusterName); /** - * List placement policies in a private cloud cluster. - * + * List PlacementPolicy resources by Cluster. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param clusterName Name of the cluster in the private cloud. + * @param clusterName Name of the cluster. * @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 represents list of placement policies as paginated response with {@link PagedIterable}. + * @return the response of a PlacementPolicy list operation as paginated response with {@link PagedIterable}. */ - PagedIterable list( - String resourceGroupName, String privateCloudName, String clusterName, Context context); + PagedIterable list(String resourceGroupName, String privateCloudName, String clusterName, + Context context); /** - * Get a placement policy by name in a private cloud cluster. - * + * Get a PlacementPolicy. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param clusterName Name of the cluster in the private cloud. - * @param placementPolicyName Name of the VMware vSphere Distributed Resource Scheduler (DRS) placement policy. + * @param clusterName Name of the cluster. + * @param placementPolicyName Name of the placement policy. * @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 a placement policy by name in a private cloud cluster along with {@link Response}. + * @return a PlacementPolicy along with {@link Response}. */ - Response getWithResponse( - String resourceGroupName, - String privateCloudName, - String clusterName, - String placementPolicyName, - Context context); + Response getWithResponse(String resourceGroupName, String privateCloudName, String clusterName, + String placementPolicyName, Context context); /** - * Get a placement policy by name in a private cloud cluster. - * + * Get a PlacementPolicy. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param clusterName Name of the cluster in the private cloud. - * @param placementPolicyName Name of the VMware vSphere Distributed Resource Scheduler (DRS) placement policy. + * @param clusterName Name of the cluster. + * @param placementPolicyName Name of the placement policy. * @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 a placement policy by name in a private cloud cluster. + * @return a PlacementPolicy. */ - PlacementPolicy get( - String resourceGroupName, String privateCloudName, String clusterName, String placementPolicyName); + PlacementPolicy get(String resourceGroupName, String privateCloudName, String clusterName, + String placementPolicyName); /** - * Delete a placement policy in a private cloud cluster. - * + * Delete a PlacementPolicy. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param clusterName Name of the cluster in the private cloud. - * @param placementPolicyName Name of the VMware vSphere Distributed Resource Scheduler (DRS) placement policy. + * @param clusterName Name of the cluster. + * @param placementPolicyName Name of the placement policy. * @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. @@ -87,50 +85,46 @@ PlacementPolicy get( void delete(String resourceGroupName, String privateCloudName, String clusterName, String placementPolicyName); /** - * Delete a placement policy in a private cloud cluster. - * + * Delete a PlacementPolicy. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param clusterName Name of the cluster in the private cloud. - * @param placementPolicyName Name of the VMware vSphere Distributed Resource Scheduler (DRS) placement policy. + * @param clusterName Name of the cluster. + * @param placementPolicyName Name of the placement policy. * @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. */ - void delete( - String resourceGroupName, - String privateCloudName, - String clusterName, - String placementPolicyName, + void delete(String resourceGroupName, String privateCloudName, String clusterName, String placementPolicyName, Context context); /** - * Get a placement policy by name in a private cloud cluster. - * + * Get a PlacementPolicy. + * * @param id the resource ID. * @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 a placement policy by name in a private cloud cluster along with {@link Response}. + * @return a PlacementPolicy along with {@link Response}. */ PlacementPolicy getById(String id); /** - * Get a placement policy by name in a private cloud cluster. - * + * Get a PlacementPolicy. + * * @param id the resource ID. * @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 a placement policy by name in a private cloud cluster along with {@link Response}. + * @return a PlacementPolicy along with {@link Response}. */ Response getByIdWithResponse(String id, Context context); /** - * Delete a placement policy in a private cloud cluster. - * + * Delete a PlacementPolicy. + * * @param id the resource ID. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -139,8 +133,8 @@ void delete( void deleteById(String id); /** - * Delete a placement policy in a private cloud cluster. - * + * Delete a PlacementPolicy. + * * @param id the resource ID. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -151,7 +145,7 @@ void delete( /** * Begins definition for a new PlacementPolicy resource. - * + * * @param name resource name. * @return the first stage of the new PlacementPolicy definition. */ diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/PlacementPoliciesList.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/PlacementPoliciesList.java deleted file mode 100644 index 29ec0afcf22b3..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/PlacementPoliciesList.java +++ /dev/null @@ -1,59 +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.avs.models; - -import com.azure.core.annotation.Immutable; -import com.azure.resourcemanager.avs.fluent.models.PlacementPolicyInner; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** Represents list of placement policies. */ -@Immutable -public final class PlacementPoliciesList { - /* - * The items on the page - */ - @JsonProperty(value = "value", access = JsonProperty.Access.WRITE_ONLY) - private List value; - - /* - * URL to get the next page if any - */ - @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) - private String nextLink; - - /** Creates an instance of PlacementPoliciesList class. */ - public PlacementPoliciesList() { - } - - /** - * Get the value property: The items on the page. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Get the nextLink property: URL to get the next page if 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/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/PlacementPolicy.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/PlacementPolicy.java index 877cdd290cdda..917a680a50de3 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/PlacementPolicy.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/PlacementPolicy.java @@ -4,73 +4,91 @@ package com.azure.resourcemanager.avs.models; +import com.azure.core.management.SystemData; import com.azure.core.util.Context; import com.azure.resourcemanager.avs.fluent.models.PlacementPolicyInner; import java.util.List; -/** An immutable client-side representation of PlacementPolicy. */ +/** + * An immutable client-side representation of PlacementPolicy. + */ public interface PlacementPolicy { /** * Gets the id property: Fully qualified resource Id for the resource. - * + * * @return the id value. */ String id(); /** * Gets the name property: The name of the resource. - * + * * @return the name value. */ String name(); /** * Gets the type property: The type of the resource. - * + * * @return the type value. */ String type(); /** - * Gets the properties property: placement policy properties. - * + * Gets the properties property: The resource-specific properties for this resource. + * * @return the properties value. */ PlacementPolicyProperties properties(); + /** + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + SystemData systemData(); + /** * Gets the name of the resource group. - * + * * @return the name of the resource group. */ String resourceGroupName(); /** * Gets the inner com.azure.resourcemanager.avs.fluent.models.PlacementPolicyInner object. - * + * * @return the inner object. */ PlacementPolicyInner innerModel(); - /** The entirety of the PlacementPolicy definition. */ + /** + * The entirety of the PlacementPolicy definition. + */ interface Definition extends DefinitionStages.Blank, DefinitionStages.WithParentResource, DefinitionStages.WithCreate { } - /** The PlacementPolicy definition stages. */ + /** + * The PlacementPolicy definition stages. + */ interface DefinitionStages { - /** The first stage of the PlacementPolicy definition. */ + /** + * The first stage of the PlacementPolicy definition. + */ interface Blank extends WithParentResource { } - /** The stage of the PlacementPolicy definition allowing to specify parent resource. */ + /** + * The stage of the PlacementPolicy definition allowing to specify parent resource. + */ interface WithParentResource { /** * Specifies resourceGroupName, privateCloudName, clusterName. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param clusterName Name of the cluster in the private cloud. + * @param clusterName Name of the cluster. * @return the next definition stage. */ WithCreate withExistingCluster(String resourceGroupName, String privateCloudName, String clusterName); @@ -83,26 +101,28 @@ interface WithParentResource { interface WithCreate extends DefinitionStages.WithProperties { /** * Executes the create request. - * + * * @return the created resource. */ PlacementPolicy create(); /** * Executes the create request. - * + * * @param context The context to associate with this operation. * @return the created resource. */ PlacementPolicy create(Context context); } - /** The stage of the PlacementPolicy definition allowing to specify properties. */ + /** + * The stage of the PlacementPolicy definition allowing to specify properties. + */ interface WithProperties { /** - * Specifies the properties property: placement policy properties. - * - * @param properties placement policy properties. + * Specifies the properties property: The resource-specific properties for this resource.. + * + * @param properties The resource-specific properties for this resource. * @return the next definition stage. */ WithCreate withProperties(PlacementPolicyProperties properties); @@ -111,85 +131,95 @@ interface WithProperties { /** * Begins update for the PlacementPolicy resource. - * + * * @return the stage of resource update. */ PlacementPolicy.Update update(); - /** The template for PlacementPolicy update. */ - interface Update - extends UpdateStages.WithState, - UpdateStages.WithVmMembers, - UpdateStages.WithHostMembers, - UpdateStages.WithAffinityStrength, - UpdateStages.WithAzureHybridBenefitType { + /** + * The template for PlacementPolicy update. + */ + interface Update extends UpdateStages.WithState, UpdateStages.WithVmMembers, UpdateStages.WithHostMembers, + UpdateStages.WithAffinityStrength, UpdateStages.WithAzureHybridBenefitType { /** * Executes the update request. - * + * * @return the updated resource. */ PlacementPolicy apply(); /** * Executes the update request. - * + * * @param context The context to associate with this operation. * @return the updated resource. */ PlacementPolicy apply(Context context); } - /** The PlacementPolicy update stages. */ + /** + * The PlacementPolicy update stages. + */ interface UpdateStages { - /** The stage of the PlacementPolicy update allowing to specify state. */ + /** + * The stage of the PlacementPolicy update allowing to specify state. + */ interface WithState { /** * Specifies the state property: Whether the placement policy is enabled or disabled. - * + * * @param state Whether the placement policy is enabled or disabled. * @return the next definition stage. */ Update withState(PlacementPolicyState state); } - /** The stage of the PlacementPolicy update allowing to specify vmMembers. */ + /** + * The stage of the PlacementPolicy update allowing to specify vmMembers. + */ interface WithVmMembers { /** * Specifies the vmMembers property: Virtual machine members list. - * + * * @param vmMembers Virtual machine members list. * @return the next definition stage. */ Update withVmMembers(List vmMembers); } - /** The stage of the PlacementPolicy update allowing to specify hostMembers. */ + /** + * The stage of the PlacementPolicy update allowing to specify hostMembers. + */ interface WithHostMembers { /** * Specifies the hostMembers property: Host members list. - * + * * @param hostMembers Host members list. * @return the next definition stage. */ Update withHostMembers(List hostMembers); } - /** The stage of the PlacementPolicy update allowing to specify affinityStrength. */ + /** + * The stage of the PlacementPolicy update allowing to specify affinityStrength. + */ interface WithAffinityStrength { /** * Specifies the affinityStrength property: vm-host placement policy affinity strength (should/must). - * + * * @param affinityStrength vm-host placement policy affinity strength (should/must). * @return the next definition stage. */ Update withAffinityStrength(AffinityStrength affinityStrength); } - /** The stage of the PlacementPolicy update allowing to specify azureHybridBenefitType. */ + /** + * The stage of the PlacementPolicy update allowing to specify azureHybridBenefitType. + */ interface WithAzureHybridBenefitType { /** * Specifies the azureHybridBenefitType property: placement policy azure hybrid benefit opt-in type. - * + * * @param azureHybridBenefitType placement policy azure hybrid benefit opt-in type. * @return the next definition stage. */ @@ -199,14 +229,14 @@ interface WithAzureHybridBenefitType { /** * Refreshes the resource to sync with Azure. - * + * * @return the refreshed resource. */ PlacementPolicy refresh(); /** * Refreshes the resource to sync with Azure. - * + * * @param context The context to associate with this operation. * @return the refreshed resource. */ diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/PlacementPolicyListResult.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/PlacementPolicyListResult.java new file mode 100644 index 0000000000000..18ccda7cc95d2 --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/PlacementPolicyListResult.java @@ -0,0 +1,80 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.avs.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.avs.fluent.models.PlacementPolicyInner; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** + * The response of a PlacementPolicy list operation. + */ +@Fluent +public final class PlacementPolicyListResult { + /* + * The PlacementPolicy items on this page + */ + @JsonProperty(value = "value", required = true) + private List value; + + /* + * The link to the next page of items + */ + @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) + private String nextLink; + + /** + * Creates an instance of PlacementPolicyListResult class. + */ + public PlacementPolicyListResult() { + } + + /** + * Get the value property: The PlacementPolicy items on this page. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Set the value property: The PlacementPolicy items on this page. + * + * @param value the value value to set. + * @return the PlacementPolicyListResult object itself. + */ + public PlacementPolicyListResult withValue(List value) { + this.value = value; + return this; + } + + /** + * Get the nextLink property: The link to the next page of items. + * + * @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) { + throw LOGGER.logExceptionAsError( + new IllegalArgumentException("Missing required property value in model PlacementPolicyListResult")); + } else { + value().forEach(e -> e.validate()); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(PlacementPolicyListResult.class); +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/PlacementPolicyProperties.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/PlacementPolicyProperties.java index 8ec701e857a4f..34afb5f7aeec5 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/PlacementPolicyProperties.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/PlacementPolicyProperties.java @@ -10,7 +10,9 @@ import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; -/** Abstract placement policy properties. */ +/** + * Abstract placement policy properties. + */ @JsonTypeInfo( use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, @@ -18,9 +20,8 @@ defaultImpl = PlacementPolicyProperties.class) @JsonTypeName("PlacementPolicyProperties") @JsonSubTypes({ - @JsonSubTypes.Type(name = "VmVm", value = VmPlacementPolicyProperties.class), - @JsonSubTypes.Type(name = "VmHost", value = VmHostPlacementPolicyProperties.class) -}) + @JsonSubTypes.Type(name = "VmHost", value = VmHostPlacementPolicyProperties.class), + @JsonSubTypes.Type(name = "VmVm", value = VmPlacementPolicyProperties.class) }) @Fluent public class PlacementPolicyProperties { /* @@ -41,13 +42,15 @@ public class PlacementPolicyProperties { @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) private PlacementPolicyProvisioningState provisioningState; - /** Creates an instance of PlacementPolicyProperties class. */ + /** + * Creates an instance of PlacementPolicyProperties class. + */ public PlacementPolicyProperties() { } /** * Get the state property: Whether the placement policy is enabled or disabled. - * + * * @return the state value. */ public PlacementPolicyState state() { @@ -56,7 +59,7 @@ public PlacementPolicyState state() { /** * Set the state property: Whether the placement policy is enabled or disabled. - * + * * @param state the state value to set. * @return the PlacementPolicyProperties object itself. */ @@ -67,7 +70,7 @@ public PlacementPolicyProperties withState(PlacementPolicyState state) { /** * Get the displayName property: Display name of the placement policy. - * + * * @return the displayName value. */ public String displayName() { @@ -76,7 +79,7 @@ public String displayName() { /** * Set the displayName property: Display name of the placement policy. - * + * * @param displayName the displayName value to set. * @return the PlacementPolicyProperties object itself. */ @@ -87,7 +90,7 @@ public PlacementPolicyProperties withDisplayName(String displayName) { /** * Get the provisioningState property: The provisioning state. - * + * * @return the provisioningState value. */ public PlacementPolicyProvisioningState provisioningState() { @@ -96,7 +99,7 @@ public PlacementPolicyProvisioningState provisioningState() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/PlacementPolicyProvisioningState.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/PlacementPolicyProvisioningState.java index a593addc8b656..cca3eeee91f33 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/PlacementPolicyProvisioningState.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/PlacementPolicyProvisioningState.java @@ -8,29 +8,43 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** The provisioning state. */ +/** + * Placement Policy provisioning state. + */ public final class PlacementPolicyProvisioningState extends ExpandableStringEnum { - /** Static value Succeeded for PlacementPolicyProvisioningState. */ + /** + * Static value Succeeded for PlacementPolicyProvisioningState. + */ public static final PlacementPolicyProvisioningState SUCCEEDED = fromString("Succeeded"); - /** Static value Failed for PlacementPolicyProvisioningState. */ + /** + * Static value Failed for PlacementPolicyProvisioningState. + */ public static final PlacementPolicyProvisioningState FAILED = fromString("Failed"); - /** Static value Building for PlacementPolicyProvisioningState. */ + /** + * Static value Canceled for PlacementPolicyProvisioningState. + */ + public static final PlacementPolicyProvisioningState CANCELED = fromString("Canceled"); + + /** + * Static value Building for PlacementPolicyProvisioningState. + */ public static final PlacementPolicyProvisioningState BUILDING = fromString("Building"); - /** Static value Deleting for PlacementPolicyProvisioningState. */ + /** + * Static value Deleting for PlacementPolicyProvisioningState. + */ public static final PlacementPolicyProvisioningState DELETING = fromString("Deleting"); - /** Static value Updating for PlacementPolicyProvisioningState. */ + /** + * Static value Updating for PlacementPolicyProvisioningState. + */ public static final PlacementPolicyProvisioningState UPDATING = fromString("Updating"); - /** Static value Canceled for PlacementPolicyProvisioningState. */ - public static final PlacementPolicyProvisioningState CANCELED = fromString("Canceled"); - /** * Creates a new instance of PlacementPolicyProvisioningState value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -39,7 +53,7 @@ public PlacementPolicyProvisioningState() { /** * Creates or finds a PlacementPolicyProvisioningState from its string representation. - * + * * @param name a name to look for. * @return the corresponding PlacementPolicyProvisioningState. */ @@ -50,7 +64,7 @@ public static PlacementPolicyProvisioningState fromString(String name) { /** * Gets known PlacementPolicyProvisioningState values. - * + * * @return known PlacementPolicyProvisioningState values. */ public static Collection values() { diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/PlacementPolicyState.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/PlacementPolicyState.java index b0da8a18146f5..e57c9f50adb8b 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/PlacementPolicyState.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/PlacementPolicyState.java @@ -8,17 +8,23 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Whether the placement policy is enabled or disabled. */ +/** + * Placement Policy state. + */ public final class PlacementPolicyState extends ExpandableStringEnum { - /** Static value Enabled for PlacementPolicyState. */ + /** + * Static value Enabled for PlacementPolicyState. + */ public static final PlacementPolicyState ENABLED = fromString("Enabled"); - /** Static value Disabled for PlacementPolicyState. */ + /** + * Static value Disabled for PlacementPolicyState. + */ public static final PlacementPolicyState DISABLED = fromString("Disabled"); /** * Creates a new instance of PlacementPolicyState value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -27,7 +33,7 @@ public PlacementPolicyState() { /** * Creates or finds a PlacementPolicyState from its string representation. - * + * * @param name a name to look for. * @return the corresponding PlacementPolicyState. */ @@ -38,7 +44,7 @@ public static PlacementPolicyState fromString(String name) { /** * Gets known PlacementPolicyState values. - * + * * @return known PlacementPolicyState values. */ public static Collection values() { diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/PlacementPolicyType.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/PlacementPolicyType.java index dbff05b1f3db4..e79d7855f8479 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/PlacementPolicyType.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/PlacementPolicyType.java @@ -8,17 +8,23 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** placement policy type. */ +/** + * Placement Policy type. + */ public final class PlacementPolicyType extends ExpandableStringEnum { - /** Static value VmVm for PlacementPolicyType. */ + /** + * Static value VmVm for PlacementPolicyType. + */ public static final PlacementPolicyType VM_VM = fromString("VmVm"); - /** Static value VmHost for PlacementPolicyType. */ + /** + * Static value VmHost for PlacementPolicyType. + */ public static final PlacementPolicyType VM_HOST = fromString("VmHost"); /** * Creates a new instance of PlacementPolicyType value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -27,7 +33,7 @@ public PlacementPolicyType() { /** * Creates or finds a PlacementPolicyType from its string representation. - * + * * @param name a name to look for. * @return the corresponding PlacementPolicyType. */ @@ -38,7 +44,7 @@ public static PlacementPolicyType fromString(String name) { /** * Gets known PlacementPolicyType values. - * + * * @return known PlacementPolicyType values. */ public static Collection values() { diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/PlacementPolicyUpdate.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/PlacementPolicyUpdate.java index e02f60b975d48..17eeff4e435c4 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/PlacementPolicyUpdate.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/PlacementPolicyUpdate.java @@ -9,7 +9,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** An update of a DRS placement policy resource. */ +/** + * An update of a DRS placement policy resource. + */ @Fluent public final class PlacementPolicyUpdate { /* @@ -18,13 +20,15 @@ public final class PlacementPolicyUpdate { @JsonProperty(value = "properties") private PlacementPolicyUpdateProperties innerProperties; - /** Creates an instance of PlacementPolicyUpdate class. */ + /** + * Creates an instance of PlacementPolicyUpdate class. + */ public PlacementPolicyUpdate() { } /** * Get the innerProperties property: The properties of a placement policy resource that may be updated. - * + * * @return the innerProperties value. */ private PlacementPolicyUpdateProperties innerProperties() { @@ -33,7 +37,7 @@ private PlacementPolicyUpdateProperties innerProperties() { /** * Get the state property: Whether the placement policy is enabled or disabled. - * + * * @return the state value. */ public PlacementPolicyState state() { @@ -42,7 +46,7 @@ public PlacementPolicyState state() { /** * Set the state property: Whether the placement policy is enabled or disabled. - * + * * @param state the state value to set. * @return the PlacementPolicyUpdate object itself. */ @@ -56,7 +60,7 @@ public PlacementPolicyUpdate withState(PlacementPolicyState state) { /** * Get the vmMembers property: Virtual machine members list. - * + * * @return the vmMembers value. */ public List vmMembers() { @@ -65,7 +69,7 @@ public List vmMembers() { /** * Set the vmMembers property: Virtual machine members list. - * + * * @param vmMembers the vmMembers value to set. * @return the PlacementPolicyUpdate object itself. */ @@ -79,7 +83,7 @@ public PlacementPolicyUpdate withVmMembers(List vmMembers) { /** * Get the hostMembers property: Host members list. - * + * * @return the hostMembers value. */ public List hostMembers() { @@ -88,7 +92,7 @@ public List hostMembers() { /** * Set the hostMembers property: Host members list. - * + * * @param hostMembers the hostMembers value to set. * @return the PlacementPolicyUpdate object itself. */ @@ -102,7 +106,7 @@ public PlacementPolicyUpdate withHostMembers(List hostMembers) { /** * Get the affinityStrength property: vm-host placement policy affinity strength (should/must). - * + * * @return the affinityStrength value. */ public AffinityStrength affinityStrength() { @@ -111,7 +115,7 @@ public AffinityStrength affinityStrength() { /** * Set the affinityStrength property: vm-host placement policy affinity strength (should/must). - * + * * @param affinityStrength the affinityStrength value to set. * @return the PlacementPolicyUpdate object itself. */ @@ -125,7 +129,7 @@ public PlacementPolicyUpdate withAffinityStrength(AffinityStrength affinityStren /** * Get the azureHybridBenefitType property: placement policy azure hybrid benefit opt-in type. - * + * * @return the azureHybridBenefitType value. */ public AzureHybridBenefitType azureHybridBenefitType() { @@ -134,7 +138,7 @@ public AzureHybridBenefitType azureHybridBenefitType() { /** * Set the azureHybridBenefitType property: placement policy azure hybrid benefit opt-in type. - * + * * @param azureHybridBenefitType the azureHybridBenefitType value to set. * @return the PlacementPolicyUpdate object itself. */ @@ -148,7 +152,7 @@ public PlacementPolicyUpdate withAzureHybridBenefitType(AzureHybridBenefitType a /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/PortMirroringDirectionEnum.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/PortMirroringDirectionEnum.java index be119f7f9110e..9913bcc1eb4f4 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/PortMirroringDirectionEnum.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/PortMirroringDirectionEnum.java @@ -8,20 +8,28 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Direction of port mirroring profile. */ +/** + * Port Mirroring Direction. + */ public final class PortMirroringDirectionEnum extends ExpandableStringEnum { - /** Static value INGRESS for PortMirroringDirectionEnum. */ + /** + * Static value INGRESS for PortMirroringDirectionEnum. + */ public static final PortMirroringDirectionEnum INGRESS = fromString("INGRESS"); - /** Static value EGRESS for PortMirroringDirectionEnum. */ + /** + * Static value EGRESS for PortMirroringDirectionEnum. + */ public static final PortMirroringDirectionEnum EGRESS = fromString("EGRESS"); - /** Static value BIDIRECTIONAL for PortMirroringDirectionEnum. */ + /** + * Static value BIDIRECTIONAL for PortMirroringDirectionEnum. + */ public static final PortMirroringDirectionEnum BIDIRECTIONAL = fromString("BIDIRECTIONAL"); /** * Creates a new instance of PortMirroringDirectionEnum value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -30,7 +38,7 @@ public PortMirroringDirectionEnum() { /** * Creates or finds a PortMirroringDirectionEnum from its string representation. - * + * * @param name a name to look for. * @return the corresponding PortMirroringDirectionEnum. */ @@ -41,7 +49,7 @@ public static PortMirroringDirectionEnum fromString(String name) { /** * Gets known PortMirroringDirectionEnum values. - * + * * @return known PortMirroringDirectionEnum values. */ public static Collection values() { diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/PortMirroringStatusEnum.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/PortMirroringStatusEnum.java index 7b3958456da34..44bf91ecd99a9 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/PortMirroringStatusEnum.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/PortMirroringStatusEnum.java @@ -8,17 +8,23 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Port Mirroring Status. */ +/** + * Port Mirroring status. + */ public final class PortMirroringStatusEnum extends ExpandableStringEnum { - /** Static value SUCCESS for PortMirroringStatusEnum. */ + /** + * Static value SUCCESS for PortMirroringStatusEnum. + */ public static final PortMirroringStatusEnum SUCCESS = fromString("SUCCESS"); - /** Static value FAILURE for PortMirroringStatusEnum. */ + /** + * Static value FAILURE for PortMirroringStatusEnum. + */ public static final PortMirroringStatusEnum FAILURE = fromString("FAILURE"); /** * Creates a new instance of PortMirroringStatusEnum value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -27,7 +33,7 @@ public PortMirroringStatusEnum() { /** * Creates or finds a PortMirroringStatusEnum from its string representation. - * + * * @param name a name to look for. * @return the corresponding PortMirroringStatusEnum. */ @@ -38,7 +44,7 @@ public static PortMirroringStatusEnum fromString(String name) { /** * Gets known PortMirroringStatusEnum values. - * + * * @return known PortMirroringStatusEnum values. */ public static Collection values() { diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/PrivateCloud.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/PrivateCloud.java index dbe830b9d88bb..5faa2db9649d4 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/PrivateCloud.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/PrivateCloud.java @@ -6,144 +6,200 @@ import com.azure.core.http.rest.Response; import com.azure.core.management.Region; +import com.azure.core.management.SystemData; import com.azure.core.util.Context; import com.azure.resourcemanager.avs.fluent.models.PrivateCloudInner; import java.util.List; import java.util.Map; -/** An immutable client-side representation of PrivateCloud. */ +/** + * An immutable client-side representation of PrivateCloud. + */ public interface PrivateCloud { /** * Gets the id property: Fully qualified resource Id for the resource. - * + * * @return the id value. */ String id(); /** * Gets the name property: The name of the resource. - * + * * @return the name value. */ String name(); /** * Gets the type property: The type of the resource. - * + * * @return the type value. */ String type(); /** * Gets the location property: The geo-location where the resource lives. - * + * * @return the location value. */ String location(); /** * Gets the tags property: Resource tags. - * + * * @return the tags value. */ Map tags(); /** - * Gets the sku property: The private cloud SKU. - * + * Gets the sku property: The SKU (Stock Keeping Unit) assigned to this resource. + * * @return the sku value. */ Sku sku(); /** - * Gets the identity property: The identity of the private cloud, if configured. - * + * Gets the identity property: The managed service identities assigned to this resource. + * * @return the identity value. */ - PrivateCloudIdentity identity(); + SystemAssignedServiceIdentity identity(); + + /** + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + SystemData systemData(); + + /** + * Gets the managementCluster property: The default cluster used for management. + * + * @return the managementCluster value. + */ + ManagementCluster managementCluster(); + + /** + * Gets the internet property: Connectivity to internet is enabled or disabled. + * + * @return the internet value. + */ + InternetEnum internet(); + + /** + * Gets the identitySources property: vCenter Single Sign On Identity Sources. + * + * @return the identitySources value. + */ + List identitySources(); + + /** + * Gets the availability property: Properties describing how the cloud is distributed across availability zones. + * + * @return the availability value. + */ + AvailabilityProperties availability(); + + /** + * Gets the encryption property: Customer managed key encryption, can be enabled or disabled. + * + * @return the encryption value. + */ + Encryption encryption(); + + /** + * Gets the extendedNetworkBlocks property: Array of additional networks noncontiguous with networkBlock. Networks + * must be + * unique and non-overlapping across VNet in your subscription, on-premise, and + * this privateCloud networkBlock attribute. Make sure the CIDR format conforms to + * (A.B.C.D/X). + * + * @return the extendedNetworkBlocks value. + */ + List extendedNetworkBlocks(); /** * Gets the provisioningState property: The provisioning state. - * + * * @return the provisioningState value. */ PrivateCloudProvisioningState provisioningState(); /** * Gets the circuit property: An ExpressRoute Circuit. - * + * * @return the circuit value. */ Circuit circuit(); /** * Gets the endpoints property: The endpoints. - * + * * @return the endpoints value. */ Endpoints endpoints(); /** - * Gets the networkBlock property: The block of addresses should be unique across VNet in your subscription as well - * as on-premise. Make sure the CIDR format is conformed to (A.B.C.D/X) where A,B,C,D are between 0 and 255, and X - * is between 0 and 22. - * + * Gets the networkBlock property: The block of addresses should be unique across VNet in your subscription as + * well as on-premise. Make sure the CIDR format is conformed to (A.B.C.D/X) where + * A,B,C,D are between 0 and 255, and X is between 0 and 22. + * * @return the networkBlock value. */ String networkBlock(); /** * Gets the managementNetwork property: Network used to access vCenter Server and NSX-T Manager. - * + * * @return the managementNetwork value. */ String managementNetwork(); /** * Gets the provisioningNetwork property: Used for virtual machine cold migration, cloning, and snapshot migration. - * + * * @return the provisioningNetwork value. */ String provisioningNetwork(); /** * Gets the vmotionNetwork property: Used for live migration of virtual machines. - * + * * @return the vmotionNetwork value. */ String vmotionNetwork(); /** * Gets the vcenterPassword property: Optionally, set the vCenter admin password when the private cloud is created. - * + * * @return the vcenterPassword value. */ String vcenterPassword(); /** * Gets the nsxtPassword property: Optionally, set the NSX-T Manager password when the private cloud is created. - * + * * @return the nsxtPassword value. */ String nsxtPassword(); /** * Gets the vcenterCertificateThumbprint property: Thumbprint of the vCenter Server SSL certificate. - * + * * @return the vcenterCertificateThumbprint value. */ String vcenterCertificateThumbprint(); /** * Gets the nsxtCertificateThumbprint property: Thumbprint of the NSX-T Manager SSL certificate. - * + * * @return the nsxtCertificateThumbprint value. */ String nsxtCertificateThumbprint(); /** * Gets the externalCloudLinks property: Array of cloud link IDs from other clouds that connect to this one. - * + * * @return the externalCloudLinks value. */ List externalCloudLinks(); @@ -151,111 +207,86 @@ public interface PrivateCloud { /** * Gets the secondaryCircuit property: A secondary expressRoute circuit from a separate AZ. Only present in a * stretched private cloud. - * + * * @return the secondaryCircuit value. */ Circuit secondaryCircuit(); /** * Gets the nsxPublicIpQuotaRaised property: Flag to indicate whether the private cloud has the quota for - * provisioned NSX Public IP count raised from 64 to 1024. - * + * provisioned NSX + * Public IP count raised from 64 to 1024. + * * @return the nsxPublicIpQuotaRaised value. */ NsxPublicIpQuotaRaisedEnum nsxPublicIpQuotaRaised(); /** - * Gets the managementCluster property: The default cluster used for management. - * - * @return the managementCluster value. - */ - ManagementCluster managementCluster(); - - /** - * Gets the internet property: Connectivity to internet is enabled or disabled. - * - * @return the internet value. - */ - InternetEnum internet(); - - /** - * Gets the identitySources property: vCenter Single Sign On Identity Sources. - * - * @return the identitySources value. - */ - List identitySources(); - - /** - * Gets the availability property: Properties describing how the cloud is distributed across availability zones. - * - * @return the availability value. + * Gets the virtualNetworkId property: Azure resource ID of the virtual network. + * + * @return the virtualNetworkId value. */ - AvailabilityProperties availability(); + String virtualNetworkId(); /** - * Gets the encryption property: Customer managed key encryption, can be enabled or disabled. - * - * @return the encryption value. - */ - Encryption encryption(); - - /** - * Gets the extendedNetworkBlocks property: Array of additional networks noncontiguous with networkBlock. Networks - * must be unique and non-overlapping across VNet in your subscription, on-premise, and this privateCloud - * networkBlock attribute. Make sure the CIDR format conforms to (A.B.C.D/X). - * - * @return the extendedNetworkBlocks value. + * Gets the dnsZoneType property: The type of DNS zone to use. + * + * @return the dnsZoneType value. */ - List extendedNetworkBlocks(); + DnsZoneType dnsZoneType(); /** * Gets the region of the resource. - * + * * @return the region of the resource. */ Region region(); /** * Gets the name of the resource region. - * + * * @return the name of the resource region. */ String regionName(); /** * Gets the name of the resource group. - * + * * @return the name of the resource group. */ String resourceGroupName(); /** * Gets the inner com.azure.resourcemanager.avs.fluent.models.PrivateCloudInner object. - * + * * @return the inner object. */ PrivateCloudInner innerModel(); - /** The entirety of the PrivateCloud definition. */ - interface Definition - extends DefinitionStages.Blank, - DefinitionStages.WithLocation, - DefinitionStages.WithResourceGroup, - DefinitionStages.WithSku, - DefinitionStages.WithCreate { + /** + * The entirety of the PrivateCloud definition. + */ + interface Definition extends DefinitionStages.Blank, DefinitionStages.WithLocation, + DefinitionStages.WithResourceGroup, DefinitionStages.WithSku, DefinitionStages.WithCreate { } - /** The PrivateCloud definition stages. */ + /** + * The PrivateCloud definition stages. + */ interface DefinitionStages { - /** The first stage of the PrivateCloud definition. */ + /** + * The first stage of the PrivateCloud definition. + */ interface Blank extends WithLocation { } - /** The stage of the PrivateCloud definition allowing to specify location. */ + /** + * The stage of the PrivateCloud definition allowing to specify location. + */ interface WithLocation { /** * Specifies the region for the resource. - * + * * @param location The geo-location where the resource lives. * @return the next definition stage. */ @@ -263,30 +294,34 @@ interface WithLocation { /** * Specifies the region for the resource. - * + * * @param location The geo-location where the resource lives. * @return the next definition stage. */ WithResourceGroup withRegion(String location); } - /** The stage of the PrivateCloud definition allowing to specify parent resource. */ + /** + * The stage of the PrivateCloud definition allowing to specify parent resource. + */ interface WithResourceGroup { /** * Specifies resourceGroupName. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @return the next definition stage. */ WithSku withExistingResourceGroup(String resourceGroupName); } - /** The stage of the PrivateCloud definition allowing to specify sku. */ + /** + * The stage of the PrivateCloud definition allowing to specify sku. + */ interface WithSku { /** - * Specifies the sku property: The private cloud SKU. - * - * @param sku The private cloud SKU. + * Specifies the sku property: The SKU (Stock Keeping Unit) assigned to this resource.. + * + * @param sku The SKU (Stock Keeping Unit) assigned to this resource. * @return the next definition stage. */ WithCreate withSku(Sku sku); @@ -297,344 +332,440 @@ interface WithSku { * to be created, but also allows for any other optional properties to be specified. */ interface WithCreate - extends DefinitionStages.WithTags, - DefinitionStages.WithIdentity, - DefinitionStages.WithCircuit, - DefinitionStages.WithNetworkBlock, - DefinitionStages.WithVcenterPassword, - DefinitionStages.WithNsxtPassword, - DefinitionStages.WithSecondaryCircuit, - DefinitionStages.WithManagementCluster, - DefinitionStages.WithInternet, - DefinitionStages.WithIdentitySources, - DefinitionStages.WithAvailability, - DefinitionStages.WithEncryption, - DefinitionStages.WithExtendedNetworkBlocks { + extends DefinitionStages.WithTags, DefinitionStages.WithIdentity, DefinitionStages.WithManagementCluster, + DefinitionStages.WithInternet, DefinitionStages.WithIdentitySources, DefinitionStages.WithAvailability, + DefinitionStages.WithEncryption, DefinitionStages.WithExtendedNetworkBlocks, DefinitionStages.WithCircuit, + DefinitionStages.WithNetworkBlock, DefinitionStages.WithVcenterPassword, DefinitionStages.WithNsxtPassword, + DefinitionStages.WithSecondaryCircuit, DefinitionStages.WithVirtualNetworkId, + DefinitionStages.WithDnsZoneType { /** * Executes the create request. - * + * * @return the created resource. */ PrivateCloud create(); /** * Executes the create request. - * + * * @param context The context to associate with this operation. * @return the created resource. */ PrivateCloud create(Context context); } - /** The stage of the PrivateCloud definition allowing to specify tags. */ + /** + * The stage of the PrivateCloud definition allowing to specify tags. + */ interface WithTags { /** * Specifies the tags property: Resource tags.. - * + * * @param tags Resource tags. * @return the next definition stage. */ WithCreate withTags(Map tags); } - /** The stage of the PrivateCloud definition allowing to specify identity. */ + /** + * The stage of the PrivateCloud definition allowing to specify identity. + */ interface WithIdentity { /** - * Specifies the identity property: The identity of the private cloud, if configured.. - * - * @param identity The identity of the private cloud, if configured. - * @return the next definition stage. - */ - WithCreate withIdentity(PrivateCloudIdentity identity); - } - - /** The stage of the PrivateCloud definition allowing to specify circuit. */ - interface WithCircuit { - /** - * Specifies the circuit property: An ExpressRoute Circuit. - * - * @param circuit An ExpressRoute Circuit. - * @return the next definition stage. - */ - WithCreate withCircuit(Circuit circuit); - } - - /** The stage of the PrivateCloud definition allowing to specify networkBlock. */ - interface WithNetworkBlock { - /** - * Specifies the networkBlock property: The block of addresses should be unique across VNet in your - * subscription as well as on-premise. Make sure the CIDR format is conformed to (A.B.C.D/X) where A,B,C,D - * are between 0 and 255, and X is between 0 and 22. - * - * @param networkBlock The block of addresses should be unique across VNet in your subscription as well as - * on-premise. Make sure the CIDR format is conformed to (A.B.C.D/X) where A,B,C,D are between 0 and - * 255, and X is between 0 and 22. - * @return the next definition stage. - */ - WithCreate withNetworkBlock(String networkBlock); - } - - /** The stage of the PrivateCloud definition allowing to specify vcenterPassword. */ - interface WithVcenterPassword { - /** - * Specifies the vcenterPassword property: Optionally, set the vCenter admin password when the private cloud - * is created. - * - * @param vcenterPassword Optionally, set the vCenter admin password when the private cloud is created. - * @return the next definition stage. - */ - WithCreate withVcenterPassword(String vcenterPassword); - } - - /** The stage of the PrivateCloud definition allowing to specify nsxtPassword. */ - interface WithNsxtPassword { - /** - * Specifies the nsxtPassword property: Optionally, set the NSX-T Manager password when the private cloud is - * created. - * - * @param nsxtPassword Optionally, set the NSX-T Manager password when the private cloud is created. - * @return the next definition stage. - */ - WithCreate withNsxtPassword(String nsxtPassword); - } - - /** The stage of the PrivateCloud definition allowing to specify secondaryCircuit. */ - interface WithSecondaryCircuit { - /** - * Specifies the secondaryCircuit property: A secondary expressRoute circuit from a separate AZ. Only - * present in a stretched private cloud. - * - * @param secondaryCircuit A secondary expressRoute circuit from a separate AZ. Only present in a stretched - * private cloud. + * Specifies the identity property: The managed service identities assigned to this resource.. + * + * @param identity The managed service identities assigned to this resource. * @return the next definition stage. */ - WithCreate withSecondaryCircuit(Circuit secondaryCircuit); + WithCreate withIdentity(SystemAssignedServiceIdentity identity); } - /** The stage of the PrivateCloud definition allowing to specify managementCluster. */ + /** + * The stage of the PrivateCloud definition allowing to specify managementCluster. + */ interface WithManagementCluster { /** * Specifies the managementCluster property: The default cluster used for management. - * + * * @param managementCluster The default cluster used for management. * @return the next definition stage. */ WithCreate withManagementCluster(ManagementCluster managementCluster); } - /** The stage of the PrivateCloud definition allowing to specify internet. */ + /** + * The stage of the PrivateCloud definition allowing to specify internet. + */ interface WithInternet { /** * Specifies the internet property: Connectivity to internet is enabled or disabled. - * + * * @param internet Connectivity to internet is enabled or disabled. * @return the next definition stage. */ WithCreate withInternet(InternetEnum internet); } - /** The stage of the PrivateCloud definition allowing to specify identitySources. */ + /** + * The stage of the PrivateCloud definition allowing to specify identitySources. + */ interface WithIdentitySources { /** * Specifies the identitySources property: vCenter Single Sign On Identity Sources. - * + * * @param identitySources vCenter Single Sign On Identity Sources. * @return the next definition stage. */ WithCreate withIdentitySources(List identitySources); } - /** The stage of the PrivateCloud definition allowing to specify availability. */ + /** + * The stage of the PrivateCloud definition allowing to specify availability. + */ interface WithAvailability { /** * Specifies the availability property: Properties describing how the cloud is distributed across * availability zones. - * + * * @param availability Properties describing how the cloud is distributed across availability zones. * @return the next definition stage. */ WithCreate withAvailability(AvailabilityProperties availability); } - /** The stage of the PrivateCloud definition allowing to specify encryption. */ + /** + * The stage of the PrivateCloud definition allowing to specify encryption. + */ interface WithEncryption { /** * Specifies the encryption property: Customer managed key encryption, can be enabled or disabled. - * + * * @param encryption Customer managed key encryption, can be enabled or disabled. * @return the next definition stage. */ WithCreate withEncryption(Encryption encryption); } - /** The stage of the PrivateCloud definition allowing to specify extendedNetworkBlocks. */ + /** + * The stage of the PrivateCloud definition allowing to specify extendedNetworkBlocks. + */ interface WithExtendedNetworkBlocks { /** * Specifies the extendedNetworkBlocks property: Array of additional networks noncontiguous with - * networkBlock. Networks must be unique and non-overlapping across VNet in your subscription, on-premise, - * and this privateCloud networkBlock attribute. Make sure the CIDR format conforms to (A.B.C.D/X).. - * + * networkBlock. Networks must be + * unique and non-overlapping across VNet in your subscription, on-premise, and + * this privateCloud networkBlock attribute. Make sure the CIDR format conforms to + * (A.B.C.D/X).. + * * @param extendedNetworkBlocks Array of additional networks noncontiguous with networkBlock. Networks must - * be unique and non-overlapping across VNet in your subscription, on-premise, and this privateCloud - * networkBlock attribute. Make sure the CIDR format conforms to (A.B.C.D/X). + * be + * unique and non-overlapping across VNet in your subscription, on-premise, and + * this privateCloud networkBlock attribute. Make sure the CIDR format conforms to + * (A.B.C.D/X). * @return the next definition stage. */ WithCreate withExtendedNetworkBlocks(List extendedNetworkBlocks); } + + /** + * The stage of the PrivateCloud definition allowing to specify circuit. + */ + interface WithCircuit { + /** + * Specifies the circuit property: An ExpressRoute Circuit. + * + * @param circuit An ExpressRoute Circuit. + * @return the next definition stage. + */ + WithCreate withCircuit(Circuit circuit); + } + + /** + * The stage of the PrivateCloud definition allowing to specify networkBlock. + */ + interface WithNetworkBlock { + /** + * Specifies the networkBlock property: The block of addresses should be unique across VNet in your + * subscription as + * well as on-premise. Make sure the CIDR format is conformed to (A.B.C.D/X) where + * A,B,C,D are between 0 and 255, and X is between 0 and 22. + * + * @param networkBlock The block of addresses should be unique across VNet in your subscription as + * well as on-premise. Make sure the CIDR format is conformed to (A.B.C.D/X) where + * A,B,C,D are between 0 and 255, and X is between 0 and 22. + * @return the next definition stage. + */ + WithCreate withNetworkBlock(String networkBlock); + } + + /** + * The stage of the PrivateCloud definition allowing to specify vcenterPassword. + */ + interface WithVcenterPassword { + /** + * Specifies the vcenterPassword property: Optionally, set the vCenter admin password when the private cloud + * is created. + * + * @param vcenterPassword Optionally, set the vCenter admin password when the private cloud is created. + * @return the next definition stage. + */ + WithCreate withVcenterPassword(String vcenterPassword); + } + + /** + * The stage of the PrivateCloud definition allowing to specify nsxtPassword. + */ + interface WithNsxtPassword { + /** + * Specifies the nsxtPassword property: Optionally, set the NSX-T Manager password when the private cloud is + * created. + * + * @param nsxtPassword Optionally, set the NSX-T Manager password when the private cloud is created. + * @return the next definition stage. + */ + WithCreate withNsxtPassword(String nsxtPassword); + } + + /** + * The stage of the PrivateCloud definition allowing to specify secondaryCircuit. + */ + interface WithSecondaryCircuit { + /** + * Specifies the secondaryCircuit property: A secondary expressRoute circuit from a separate AZ. Only + * present in a + * stretched private cloud. + * + * @param secondaryCircuit A secondary expressRoute circuit from a separate AZ. Only present in a + * stretched private cloud. + * @return the next definition stage. + */ + WithCreate withSecondaryCircuit(Circuit secondaryCircuit); + } + + /** + * The stage of the PrivateCloud definition allowing to specify virtualNetworkId. + */ + interface WithVirtualNetworkId { + /** + * Specifies the virtualNetworkId property: Azure resource ID of the virtual network. + * + * @param virtualNetworkId Azure resource ID of the virtual network. + * @return the next definition stage. + */ + WithCreate withVirtualNetworkId(String virtualNetworkId); + } + + /** + * The stage of the PrivateCloud definition allowing to specify dnsZoneType. + */ + interface WithDnsZoneType { + /** + * Specifies the dnsZoneType property: The type of DNS zone to use.. + * + * @param dnsZoneType The type of DNS zone to use. + * @return the next definition stage. + */ + WithCreate withDnsZoneType(DnsZoneType dnsZoneType); + } } /** * Begins update for the PrivateCloud resource. - * + * * @return the stage of resource update. */ PrivateCloud.Update update(); - /** The template for PrivateCloud update. */ - interface Update - extends UpdateStages.WithTags, - UpdateStages.WithIdentity, - UpdateStages.WithManagementCluster, - UpdateStages.WithInternet, - UpdateStages.WithIdentitySources, - UpdateStages.WithEncryption, - UpdateStages.WithExtendedNetworkBlocks { + /** + * The template for PrivateCloud update. + */ + interface Update extends UpdateStages.WithTags, UpdateStages.WithSku, UpdateStages.WithIdentity, + UpdateStages.WithManagementCluster, UpdateStages.WithInternet, UpdateStages.WithIdentitySources, + UpdateStages.WithEncryption, UpdateStages.WithExtendedNetworkBlocks, UpdateStages.WithDnsZoneType { /** * Executes the update request. - * + * * @return the updated resource. */ PrivateCloud apply(); /** * Executes the update request. - * + * * @param context The context to associate with this operation. * @return the updated resource. */ PrivateCloud apply(Context context); } - /** The PrivateCloud update stages. */ + /** + * The PrivateCloud update stages. + */ interface UpdateStages { - /** The stage of the PrivateCloud update allowing to specify tags. */ + /** + * The stage of the PrivateCloud update allowing to specify tags. + */ interface WithTags { /** - * Specifies the tags property: Resource tags. - * + * Specifies the tags property: Resource tags.. + * * @param tags Resource tags. * @return the next definition stage. */ Update withTags(Map tags); } - /** The stage of the PrivateCloud update allowing to specify identity. */ + /** + * The stage of the PrivateCloud update allowing to specify sku. + */ + interface WithSku { + /** + * Specifies the sku property: The SKU (Stock Keeping Unit) assigned to this resource.. + * + * @param sku The SKU (Stock Keeping Unit) assigned to this resource. + * @return the next definition stage. + */ + Update withSku(Sku sku); + } + + /** + * The stage of the PrivateCloud update allowing to specify identity. + */ interface WithIdentity { /** - * Specifies the identity property: The identity of the private cloud, if configured.. - * - * @param identity The identity of the private cloud, if configured. + * Specifies the identity property: The managed service identities assigned to this resource.. + * + * @param identity The managed service identities assigned to this resource. * @return the next definition stage. */ - Update withIdentity(PrivateCloudIdentity identity); + Update withIdentity(SystemAssignedServiceIdentity identity); } - /** The stage of the PrivateCloud update allowing to specify managementCluster. */ + /** + * The stage of the PrivateCloud update allowing to specify managementCluster. + */ interface WithManagementCluster { /** * Specifies the managementCluster property: The default cluster used for management. - * + * * @param managementCluster The default cluster used for management. * @return the next definition stage. */ Update withManagementCluster(ManagementCluster managementCluster); } - /** The stage of the PrivateCloud update allowing to specify internet. */ + /** + * The stage of the PrivateCloud update allowing to specify internet. + */ interface WithInternet { /** * Specifies the internet property: Connectivity to internet is enabled or disabled. - * + * * @param internet Connectivity to internet is enabled or disabled. * @return the next definition stage. */ Update withInternet(InternetEnum internet); } - /** The stage of the PrivateCloud update allowing to specify identitySources. */ + /** + * The stage of the PrivateCloud update allowing to specify identitySources. + */ interface WithIdentitySources { /** * Specifies the identitySources property: vCenter Single Sign On Identity Sources. - * + * * @param identitySources vCenter Single Sign On Identity Sources. * @return the next definition stage. */ Update withIdentitySources(List identitySources); } - /** The stage of the PrivateCloud update allowing to specify encryption. */ + /** + * The stage of the PrivateCloud update allowing to specify encryption. + */ interface WithEncryption { /** * Specifies the encryption property: Customer managed key encryption, can be enabled or disabled. - * + * * @param encryption Customer managed key encryption, can be enabled or disabled. * @return the next definition stage. */ Update withEncryption(Encryption encryption); } - /** The stage of the PrivateCloud update allowing to specify extendedNetworkBlocks. */ + /** + * The stage of the PrivateCloud update allowing to specify extendedNetworkBlocks. + */ interface WithExtendedNetworkBlocks { /** * Specifies the extendedNetworkBlocks property: Array of additional networks noncontiguous with - * networkBlock. Networks must be unique and non-overlapping across VNet in your subscription, on-premise, - * and this privateCloud networkBlock attribute. Make sure the CIDR format conforms to (A.B.C.D/X).. - * + * networkBlock. Networks must be + * unique and non-overlapping across VNet in your subscription, on-premise, and + * this privateCloud networkBlock attribute. Make sure the CIDR format conforms to + * (A.B.C.D/X).. + * * @param extendedNetworkBlocks Array of additional networks noncontiguous with networkBlock. Networks must - * be unique and non-overlapping across VNet in your subscription, on-premise, and this privateCloud - * networkBlock attribute. Make sure the CIDR format conforms to (A.B.C.D/X). + * be + * unique and non-overlapping across VNet in your subscription, on-premise, and + * this privateCloud networkBlock attribute. Make sure the CIDR format conforms to + * (A.B.C.D/X). * @return the next definition stage. */ Update withExtendedNetworkBlocks(List extendedNetworkBlocks); } + + /** + * The stage of the PrivateCloud update allowing to specify dnsZoneType. + */ + interface WithDnsZoneType { + /** + * Specifies the dnsZoneType property: The type of DNS zone to use.. + * + * @param dnsZoneType The type of DNS zone to use. + * @return the next definition stage. + */ + Update withDnsZoneType(DnsZoneType dnsZoneType); + } } /** * Refreshes the resource to sync with Azure. - * + * * @return the refreshed resource. */ PrivateCloud refresh(); /** * Refreshes the resource to sync with Azure. - * + * * @param context The context to associate with this operation. * @return the refreshed resource. */ PrivateCloud refresh(Context context); /** - * Rotate the vCenter password. - * + * List the admin credentials for the private cloud. + * + * @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 administrative credentials for accessing vCenter and NSX-T along with {@link Response}. */ - void rotateVcenterPassword(); + Response listAdminCredentialsWithResponse(Context context); /** - * Rotate the vCenter password. - * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. + * List the admin credentials for the private cloud. + * * @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 administrative credentials for accessing vCenter and NSX-T. */ - void rotateVcenterPassword(Context context); + AdminCredentials listAdminCredentials(); /** * Rotate the NSX-T Manager password. - * + * * @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. */ @@ -642,7 +773,7 @@ interface WithExtendedNetworkBlocks { /** * Rotate the NSX-T Manager password. - * + * * @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. @@ -651,22 +782,20 @@ interface WithExtendedNetworkBlocks { void rotateNsxtPassword(Context context); /** - * List the admin credentials for the private cloud. - * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. + * Rotate the vCenter password. + * * @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 administrative credentials for accessing vCenter and NSX-T along with {@link Response}. */ - Response listAdminCredentialsWithResponse(Context context); + void rotateVcenterPassword(); /** - * List the admin credentials for the private cloud. - * + * Rotate the vCenter password. + * + * @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 administrative credentials for accessing vCenter and NSX-T. */ - AdminCredentials listAdminCredentials(); + void rotateVcenterPassword(Context context); } diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/PrivateCloudIdentity.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/PrivateCloudIdentity.java deleted file mode 100644 index 77e48dfab4ce0..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/PrivateCloudIdentity.java +++ /dev/null @@ -1,86 +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.avs.models; - -import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Identity for the virtual machine. */ -@Fluent -public final class PrivateCloudIdentity { - /* - * The principal ID of private cloud identity. This property will only be provided for a system assigned identity. - */ - @JsonProperty(value = "principalId", access = JsonProperty.Access.WRITE_ONLY) - private String principalId; - - /* - * The tenant ID associated with the private cloud. This property will only be provided for a system assigned - * identity. - */ - @JsonProperty(value = "tenantId", access = JsonProperty.Access.WRITE_ONLY) - private String tenantId; - - /* - * The type of identity used for the private cloud. The type 'SystemAssigned' refers to an implicitly created - * identity. The type 'None' will remove any identities from the Private Cloud. - */ - @JsonProperty(value = "type") - private ResourceIdentityType type; - - /** Creates an instance of PrivateCloudIdentity class. */ - public PrivateCloudIdentity() { - } - - /** - * Get the principalId property: The principal ID of private cloud identity. This property will only be provided for - * a system assigned identity. - * - * @return the principalId value. - */ - public String principalId() { - return this.principalId; - } - - /** - * Get the tenantId property: The tenant ID associated with the private cloud. This property will only be provided - * for a system assigned identity. - * - * @return the tenantId value. - */ - public String tenantId() { - return this.tenantId; - } - - /** - * Get the type property: The type of identity used for the private cloud. The type 'SystemAssigned' refers to an - * implicitly created identity. The type 'None' will remove any identities from the Private Cloud. - * - * @return the type value. - */ - public ResourceIdentityType type() { - return this.type; - } - - /** - * Set the type property: The type of identity used for the private cloud. The type 'SystemAssigned' refers to an - * implicitly created identity. The type 'None' will remove any identities from the Private Cloud. - * - * @param type the type value to set. - * @return the PrivateCloudIdentity object itself. - */ - public PrivateCloudIdentity withType(ResourceIdentityType type) { - this.type = type; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/PrivateCloudList.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/PrivateCloudList.java deleted file mode 100644 index 74fb1b195e24c..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/PrivateCloudList.java +++ /dev/null @@ -1,59 +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.avs.models; - -import com.azure.core.annotation.Immutable; -import com.azure.resourcemanager.avs.fluent.models.PrivateCloudInner; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** A paged list of private clouds. */ -@Immutable -public final class PrivateCloudList { - /* - * The items on the page - */ - @JsonProperty(value = "value", access = JsonProperty.Access.WRITE_ONLY) - private List value; - - /* - * URL to get the next page if any - */ - @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) - private String nextLink; - - /** Creates an instance of PrivateCloudList class. */ - public PrivateCloudList() { - } - - /** - * Get the value property: The items on the page. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Get the nextLink property: URL to get the next page if 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/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/PrivateCloudListResult.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/PrivateCloudListResult.java new file mode 100644 index 0000000000000..527c70a93b87e --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/PrivateCloudListResult.java @@ -0,0 +1,80 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.avs.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.avs.fluent.models.PrivateCloudInner; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** + * The response of a PrivateCloud list operation. + */ +@Fluent +public final class PrivateCloudListResult { + /* + * The PrivateCloud items on this page + */ + @JsonProperty(value = "value", required = true) + private List value; + + /* + * The link to the next page of items + */ + @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) + private String nextLink; + + /** + * Creates an instance of PrivateCloudListResult class. + */ + public PrivateCloudListResult() { + } + + /** + * Get the value property: The PrivateCloud items on this page. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Set the value property: The PrivateCloud items on this page. + * + * @param value the value value to set. + * @return the PrivateCloudListResult object itself. + */ + public PrivateCloudListResult withValue(List value) { + this.value = value; + return this; + } + + /** + * Get the nextLink property: The link to the next page of items. + * + * @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) { + throw LOGGER.logExceptionAsError( + new IllegalArgumentException("Missing required property value in model PrivateCloudListResult")); + } else { + value().forEach(e -> e.validate()); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(PrivateCloudListResult.class); +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/PrivateCloudProvisioningState.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/PrivateCloudProvisioningState.java index 5b4dd45d13a38..7e88d2de8aa02 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/PrivateCloudProvisioningState.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/PrivateCloudProvisioningState.java @@ -8,35 +8,53 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** The provisioning state. */ +/** + * private cloud provisioning state. + */ public final class PrivateCloudProvisioningState extends ExpandableStringEnum { - /** Static value Succeeded for PrivateCloudProvisioningState. */ + /** + * Static value Succeeded for PrivateCloudProvisioningState. + */ public static final PrivateCloudProvisioningState SUCCEEDED = fromString("Succeeded"); - /** Static value Failed for PrivateCloudProvisioningState. */ + /** + * Static value Failed for PrivateCloudProvisioningState. + */ public static final PrivateCloudProvisioningState FAILED = fromString("Failed"); - /** Static value Cancelled for PrivateCloudProvisioningState. */ + /** + * Static value Canceled for PrivateCloudProvisioningState. + */ + public static final PrivateCloudProvisioningState CANCELED = fromString("Canceled"); + + /** + * Static value Cancelled for PrivateCloudProvisioningState. + */ public static final PrivateCloudProvisioningState CANCELLED = fromString("Cancelled"); - /** Static value Pending for PrivateCloudProvisioningState. */ + /** + * Static value Pending for PrivateCloudProvisioningState. + */ public static final PrivateCloudProvisioningState PENDING = fromString("Pending"); - /** Static value Building for PrivateCloudProvisioningState. */ + /** + * Static value Building for PrivateCloudProvisioningState. + */ public static final PrivateCloudProvisioningState BUILDING = fromString("Building"); - /** Static value Deleting for PrivateCloudProvisioningState. */ + /** + * Static value Deleting for PrivateCloudProvisioningState. + */ public static final PrivateCloudProvisioningState DELETING = fromString("Deleting"); - /** Static value Updating for PrivateCloudProvisioningState. */ + /** + * Static value Updating for PrivateCloudProvisioningState. + */ public static final PrivateCloudProvisioningState UPDATING = fromString("Updating"); - /** Static value Canceled for PrivateCloudProvisioningState. */ - public static final PrivateCloudProvisioningState CANCELED = fromString("Canceled"); - /** * Creates a new instance of PrivateCloudProvisioningState value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -45,7 +63,7 @@ public PrivateCloudProvisioningState() { /** * Creates or finds a PrivateCloudProvisioningState from its string representation. - * + * * @param name a name to look for. * @return the corresponding PrivateCloudProvisioningState. */ @@ -56,7 +74,7 @@ public static PrivateCloudProvisioningState fromString(String name) { /** * Gets known PrivateCloudProvisioningState values. - * + * * @return known PrivateCloudProvisioningState values. */ public static Collection values() { diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/PrivateCloudUpdate.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/PrivateCloudUpdate.java index 3dc69016c1858..97470ba5bcf34 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/PrivateCloudUpdate.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/PrivateCloudUpdate.java @@ -11,35 +11,45 @@ import java.util.List; import java.util.Map; -/** An update to a private cloud resource. */ +/** + * An update to a private cloud resource. + */ @Fluent public final class PrivateCloudUpdate { /* - * Resource tags + * Resource tags. */ @JsonProperty(value = "tags") @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) private Map tags; /* - * The updatable properties of a private cloud resource + * The SKU (Stock Keeping Unit) assigned to this resource. */ - @JsonProperty(value = "properties") - private PrivateCloudUpdateProperties innerProperties; + @JsonProperty(value = "sku") + private Sku sku; /* - * The identity of the private cloud, if configured. + * The managed service identities assigned to this resource. */ @JsonProperty(value = "identity") - private PrivateCloudIdentity identity; + private SystemAssignedServiceIdentity identity; + + /* + * The updatable properties of a private cloud resource + */ + @JsonProperty(value = "properties") + private PrivateCloudUpdateProperties innerProperties; - /** Creates an instance of PrivateCloudUpdate class. */ + /** + * Creates an instance of PrivateCloudUpdate class. + */ public PrivateCloudUpdate() { } /** * Get the tags property: Resource tags. - * + * * @return the tags value. */ public Map tags() { @@ -48,7 +58,7 @@ public Map tags() { /** * Set the tags property: Resource tags. - * + * * @param tags the tags value to set. * @return the PrivateCloudUpdate object itself. */ @@ -58,37 +68,57 @@ public PrivateCloudUpdate withTags(Map tags) { } /** - * Get the innerProperties property: The updatable properties of a private cloud resource. - * - * @return the innerProperties value. + * Get the sku property: The SKU (Stock Keeping Unit) assigned to this resource. + * + * @return the sku value. */ - private PrivateCloudUpdateProperties innerProperties() { - return this.innerProperties; + public Sku sku() { + return this.sku; + } + + /** + * Set the sku property: The SKU (Stock Keeping Unit) assigned to this resource. + * + * @param sku the sku value to set. + * @return the PrivateCloudUpdate object itself. + */ + public PrivateCloudUpdate withSku(Sku sku) { + this.sku = sku; + return this; } /** - * Get the identity property: The identity of the private cloud, if configured. - * + * Get the identity property: The managed service identities assigned to this resource. + * * @return the identity value. */ - public PrivateCloudIdentity identity() { + public SystemAssignedServiceIdentity identity() { return this.identity; } /** - * Set the identity property: The identity of the private cloud, if configured. - * + * Set the identity property: The managed service identities assigned to this resource. + * * @param identity the identity value to set. * @return the PrivateCloudUpdate object itself. */ - public PrivateCloudUpdate withIdentity(PrivateCloudIdentity identity) { + public PrivateCloudUpdate withIdentity(SystemAssignedServiceIdentity identity) { this.identity = identity; return this; } + /** + * Get the innerProperties property: The updatable properties of a private cloud resource. + * + * @return the innerProperties value. + */ + private PrivateCloudUpdateProperties innerProperties() { + return this.innerProperties; + } + /** * Get the managementCluster property: The default cluster used for management. - * + * * @return the managementCluster value. */ public ManagementCluster managementCluster() { @@ -97,7 +127,7 @@ public ManagementCluster managementCluster() { /** * Set the managementCluster property: The default cluster used for management. - * + * * @param managementCluster the managementCluster value to set. * @return the PrivateCloudUpdate object itself. */ @@ -111,7 +141,7 @@ public PrivateCloudUpdate withManagementCluster(ManagementCluster managementClus /** * Get the internet property: Connectivity to internet is enabled or disabled. - * + * * @return the internet value. */ public InternetEnum internet() { @@ -120,7 +150,7 @@ public InternetEnum internet() { /** * Set the internet property: Connectivity to internet is enabled or disabled. - * + * * @param internet the internet value to set. * @return the PrivateCloudUpdate object itself. */ @@ -134,7 +164,7 @@ public PrivateCloudUpdate withInternet(InternetEnum internet) { /** * Get the identitySources property: vCenter Single Sign On Identity Sources. - * + * * @return the identitySources value. */ public List identitySources() { @@ -143,7 +173,7 @@ public List identitySources() { /** * Set the identitySources property: vCenter Single Sign On Identity Sources. - * + * * @param identitySources the identitySources value to set. * @return the PrivateCloudUpdate object itself. */ @@ -157,7 +187,7 @@ public PrivateCloudUpdate withIdentitySources(List identitySourc /** * Get the availability property: Properties describing how the cloud is distributed across availability zones. - * + * * @return the availability value. */ public AvailabilityProperties availability() { @@ -166,7 +196,7 @@ public AvailabilityProperties availability() { /** * Set the availability property: Properties describing how the cloud is distributed across availability zones. - * + * * @param availability the availability value to set. * @return the PrivateCloudUpdate object itself. */ @@ -180,7 +210,7 @@ public PrivateCloudUpdate withAvailability(AvailabilityProperties availability) /** * Get the encryption property: Customer managed key encryption, can be enabled or disabled. - * + * * @return the encryption value. */ public Encryption encryption() { @@ -189,7 +219,7 @@ public Encryption encryption() { /** * Set the encryption property: Customer managed key encryption, can be enabled or disabled. - * + * * @param encryption the encryption value to set. * @return the PrivateCloudUpdate object itself. */ @@ -203,9 +233,11 @@ public PrivateCloudUpdate withEncryption(Encryption encryption) { /** * Get the extendedNetworkBlocks property: Array of additional networks noncontiguous with networkBlock. Networks - * must be unique and non-overlapping across VNet in your subscription, on-premise, and this privateCloud - * networkBlock attribute. Make sure the CIDR format conforms to (A.B.C.D/X). - * + * must be + * unique and non-overlapping across VNet in your subscription, on-premise, and + * this privateCloud networkBlock attribute. Make sure the CIDR format conforms to + * (A.B.C.D/X). + * * @return the extendedNetworkBlocks value. */ public List extendedNetworkBlocks() { @@ -214,9 +246,11 @@ public List extendedNetworkBlocks() { /** * Set the extendedNetworkBlocks property: Array of additional networks noncontiguous with networkBlock. Networks - * must be unique and non-overlapping across VNet in your subscription, on-premise, and this privateCloud - * networkBlock attribute. Make sure the CIDR format conforms to (A.B.C.D/X). - * + * must be + * unique and non-overlapping across VNet in your subscription, on-premise, and + * this privateCloud networkBlock attribute. Make sure the CIDR format conforms to + * (A.B.C.D/X). + * * @param extendedNetworkBlocks the extendedNetworkBlocks value to set. * @return the PrivateCloudUpdate object itself. */ @@ -228,17 +262,43 @@ public PrivateCloudUpdate withExtendedNetworkBlocks(List extendedNetwork return this; } + /** + * Get the dnsZoneType property: The type of DNS zone to use. + * + * @return the dnsZoneType value. + */ + public DnsZoneType dnsZoneType() { + return this.innerProperties() == null ? null : this.innerProperties().dnsZoneType(); + } + + /** + * Set the dnsZoneType property: The type of DNS zone to use. + * + * @param dnsZoneType the dnsZoneType value to set. + * @return the PrivateCloudUpdate object itself. + */ + public PrivateCloudUpdate withDnsZoneType(DnsZoneType dnsZoneType) { + if (this.innerProperties() == null) { + this.innerProperties = new PrivateCloudUpdateProperties(); + } + this.innerProperties().withDnsZoneType(dnsZoneType); + return this; + } + /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { - if (innerProperties() != null) { - innerProperties().validate(); + if (sku() != null) { + sku().validate(); } if (identity() != null) { identity().validate(); } + if (innerProperties() != null) { + innerProperties().validate(); + } } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/PrivateClouds.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/PrivateClouds.java index 91d4e76b2f997..154f89ed1c4a7 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/PrivateClouds.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/PrivateClouds.java @@ -8,80 +8,82 @@ import com.azure.core.http.rest.Response; import com.azure.core.util.Context; -/** Resource collection API of PrivateClouds. */ +/** + * Resource collection API of PrivateClouds. + */ public interface PrivateClouds { /** - * List private clouds in a resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. + * List PrivateCloud resources by subscription ID. + * * @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 a paged list of private clouds as paginated response with {@link PagedIterable}. + * @return the response of a PrivateCloud list operation as paginated response with {@link PagedIterable}. */ - PagedIterable listByResourceGroup(String resourceGroupName); + PagedIterable list(); /** - * List private clouds in a resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * List PrivateCloud resources by subscription ID. + * * @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 a paged list of private clouds as paginated response with {@link PagedIterable}. + * @return the response of a PrivateCloud list operation as paginated response with {@link PagedIterable}. */ - PagedIterable listByResourceGroup(String resourceGroupName, Context context); + PagedIterable list(Context context); /** - * List private clouds in a subscription. - * + * List PrivateCloud resources by 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 a paged list of private clouds as paginated response with {@link PagedIterable}. + * @return the response of a PrivateCloud list operation as paginated response with {@link PagedIterable}. */ - PagedIterable list(); + PagedIterable listByResourceGroup(String resourceGroupName); /** - * List private clouds in a subscription. - * + * List PrivateCloud resources by 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 a paged list of private clouds as paginated response with {@link PagedIterable}. + * @return the response of a PrivateCloud list operation as paginated response with {@link PagedIterable}. */ - PagedIterable list(Context context); + PagedIterable listByResourceGroup(String resourceGroupName, Context context); /** - * Get a private cloud. - * + * Get a PrivateCloud. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. * @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 a private cloud along with {@link Response}. + * @return a PrivateCloud along with {@link Response}. */ - Response getByResourceGroupWithResponse( - String resourceGroupName, String privateCloudName, Context context); + Response getByResourceGroupWithResponse(String resourceGroupName, String privateCloudName, + Context context); /** - * Get a private cloud. - * + * Get a PrivateCloud. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. * @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 a private cloud. + * @return a PrivateCloud. */ PrivateCloud getByResourceGroup(String resourceGroupName, String privateCloudName); /** - * Delete a private cloud. - * + * Delete a PrivateCloud. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -91,8 +93,8 @@ Response getByResourceGroupWithResponse( void deleteByResourceGroup(String resourceGroupName, String privateCloudName); /** - * Delete a private cloud. - * + * Delete a PrivateCloud. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. * @param context The context to associate with this operation. @@ -103,31 +105,34 @@ Response getByResourceGroupWithResponse( void delete(String resourceGroupName, String privateCloudName, Context context); /** - * Rotate the vCenter password. - * + * List the admin credentials for the private cloud. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @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 administrative credentials for accessing vCenter and NSX-T along with {@link Response}. */ - void rotateVcenterPassword(String resourceGroupName, String privateCloudName); + Response listAdminCredentialsWithResponse(String resourceGroupName, String privateCloudName, + Context context); /** - * Rotate the vCenter password. - * + * List the admin credentials for the private cloud. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @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 administrative credentials for accessing vCenter and NSX-T. */ - void rotateVcenterPassword(String resourceGroupName, String privateCloudName, Context context); + AdminCredentials listAdminCredentials(String resourceGroupName, String privateCloudName); /** * Rotate the NSX-T Manager password. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -138,7 +143,7 @@ Response getByResourceGroupWithResponse( /** * Rotate the NSX-T Manager password. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. * @param context The context to associate with this operation. @@ -149,57 +154,54 @@ Response getByResourceGroupWithResponse( void rotateNsxtPassword(String resourceGroupName, String privateCloudName, Context context); /** - * List the admin credentials for the private cloud. - * + * Rotate the vCenter password. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @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 administrative credentials for accessing vCenter and NSX-T along with {@link Response}. */ - Response listAdminCredentialsWithResponse( - String resourceGroupName, String privateCloudName, Context context); + void rotateVcenterPassword(String resourceGroupName, String privateCloudName); /** - * List the admin credentials for the private cloud. - * + * Rotate the vCenter password. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @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 administrative credentials for accessing vCenter and NSX-T. */ - AdminCredentials listAdminCredentials(String resourceGroupName, String privateCloudName); + void rotateVcenterPassword(String resourceGroupName, String privateCloudName, Context context); /** - * Get a private cloud. - * + * Get a PrivateCloud. + * * @param id the resource ID. * @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 a private cloud along with {@link Response}. + * @return a PrivateCloud along with {@link Response}. */ PrivateCloud getById(String id); /** - * Get a private cloud. - * + * Get a PrivateCloud. + * * @param id the resource ID. * @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 a private cloud along with {@link Response}. + * @return a PrivateCloud along with {@link Response}. */ Response getByIdWithResponse(String id, Context context); /** - * Delete a private cloud. - * + * Delete a PrivateCloud. + * * @param id the resource ID. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -208,8 +210,8 @@ Response listAdminCredentialsWithResponse( void deleteById(String id); /** - * Delete a private cloud. - * + * Delete a PrivateCloud. + * * @param id the resource ID. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -220,7 +222,7 @@ Response listAdminCredentialsWithResponse( /** * Begins definition for a new PrivateCloud resource. - * + * * @param name resource name. * @return the first stage of the new PrivateCloud definition. */ diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/Quota.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/Quota.java index 45af6f6e6119b..94130208877fe 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/Quota.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/Quota.java @@ -7,25 +7,27 @@ import com.azure.resourcemanager.avs.fluent.models.QuotaInner; import java.util.Map; -/** An immutable client-side representation of Quota. */ +/** + * An immutable client-side representation of Quota. + */ public interface Quota { /** * Gets the hostsRemaining property: Remaining hosts quota by sku type. - * + * * @return the hostsRemaining value. */ Map hostsRemaining(); /** * Gets the quotaEnabled property: Host quota is active for current subscription. - * + * * @return the quotaEnabled value. */ QuotaEnabled quotaEnabled(); /** * Gets the inner com.azure.resourcemanager.avs.fluent.models.QuotaInner object. - * + * * @return the inner object. */ QuotaInner innerModel(); diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/QuotaEnabled.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/QuotaEnabled.java index 4669cfe81bd0d..5c8baad07a21c 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/QuotaEnabled.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/QuotaEnabled.java @@ -8,17 +8,23 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Host quota is active for current subscription. */ +/** + * quota enabled. + */ public final class QuotaEnabled extends ExpandableStringEnum { - /** Static value Enabled for QuotaEnabled. */ + /** + * Static value Enabled for QuotaEnabled. + */ public static final QuotaEnabled ENABLED = fromString("Enabled"); - /** Static value Disabled for QuotaEnabled. */ + /** + * Static value Disabled for QuotaEnabled. + */ public static final QuotaEnabled DISABLED = fromString("Disabled"); /** * Creates a new instance of QuotaEnabled value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -27,7 +33,7 @@ public QuotaEnabled() { /** * Creates or finds a QuotaEnabled from its string representation. - * + * * @param name a name to look for. * @return the corresponding QuotaEnabled. */ @@ -38,7 +44,7 @@ public static QuotaEnabled fromString(String name) { /** * Gets known QuotaEnabled values. - * + * * @return known QuotaEnabled values. */ public static Collection values() { diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ResourceIdentityType.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ResourceIdentityType.java deleted file mode 100644 index 2d0d5b3e0e848..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ResourceIdentityType.java +++ /dev/null @@ -1,50 +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.avs.models; - -import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** - * The type of identity used for the private cloud. The type 'SystemAssigned' refers to an implicitly created identity. - * The type 'None' will remove any identities from the Private Cloud. - */ -public final class ResourceIdentityType extends ExpandableStringEnum { - /** Static value SystemAssigned for ResourceIdentityType. */ - public static final ResourceIdentityType SYSTEM_ASSIGNED = fromString("SystemAssigned"); - - /** Static value None for ResourceIdentityType. */ - public static final ResourceIdentityType NONE = fromString("None"); - - /** - * Creates a new instance of ResourceIdentityType value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public ResourceIdentityType() { - } - - /** - * Creates or finds a ResourceIdentityType from its string representation. - * - * @param name a name to look for. - * @return the corresponding ResourceIdentityType. - */ - @JsonCreator - public static ResourceIdentityType fromString(String name) { - return fromString(name, ResourceIdentityType.class); - } - - /** - * Gets known ResourceIdentityType values. - * - * @return known ResourceIdentityType values. - */ - public static Collection values() { - return values(ResourceIdentityType.class); - } -} diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ScriptCmdlet.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ScriptCmdlet.java index cab17dc55526d..f6758052b6f9e 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ScriptCmdlet.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ScriptCmdlet.java @@ -4,56 +4,81 @@ package com.azure.resourcemanager.avs.models; +import com.azure.core.management.SystemData; import com.azure.resourcemanager.avs.fluent.models.ScriptCmdletInner; import java.util.List; -/** An immutable client-side representation of ScriptCmdlet. */ +/** + * An immutable client-side representation of ScriptCmdlet. + */ public interface ScriptCmdlet { /** * Gets the id property: Fully qualified resource Id for the resource. - * + * * @return the id value. */ String id(); /** * Gets the name property: The name of the resource. - * + * * @return the name value. */ String name(); /** * Gets the type property: The type of the resource. - * + * * @return the type value. */ String type(); + /** + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + SystemData systemData(); + + /** + * Gets the provisioningState property: The provisioning state of the resource. + * + * @return the provisioningState value. + */ + ScriptCmdletProvisioningState provisioningState(); + /** * Gets the description property: Description of the scripts functionality. - * + * * @return the description value. */ String description(); /** * Gets the timeout property: Recommended time limit for execution. - * + * * @return the timeout value. */ String timeout(); + /** + * Gets the audience property: Specifies whether a script cmdlet is intended to be invoked only through automation + * or visible to customers. + * + * @return the audience value. + */ + ScriptCmdletAudience audience(); + /** * Gets the parameters property: Parameters the script will accept. - * + * * @return the parameters value. */ List parameters(); /** * Gets the inner com.azure.resourcemanager.avs.fluent.models.ScriptCmdletInner object. - * + * * @return the inner object. */ ScriptCmdletInner innerModel(); diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ScriptCmdletAudience.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ScriptCmdletAudience.java new file mode 100644 index 0000000000000..167d4b7ebb185 --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ScriptCmdletAudience.java @@ -0,0 +1,53 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.avs.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** + * Specifies whether a script cmdlet is intended to be invoked only through automation or visible to customers. + */ +public final class ScriptCmdletAudience extends ExpandableStringEnum { + /** + * Static value Automation for ScriptCmdletAudience. + */ + public static final ScriptCmdletAudience AUTOMATION = fromString("Automation"); + + /** + * Static value Any for ScriptCmdletAudience. + */ + public static final ScriptCmdletAudience ANY = fromString("Any"); + + /** + * Creates a new instance of ScriptCmdletAudience value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ScriptCmdletAudience() { + } + + /** + * Creates or finds a ScriptCmdletAudience from its string representation. + * + * @param name a name to look for. + * @return the corresponding ScriptCmdletAudience. + */ + @JsonCreator + public static ScriptCmdletAudience fromString(String name) { + return fromString(name, ScriptCmdletAudience.class); + } + + /** + * Gets known ScriptCmdletAudience values. + * + * @return known ScriptCmdletAudience values. + */ + public static Collection values() { + return values(ScriptCmdletAudience.class); + } +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ScriptCmdletListResult.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ScriptCmdletListResult.java new file mode 100644 index 0000000000000..21adb73684114 --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ScriptCmdletListResult.java @@ -0,0 +1,80 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.avs.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.avs.fluent.models.ScriptCmdletInner; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** + * The response of a ScriptCmdlet list operation. + */ +@Fluent +public final class ScriptCmdletListResult { + /* + * The ScriptCmdlet items on this page + */ + @JsonProperty(value = "value", required = true) + private List value; + + /* + * The link to the next page of items + */ + @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) + private String nextLink; + + /** + * Creates an instance of ScriptCmdletListResult class. + */ + public ScriptCmdletListResult() { + } + + /** + * Get the value property: The ScriptCmdlet items on this page. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Set the value property: The ScriptCmdlet items on this page. + * + * @param value the value value to set. + * @return the ScriptCmdletListResult object itself. + */ + public ScriptCmdletListResult withValue(List value) { + this.value = value; + return this; + } + + /** + * Get the nextLink property: The link to the next page of items. + * + * @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) { + throw LOGGER.logExceptionAsError( + new IllegalArgumentException("Missing required property value in model ScriptCmdletListResult")); + } else { + value().forEach(e -> e.validate()); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(ScriptCmdletListResult.class); +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ScriptCmdletProvisioningState.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ScriptCmdletProvisioningState.java new file mode 100644 index 0000000000000..735504aac4435 --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ScriptCmdletProvisioningState.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.avs.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** + * A script cmdlet provisioning state. + */ +public final class ScriptCmdletProvisioningState extends ExpandableStringEnum { + /** + * Static value Succeeded for ScriptCmdletProvisioningState. + */ + public static final ScriptCmdletProvisioningState SUCCEEDED = fromString("Succeeded"); + + /** + * Static value Failed for ScriptCmdletProvisioningState. + */ + public static final ScriptCmdletProvisioningState FAILED = fromString("Failed"); + + /** + * Static value Canceled for ScriptCmdletProvisioningState. + */ + public static final ScriptCmdletProvisioningState CANCELED = fromString("Canceled"); + + /** + * Creates a new instance of ScriptCmdletProvisioningState value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ScriptCmdletProvisioningState() { + } + + /** + * Creates or finds a ScriptCmdletProvisioningState from its string representation. + * + * @param name a name to look for. + * @return the corresponding ScriptCmdletProvisioningState. + */ + @JsonCreator + public static ScriptCmdletProvisioningState fromString(String name) { + return fromString(name, ScriptCmdletProvisioningState.class); + } + + /** + * Gets known ScriptCmdletProvisioningState values. + * + * @return known ScriptCmdletProvisioningState values. + */ + public static Collection values() { + return values(ScriptCmdletProvisioningState.class); + } +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ScriptCmdlets.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ScriptCmdlets.java index 21db768aed70f..7f8d7b4b433fb 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ScriptCmdlets.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ScriptCmdlets.java @@ -8,70 +8,66 @@ import com.azure.core.http.rest.Response; import com.azure.core.util.Context; -/** Resource collection API of ScriptCmdlets. */ +/** + * Resource collection API of ScriptCmdlets. + */ public interface ScriptCmdlets { /** - * List script cmdlet resources available for a private cloud to create a script execution resource on a private - * cloud. - * + * List ScriptCmdlet resources by ScriptPackage. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param scriptPackageName Name of the script package in the private cloud. + * @param scriptPackageName Name of the script package. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return pageable list of scripts/cmdlets as paginated response with {@link PagedIterable}. + * @return the response of a ScriptCmdlet list operation as paginated response with {@link PagedIterable}. */ PagedIterable list(String resourceGroupName, String privateCloudName, String scriptPackageName); /** - * List script cmdlet resources available for a private cloud to create a script execution resource on a private - * cloud. - * + * List ScriptCmdlet resources by ScriptPackage. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param scriptPackageName Name of the script package in the private cloud. + * @param scriptPackageName Name of the script package. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return pageable list of scripts/cmdlets as paginated response with {@link PagedIterable}. + * @return the response of a ScriptCmdlet list operation as paginated response with {@link PagedIterable}. */ - PagedIterable list( - String resourceGroupName, String privateCloudName, String scriptPackageName, Context context); + PagedIterable list(String resourceGroupName, String privateCloudName, String scriptPackageName, + Context context); /** - * Return information about a script cmdlet resource in a specific package on a private cloud. - * + * Get a ScriptCmdlet. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param scriptPackageName Name of the script package in the private cloud. - * @param scriptCmdletName Name of the script cmdlet resource in the script package in the private cloud. + * @param scriptPackageName Name of the script package. + * @param scriptCmdletName Name of the script cmdlet. * @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 a cmdlet available for script execution along with {@link Response}. + * @return a ScriptCmdlet along with {@link Response}. */ - Response getWithResponse( - String resourceGroupName, - String privateCloudName, - String scriptPackageName, - String scriptCmdletName, - Context context); + Response getWithResponse(String resourceGroupName, String privateCloudName, String scriptPackageName, + String scriptCmdletName, Context context); /** - * Return information about a script cmdlet resource in a specific package on a private cloud. - * + * Get a ScriptCmdlet. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param scriptPackageName Name of the script package in the private cloud. - * @param scriptCmdletName Name of the script cmdlet resource in the script package in the private cloud. + * @param scriptPackageName Name of the script package. + * @param scriptCmdletName Name of the script cmdlet. * @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 a cmdlet available for script execution. + * @return a ScriptCmdlet. */ - ScriptCmdlet get( - String resourceGroupName, String privateCloudName, String scriptPackageName, String scriptCmdletName); + ScriptCmdlet get(String resourceGroupName, String privateCloudName, String scriptPackageName, + String scriptCmdletName); } diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ScriptCmdletsList.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ScriptCmdletsList.java deleted file mode 100644 index 005d7ef37f1a4..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ScriptCmdletsList.java +++ /dev/null @@ -1,59 +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.avs.models; - -import com.azure.core.annotation.Immutable; -import com.azure.resourcemanager.avs.fluent.models.ScriptCmdletInner; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** Pageable list of scripts/cmdlets. */ -@Immutable -public final class ScriptCmdletsList { - /* - * List of scripts - */ - @JsonProperty(value = "value", access = JsonProperty.Access.WRITE_ONLY) - private List value; - - /* - * URL to get the next page if any - */ - @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) - private String nextLink; - - /** Creates an instance of ScriptCmdletsList class. */ - public ScriptCmdletsList() { - } - - /** - * Get the value property: List of scripts. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Get the nextLink property: URL to get the next page if 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/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ScriptExecution.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ScriptExecution.java index b48a7466bcf82..ae7e11eca9bec 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ScriptExecution.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ScriptExecution.java @@ -5,45 +5,55 @@ package com.azure.resourcemanager.avs.models; import com.azure.core.http.rest.Response; +import com.azure.core.management.SystemData; import com.azure.core.util.Context; import com.azure.resourcemanager.avs.fluent.models.ScriptExecutionInner; import java.time.OffsetDateTime; import java.util.List; import java.util.Map; -/** An immutable client-side representation of ScriptExecution. */ +/** + * An immutable client-side representation of ScriptExecution. + */ public interface ScriptExecution { /** * Gets the id property: Fully qualified resource Id for the resource. - * + * * @return the id value. */ String id(); /** * Gets the name property: The name of the resource. - * + * * @return the name value. */ String name(); /** * Gets the type property: The type of the resource. - * + * * @return the type value. */ String type(); + /** + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + SystemData systemData(); + /** * Gets the scriptCmdletId property: A reference to the script cmdlet resource if user is running a AVS script. - * + * * @return the scriptCmdletId value. */ String scriptCmdletId(); /** * Gets the parameters property: Parameters the script will accept. - * + * * @return the parameters value. */ List parameters(); @@ -51,128 +61,136 @@ public interface ScriptExecution { /** * Gets the hiddenParameters property: Parameters that will be hidden/not visible to ARM, such as passwords and * credentials. - * + * * @return the hiddenParameters value. */ List hiddenParameters(); /** - * Gets the failureReason property: Error message if the script was able to run, but if the script itself had errors - * or powershell threw an exception. - * + * Gets the failureReason property: Error message if the script was able to run, but if the script itself had + * errors or powershell threw an exception. + * * @return the failureReason value. */ String failureReason(); /** * Gets the timeout property: Time limit for execution. - * + * * @return the timeout value. */ String timeout(); /** * Gets the retention property: Time to live for the resource. If not provided, will be available for 60 days. - * + * * @return the retention value. */ String retention(); /** * Gets the submittedAt property: Time the script execution was submitted. - * + * * @return the submittedAt value. */ OffsetDateTime submittedAt(); /** * Gets the startedAt property: Time the script execution was started. - * + * * @return the startedAt value. */ OffsetDateTime startedAt(); /** * Gets the finishedAt property: Time the script execution was finished. - * + * * @return the finishedAt value. */ OffsetDateTime finishedAt(); /** * Gets the provisioningState property: The state of the script execution resource. - * + * * @return the provisioningState value. */ ScriptExecutionProvisioningState provisioningState(); /** * Gets the output property: Standard output stream from the powershell execution. - * + * * @return the output value. */ List output(); /** * Gets the namedOutputs property: User-defined dictionary. - * + * * @return the namedOutputs value. */ Map namedOutputs(); /** * Gets the information property: Standard information out stream from the powershell execution. - * + * * @return the information value. */ List information(); /** * Gets the warnings property: Standard warning out stream from the powershell execution. - * + * * @return the warnings value. */ List warnings(); /** * Gets the errors property: Standard error output stream from the powershell execution. - * + * * @return the errors value. */ List errors(); /** * Gets the name of the resource group. - * + * * @return the name of the resource group. */ String resourceGroupName(); /** * Gets the inner com.azure.resourcemanager.avs.fluent.models.ScriptExecutionInner object. - * + * * @return the inner object. */ ScriptExecutionInner innerModel(); - /** The entirety of the ScriptExecution definition. */ + /** + * The entirety of the ScriptExecution definition. + */ interface Definition extends DefinitionStages.Blank, DefinitionStages.WithParentResource, DefinitionStages.WithCreate { } - /** The ScriptExecution definition stages. */ + /** + * The ScriptExecution definition stages. + */ interface DefinitionStages { - /** The first stage of the ScriptExecution definition. */ + /** + * The first stage of the ScriptExecution definition. + */ interface Blank extends WithParentResource { } - /** The stage of the ScriptExecution definition allowing to specify parent resource. */ + /** + * The stage of the ScriptExecution definition allowing to specify parent resource. + */ interface WithParentResource { /** * Specifies resourceGroupName, privateCloudName. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param privateCloudName The name of the private cloud. + * @param privateCloudName Name of the private cloud. * @return the next definition stage. */ WithCreate withExistingPrivateCloud(String resourceGroupName, String privateCloudName); @@ -182,119 +200,131 @@ interface WithParentResource { * The stage of the ScriptExecution definition which contains all the minimum required properties for the * resource to be created, but also allows for any other optional properties to be specified. */ - interface WithCreate - extends DefinitionStages.WithScriptCmdletId, - DefinitionStages.WithParameters, - DefinitionStages.WithHiddenParameters, - DefinitionStages.WithFailureReason, - DefinitionStages.WithTimeout, - DefinitionStages.WithRetention, - DefinitionStages.WithOutput, - DefinitionStages.WithNamedOutputs { + interface WithCreate extends DefinitionStages.WithScriptCmdletId, DefinitionStages.WithParameters, + DefinitionStages.WithHiddenParameters, DefinitionStages.WithFailureReason, DefinitionStages.WithTimeout, + DefinitionStages.WithRetention, DefinitionStages.WithOutput, DefinitionStages.WithNamedOutputs { /** * Executes the create request. - * + * * @return the created resource. */ ScriptExecution create(); /** * Executes the create request. - * + * * @param context The context to associate with this operation. * @return the created resource. */ ScriptExecution create(Context context); } - /** The stage of the ScriptExecution definition allowing to specify scriptCmdletId. */ + /** + * The stage of the ScriptExecution definition allowing to specify scriptCmdletId. + */ interface WithScriptCmdletId { /** * Specifies the scriptCmdletId property: A reference to the script cmdlet resource if user is running a AVS * script. - * + * * @param scriptCmdletId A reference to the script cmdlet resource if user is running a AVS script. * @return the next definition stage. */ WithCreate withScriptCmdletId(String scriptCmdletId); } - /** The stage of the ScriptExecution definition allowing to specify parameters. */ + /** + * The stage of the ScriptExecution definition allowing to specify parameters. + */ interface WithParameters { /** * Specifies the parameters property: Parameters the script will accept. - * + * * @param parameters Parameters the script will accept. * @return the next definition stage. */ WithCreate withParameters(List parameters); } - /** The stage of the ScriptExecution definition allowing to specify hiddenParameters. */ + /** + * The stage of the ScriptExecution definition allowing to specify hiddenParameters. + */ interface WithHiddenParameters { /** * Specifies the hiddenParameters property: Parameters that will be hidden/not visible to ARM, such as - * passwords and credentials. - * + * passwords and + * credentials. + * * @param hiddenParameters Parameters that will be hidden/not visible to ARM, such as passwords and - * credentials. + * credentials. * @return the next definition stage. */ WithCreate withHiddenParameters(List hiddenParameters); } - /** The stage of the ScriptExecution definition allowing to specify failureReason. */ + /** + * The stage of the ScriptExecution definition allowing to specify failureReason. + */ interface WithFailureReason { /** * Specifies the failureReason property: Error message if the script was able to run, but if the script - * itself had errors or powershell threw an exception. - * - * @param failureReason Error message if the script was able to run, but if the script itself had errors or - * powershell threw an exception. + * itself had + * errors or powershell threw an exception. + * + * @param failureReason Error message if the script was able to run, but if the script itself had + * errors or powershell threw an exception. * @return the next definition stage. */ WithCreate withFailureReason(String failureReason); } - /** The stage of the ScriptExecution definition allowing to specify timeout. */ + /** + * The stage of the ScriptExecution definition allowing to specify timeout. + */ interface WithTimeout { /** * Specifies the timeout property: Time limit for execution. - * + * * @param timeout Time limit for execution. * @return the next definition stage. */ WithCreate withTimeout(String timeout); } - /** The stage of the ScriptExecution definition allowing to specify retention. */ + /** + * The stage of the ScriptExecution definition allowing to specify retention. + */ interface WithRetention { /** * Specifies the retention property: Time to live for the resource. If not provided, will be available for * 60 days. - * + * * @param retention Time to live for the resource. If not provided, will be available for 60 days. * @return the next definition stage. */ WithCreate withRetention(String retention); } - /** The stage of the ScriptExecution definition allowing to specify output. */ + /** + * The stage of the ScriptExecution definition allowing to specify output. + */ interface WithOutput { /** * Specifies the output property: Standard output stream from the powershell execution. - * + * * @param output Standard output stream from the powershell execution. * @return the next definition stage. */ WithCreate withOutput(List output); } - /** The stage of the ScriptExecution definition allowing to specify namedOutputs. */ + /** + * The stage of the ScriptExecution definition allowing to specify namedOutputs. + */ interface WithNamedOutputs { /** * Specifies the namedOutputs property: User-defined dictionary.. - * + * * @param namedOutputs User-defined dictionary. * @return the next definition stage. */ @@ -304,127 +334,143 @@ interface WithNamedOutputs { /** * Begins update for the ScriptExecution resource. - * + * * @return the stage of resource update. */ ScriptExecution.Update update(); - /** The template for ScriptExecution update. */ - interface Update - extends UpdateStages.WithScriptCmdletId, - UpdateStages.WithParameters, - UpdateStages.WithHiddenParameters, - UpdateStages.WithFailureReason, - UpdateStages.WithTimeout, - UpdateStages.WithRetention, - UpdateStages.WithOutput, - UpdateStages.WithNamedOutputs { + /** + * The template for ScriptExecution update. + */ + interface Update extends UpdateStages.WithScriptCmdletId, UpdateStages.WithParameters, + UpdateStages.WithHiddenParameters, UpdateStages.WithFailureReason, UpdateStages.WithTimeout, + UpdateStages.WithRetention, UpdateStages.WithOutput, UpdateStages.WithNamedOutputs { /** * Executes the update request. - * + * * @return the updated resource. */ ScriptExecution apply(); /** * Executes the update request. - * + * * @param context The context to associate with this operation. * @return the updated resource. */ ScriptExecution apply(Context context); } - /** The ScriptExecution update stages. */ + /** + * The ScriptExecution update stages. + */ interface UpdateStages { - /** The stage of the ScriptExecution update allowing to specify scriptCmdletId. */ + /** + * The stage of the ScriptExecution update allowing to specify scriptCmdletId. + */ interface WithScriptCmdletId { /** * Specifies the scriptCmdletId property: A reference to the script cmdlet resource if user is running a AVS * script. - * + * * @param scriptCmdletId A reference to the script cmdlet resource if user is running a AVS script. * @return the next definition stage. */ Update withScriptCmdletId(String scriptCmdletId); } - /** The stage of the ScriptExecution update allowing to specify parameters. */ + /** + * The stage of the ScriptExecution update allowing to specify parameters. + */ interface WithParameters { /** * Specifies the parameters property: Parameters the script will accept. - * + * * @param parameters Parameters the script will accept. * @return the next definition stage. */ Update withParameters(List parameters); } - /** The stage of the ScriptExecution update allowing to specify hiddenParameters. */ + /** + * The stage of the ScriptExecution update allowing to specify hiddenParameters. + */ interface WithHiddenParameters { /** * Specifies the hiddenParameters property: Parameters that will be hidden/not visible to ARM, such as - * passwords and credentials. - * + * passwords and + * credentials. + * * @param hiddenParameters Parameters that will be hidden/not visible to ARM, such as passwords and - * credentials. + * credentials. * @return the next definition stage. */ Update withHiddenParameters(List hiddenParameters); } - /** The stage of the ScriptExecution update allowing to specify failureReason. */ + /** + * The stage of the ScriptExecution update allowing to specify failureReason. + */ interface WithFailureReason { /** * Specifies the failureReason property: Error message if the script was able to run, but if the script - * itself had errors or powershell threw an exception. - * - * @param failureReason Error message if the script was able to run, but if the script itself had errors or - * powershell threw an exception. + * itself had + * errors or powershell threw an exception. + * + * @param failureReason Error message if the script was able to run, but if the script itself had + * errors or powershell threw an exception. * @return the next definition stage. */ Update withFailureReason(String failureReason); } - /** The stage of the ScriptExecution update allowing to specify timeout. */ + /** + * The stage of the ScriptExecution update allowing to specify timeout. + */ interface WithTimeout { /** * Specifies the timeout property: Time limit for execution. - * + * * @param timeout Time limit for execution. * @return the next definition stage. */ Update withTimeout(String timeout); } - /** The stage of the ScriptExecution update allowing to specify retention. */ + /** + * The stage of the ScriptExecution update allowing to specify retention. + */ interface WithRetention { /** * Specifies the retention property: Time to live for the resource. If not provided, will be available for * 60 days. - * + * * @param retention Time to live for the resource. If not provided, will be available for 60 days. * @return the next definition stage. */ Update withRetention(String retention); } - /** The stage of the ScriptExecution update allowing to specify output. */ + /** + * The stage of the ScriptExecution update allowing to specify output. + */ interface WithOutput { /** * Specifies the output property: Standard output stream from the powershell execution. - * + * * @param output Standard output stream from the powershell execution. * @return the next definition stage. */ Update withOutput(List output); } - /** The stage of the ScriptExecution update allowing to specify namedOutputs. */ + /** + * The stage of the ScriptExecution update allowing to specify namedOutputs. + */ interface WithNamedOutputs { /** * Specifies the namedOutputs property: User-defined dictionary.. - * + * * @param namedOutputs User-defined dictionary. * @return the next definition stage. */ @@ -434,14 +480,14 @@ interface WithNamedOutputs { /** * Refreshes the resource to sync with Azure. - * + * * @return the refreshed resource. */ ScriptExecution refresh(); /** * Refreshes the resource to sync with Azure. - * + * * @param context The context to associate with this operation. * @return the refreshed resource. */ @@ -449,21 +495,21 @@ interface WithNamedOutputs { /** * Return the logs for a script execution resource. - * + * * @param scriptOutputStreamType Name of the desired output stream to return. If not provided, will return all. An - * empty array will return nothing. + * empty array will return nothing. * @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 an instance of a script executed by a user - custom or AVS along with {@link Response}. */ - Response getExecutionLogsWithResponse( - List scriptOutputStreamType, Context context); + Response getExecutionLogsWithResponse(List scriptOutputStreamType, + Context context); /** * Return the logs for a script execution resource. - * + * * @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 an instance of a script executed by a user - custom or AVS. diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ScriptExecutionListResult.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ScriptExecutionListResult.java new file mode 100644 index 0000000000000..884610a5d9c3f --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ScriptExecutionListResult.java @@ -0,0 +1,80 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.avs.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.avs.fluent.models.ScriptExecutionInner; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** + * The response of a ScriptExecution list operation. + */ +@Fluent +public final class ScriptExecutionListResult { + /* + * The ScriptExecution items on this page + */ + @JsonProperty(value = "value", required = true) + private List value; + + /* + * The link to the next page of items + */ + @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) + private String nextLink; + + /** + * Creates an instance of ScriptExecutionListResult class. + */ + public ScriptExecutionListResult() { + } + + /** + * Get the value property: The ScriptExecution items on this page. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Set the value property: The ScriptExecution items on this page. + * + * @param value the value value to set. + * @return the ScriptExecutionListResult object itself. + */ + public ScriptExecutionListResult withValue(List value) { + this.value = value; + return this; + } + + /** + * Get the nextLink property: The link to the next page of items. + * + * @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) { + throw LOGGER.logExceptionAsError( + new IllegalArgumentException("Missing required property value in model ScriptExecutionListResult")); + } else { + value().forEach(e -> e.validate()); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(ScriptExecutionListResult.class); +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ScriptExecutionParameter.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ScriptExecutionParameter.java index 874d0a6d00137..a47b1b151a35d 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ScriptExecutionParameter.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ScriptExecutionParameter.java @@ -11,7 +11,9 @@ import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; -/** The arguments passed in to the execution. */ +/** + * The arguments passed in to the execution. + */ @JsonTypeInfo( use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, @@ -19,10 +21,9 @@ defaultImpl = ScriptExecutionParameter.class) @JsonTypeName("ScriptExecutionParameter") @JsonSubTypes({ + @JsonSubTypes.Type(name = "Credential", value = PSCredentialExecutionParameter.class), @JsonSubTypes.Type(name = "SecureValue", value = ScriptSecureStringExecutionParameter.class), - @JsonSubTypes.Type(name = "Value", value = ScriptStringExecutionParameter.class), - @JsonSubTypes.Type(name = "Credential", value = PSCredentialExecutionParameter.class) -}) + @JsonSubTypes.Type(name = "Value", value = ScriptStringExecutionParameter.class) }) @Fluent public class ScriptExecutionParameter { /* @@ -31,13 +32,15 @@ public class ScriptExecutionParameter { @JsonProperty(value = "name", required = true) private String name; - /** Creates an instance of ScriptExecutionParameter class. */ + /** + * Creates an instance of ScriptExecutionParameter class. + */ public ScriptExecutionParameter() { } /** * Get the name property: The parameter name. - * + * * @return the name value. */ public String name() { @@ -46,7 +49,7 @@ public String name() { /** * Set the name property: The parameter name. - * + * * @param name the name value to set. * @return the ScriptExecutionParameter object itself. */ @@ -57,14 +60,13 @@ public ScriptExecutionParameter withName(String name) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { if (name() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property name in model ScriptExecutionParameter")); + throw LOGGER.logExceptionAsError( + new IllegalArgumentException("Missing required property name in model ScriptExecutionParameter")); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ScriptExecutionParameterType.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ScriptExecutionParameterType.java index 736ae6a32b8d2..c61b082cc5181 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ScriptExecutionParameterType.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ScriptExecutionParameterType.java @@ -8,20 +8,28 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** The type of execution parameter. */ +/** + * script execution parameter type. + */ public final class ScriptExecutionParameterType extends ExpandableStringEnum { - /** Static value Value for ScriptExecutionParameterType. */ + /** + * Static value Value for ScriptExecutionParameterType. + */ public static final ScriptExecutionParameterType VALUE = fromString("Value"); - /** Static value SecureValue for ScriptExecutionParameterType. */ + /** + * Static value SecureValue for ScriptExecutionParameterType. + */ public static final ScriptExecutionParameterType SECURE_VALUE = fromString("SecureValue"); - /** Static value Credential for ScriptExecutionParameterType. */ + /** + * Static value Credential for ScriptExecutionParameterType. + */ public static final ScriptExecutionParameterType CREDENTIAL = fromString("Credential"); /** * Creates a new instance of ScriptExecutionParameterType value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -30,7 +38,7 @@ public ScriptExecutionParameterType() { /** * Creates or finds a ScriptExecutionParameterType from its string representation. - * + * * @param name a name to look for. * @return the corresponding ScriptExecutionParameterType. */ @@ -41,7 +49,7 @@ public static ScriptExecutionParameterType fromString(String name) { /** * Gets known ScriptExecutionParameterType values. - * + * * @return known ScriptExecutionParameterType values. */ public static Collection values() { diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ScriptExecutionProvisioningState.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ScriptExecutionProvisioningState.java index 249803f384f6f..b78b6e985d4f8 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ScriptExecutionProvisioningState.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ScriptExecutionProvisioningState.java @@ -8,35 +8,53 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** The state of the script execution resource. */ +/** + * Script Execution provisioning state. + */ public final class ScriptExecutionProvisioningState extends ExpandableStringEnum { - /** Static value Pending for ScriptExecutionProvisioningState. */ - public static final ScriptExecutionProvisioningState PENDING = fromString("Pending"); - - /** Static value Running for ScriptExecutionProvisioningState. */ - public static final ScriptExecutionProvisioningState RUNNING = fromString("Running"); - - /** Static value Succeeded for ScriptExecutionProvisioningState. */ + /** + * Static value Succeeded for ScriptExecutionProvisioningState. + */ public static final ScriptExecutionProvisioningState SUCCEEDED = fromString("Succeeded"); - /** Static value Failed for ScriptExecutionProvisioningState. */ + /** + * Static value Failed for ScriptExecutionProvisioningState. + */ public static final ScriptExecutionProvisioningState FAILED = fromString("Failed"); - /** Static value Cancelling for ScriptExecutionProvisioningState. */ + /** + * Static value Canceled for ScriptExecutionProvisioningState. + */ + public static final ScriptExecutionProvisioningState CANCELED = fromString("Canceled"); + + /** + * Static value Pending for ScriptExecutionProvisioningState. + */ + public static final ScriptExecutionProvisioningState PENDING = fromString("Pending"); + + /** + * Static value Running for ScriptExecutionProvisioningState. + */ + public static final ScriptExecutionProvisioningState RUNNING = fromString("Running"); + + /** + * Static value Cancelling for ScriptExecutionProvisioningState. + */ public static final ScriptExecutionProvisioningState CANCELLING = fromString("Cancelling"); - /** Static value Cancelled for ScriptExecutionProvisioningState. */ + /** + * Static value Cancelled for ScriptExecutionProvisioningState. + */ public static final ScriptExecutionProvisioningState CANCELLED = fromString("Cancelled"); - /** Static value Deleting for ScriptExecutionProvisioningState. */ + /** + * Static value Deleting for ScriptExecutionProvisioningState. + */ public static final ScriptExecutionProvisioningState DELETING = fromString("Deleting"); - /** Static value Canceled for ScriptExecutionProvisioningState. */ - public static final ScriptExecutionProvisioningState CANCELED = fromString("Canceled"); - /** * Creates a new instance of ScriptExecutionProvisioningState value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -45,7 +63,7 @@ public ScriptExecutionProvisioningState() { /** * Creates or finds a ScriptExecutionProvisioningState from its string representation. - * + * * @param name a name to look for. * @return the corresponding ScriptExecutionProvisioningState. */ @@ -56,7 +74,7 @@ public static ScriptExecutionProvisioningState fromString(String name) { /** * Gets known ScriptExecutionProvisioningState values. - * + * * @return known ScriptExecutionProvisioningState values. */ public static Collection values() { diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ScriptExecutions.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ScriptExecutions.java index 96e89fdfe2823..5d1e4330c70af 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ScriptExecutions.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ScriptExecutions.java @@ -9,67 +9,69 @@ import com.azure.core.util.Context; import java.util.List; -/** Resource collection API of ScriptExecutions. */ +/** + * Resource collection API of ScriptExecutions. + */ public interface ScriptExecutions { /** - * List script executions in a private cloud. - * + * List ScriptExecution resources by PrivateCloud. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return pageable list of script executions as paginated response with {@link PagedIterable}. + * @return the response of a ScriptExecution list operation as paginated response with {@link PagedIterable}. */ PagedIterable list(String resourceGroupName, String privateCloudName); /** - * List script executions in a private cloud. - * + * List ScriptExecution resources by PrivateCloud. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return pageable list of script executions as paginated response with {@link PagedIterable}. + * @return the response of a ScriptExecution list operation as paginated response with {@link PagedIterable}. */ PagedIterable list(String resourceGroupName, String privateCloudName, Context context); /** - * Get an script execution by name in a private cloud. - * + * Get a ScriptExecution. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param scriptExecutionName Name of the user-invoked script execution resource. + * @param scriptExecutionName Name of the script cmdlet. * @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 an script execution by name in a private cloud along with {@link Response}. + * @return a ScriptExecution along with {@link Response}. */ - Response getWithResponse( - String resourceGroupName, String privateCloudName, String scriptExecutionName, Context context); + Response getWithResponse(String resourceGroupName, String privateCloudName, + String scriptExecutionName, Context context); /** - * Get an script execution by name in a private cloud. - * + * Get a ScriptExecution. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param scriptExecutionName Name of the user-invoked script execution resource. + * @param scriptExecutionName Name of the script cmdlet. * @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 an script execution by name in a private cloud. + * @return a ScriptExecution. */ ScriptExecution get(String resourceGroupName, String privateCloudName, String scriptExecutionName); /** - * Cancel a ScriptExecution in a private cloud. - * + * Delete a ScriptExecution. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param scriptExecutionName Name of the user-invoked script execution resource. + * @param scriptExecutionName Name of the script cmdlet. * @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. @@ -77,11 +79,11 @@ Response getWithResponse( void delete(String resourceGroupName, String privateCloudName, String scriptExecutionName); /** - * Cancel a ScriptExecution in a private cloud. - * + * Delete a ScriptExecution. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param scriptExecutionName Name of the user-invoked script execution resource. + * @param scriptExecutionName Name of the script cmdlet. * @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. @@ -91,31 +93,27 @@ Response getWithResponse( /** * Return the logs for a script execution resource. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param scriptExecutionName Name of the user-invoked script execution resource. + * @param scriptExecutionName Name of the script cmdlet. * @param scriptOutputStreamType Name of the desired output stream to return. If not provided, will return all. An - * empty array will return nothing. + * empty array will return nothing. * @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 an instance of a script executed by a user - custom or AVS along with {@link Response}. */ - Response getExecutionLogsWithResponse( - String resourceGroupName, - String privateCloudName, - String scriptExecutionName, - List scriptOutputStreamType, - Context context); + Response getExecutionLogsWithResponse(String resourceGroupName, String privateCloudName, + String scriptExecutionName, List scriptOutputStreamType, Context context); /** * Return the logs for a script execution resource. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param scriptExecutionName Name of the user-invoked script execution resource. + * @param scriptExecutionName Name of the script cmdlet. * @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. @@ -124,31 +122,31 @@ Response getExecutionLogsWithResponse( ScriptExecution getExecutionLogs(String resourceGroupName, String privateCloudName, String scriptExecutionName); /** - * Get an script execution by name in a private cloud. - * + * Get a ScriptExecution. + * * @param id the resource ID. * @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 an script execution by name in a private cloud along with {@link Response}. + * @return a ScriptExecution along with {@link Response}. */ ScriptExecution getById(String id); /** - * Get an script execution by name in a private cloud. - * + * Get a ScriptExecution. + * * @param id the resource ID. * @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 an script execution by name in a private cloud along with {@link Response}. + * @return a ScriptExecution along with {@link Response}. */ Response getByIdWithResponse(String id, Context context); /** - * Cancel a ScriptExecution in a private cloud. - * + * Delete a ScriptExecution. + * * @param id the resource ID. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -157,8 +155,8 @@ Response getExecutionLogsWithResponse( void deleteById(String id); /** - * Cancel a ScriptExecution in a private cloud. - * + * Delete a ScriptExecution. + * * @param id the resource ID. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -169,7 +167,7 @@ Response getExecutionLogsWithResponse( /** * Begins definition for a new ScriptExecution resource. - * + * * @param name resource name. * @return the first stage of the new ScriptExecution definition. */ diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ScriptExecutionsList.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ScriptExecutionsList.java deleted file mode 100644 index efa59a4a74d2f..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ScriptExecutionsList.java +++ /dev/null @@ -1,59 +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.avs.models; - -import com.azure.core.annotation.Immutable; -import com.azure.resourcemanager.avs.fluent.models.ScriptExecutionInner; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** Pageable list of script executions. */ -@Immutable -public final class ScriptExecutionsList { - /* - * List of scripts - */ - @JsonProperty(value = "value", access = JsonProperty.Access.WRITE_ONLY) - private List value; - - /* - * URL to get the next page if any - */ - @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) - private String nextLink; - - /** Creates an instance of ScriptExecutionsList class. */ - public ScriptExecutionsList() { - } - - /** - * Get the value property: List of scripts. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Get the nextLink property: URL to get the next page if 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/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ScriptOutputStreamType.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ScriptOutputStreamType.java index f4f15bd8c6215..40e233aa327fc 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ScriptOutputStreamType.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ScriptOutputStreamType.java @@ -8,23 +8,33 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for ScriptOutputStreamType. */ +/** + * Script Output Stream type. + */ public final class ScriptOutputStreamType extends ExpandableStringEnum { - /** Static value Information for ScriptOutputStreamType. */ + /** + * Static value Information for ScriptOutputStreamType. + */ public static final ScriptOutputStreamType INFORMATION = fromString("Information"); - /** Static value Warning for ScriptOutputStreamType. */ + /** + * Static value Warning for ScriptOutputStreamType. + */ public static final ScriptOutputStreamType WARNING = fromString("Warning"); - /** Static value Output for ScriptOutputStreamType. */ + /** + * Static value Output for ScriptOutputStreamType. + */ public static final ScriptOutputStreamType OUTPUT = fromString("Output"); - /** Static value Error for ScriptOutputStreamType. */ + /** + * Static value Error for ScriptOutputStreamType. + */ public static final ScriptOutputStreamType ERROR = fromString("Error"); /** * Creates a new instance of ScriptOutputStreamType value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -33,7 +43,7 @@ public ScriptOutputStreamType() { /** * Creates or finds a ScriptOutputStreamType from its string representation. - * + * * @param name a name to look for. * @return the corresponding ScriptOutputStreamType. */ @@ -44,7 +54,7 @@ public static ScriptOutputStreamType fromString(String name) { /** * Gets known ScriptOutputStreamType values. - * + * * @return known ScriptOutputStreamType values. */ public static Collection values() { diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ScriptPackage.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ScriptPackage.java index beff089fb54e6..33cedd0592b98 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ScriptPackage.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ScriptPackage.java @@ -4,62 +4,79 @@ package com.azure.resourcemanager.avs.models; +import com.azure.core.management.SystemData; import com.azure.resourcemanager.avs.fluent.models.ScriptPackageInner; -/** An immutable client-side representation of ScriptPackage. */ +/** + * An immutable client-side representation of ScriptPackage. + */ public interface ScriptPackage { /** * Gets the id property: Fully qualified resource Id for the resource. - * + * * @return the id value. */ String id(); /** * Gets the name property: The name of the resource. - * + * * @return the name value. */ String name(); /** * Gets the type property: The type of the resource. - * + * * @return the type value. */ String type(); + /** + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + SystemData systemData(); + + /** + * Gets the provisioningState property: The provisioning state of the resource. + * + * @return the provisioningState value. + */ + ScriptPackageProvisioningState provisioningState(); + /** * Gets the description property: User friendly description of the package. - * + * * @return the description value. */ String description(); /** * Gets the version property: Module version. - * + * * @return the version value. */ String version(); /** * Gets the company property: Company that created and supports the package. - * + * * @return the company value. */ String company(); /** * Gets the uri property: Link to support by the package vendor. - * + * * @return the uri value. */ String uri(); /** * Gets the inner com.azure.resourcemanager.avs.fluent.models.ScriptPackageInner object. - * + * * @return the inner object. */ ScriptPackageInner innerModel(); diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ScriptPackageListResult.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ScriptPackageListResult.java new file mode 100644 index 0000000000000..8c5bfa66fcbad --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ScriptPackageListResult.java @@ -0,0 +1,80 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.avs.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.avs.fluent.models.ScriptPackageInner; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** + * The response of a ScriptPackage list operation. + */ +@Fluent +public final class ScriptPackageListResult { + /* + * The ScriptPackage items on this page + */ + @JsonProperty(value = "value", required = true) + private List value; + + /* + * The link to the next page of items + */ + @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) + private String nextLink; + + /** + * Creates an instance of ScriptPackageListResult class. + */ + public ScriptPackageListResult() { + } + + /** + * Get the value property: The ScriptPackage items on this page. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Set the value property: The ScriptPackage items on this page. + * + * @param value the value value to set. + * @return the ScriptPackageListResult object itself. + */ + public ScriptPackageListResult withValue(List value) { + this.value = value; + return this; + } + + /** + * Get the nextLink property: The link to the next page of items. + * + * @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) { + throw LOGGER.logExceptionAsError( + new IllegalArgumentException("Missing required property value in model ScriptPackageListResult")); + } else { + value().forEach(e -> e.validate()); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(ScriptPackageListResult.class); +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ScriptPackageProvisioningState.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ScriptPackageProvisioningState.java new file mode 100644 index 0000000000000..265c06a8f1345 --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ScriptPackageProvisioningState.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.avs.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** + * Script Package provisioning state. + */ +public final class ScriptPackageProvisioningState extends ExpandableStringEnum { + /** + * Static value Succeeded for ScriptPackageProvisioningState. + */ + public static final ScriptPackageProvisioningState SUCCEEDED = fromString("Succeeded"); + + /** + * Static value Failed for ScriptPackageProvisioningState. + */ + public static final ScriptPackageProvisioningState FAILED = fromString("Failed"); + + /** + * Static value Canceled for ScriptPackageProvisioningState. + */ + public static final ScriptPackageProvisioningState CANCELED = fromString("Canceled"); + + /** + * Creates a new instance of ScriptPackageProvisioningState value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ScriptPackageProvisioningState() { + } + + /** + * Creates or finds a ScriptPackageProvisioningState from its string representation. + * + * @param name a name to look for. + * @return the corresponding ScriptPackageProvisioningState. + */ + @JsonCreator + public static ScriptPackageProvisioningState fromString(String name) { + return fromString(name, ScriptPackageProvisioningState.class); + } + + /** + * Gets known ScriptPackageProvisioningState values. + * + * @return known ScriptPackageProvisioningState values. + */ + public static Collection values() { + return values(ScriptPackageProvisioningState.class); + } +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ScriptPackages.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ScriptPackages.java index 9951320526c58..457f32d3e0dd3 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ScriptPackages.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ScriptPackages.java @@ -8,58 +8,60 @@ import com.azure.core.http.rest.Response; import com.azure.core.util.Context; -/** Resource collection API of ScriptPackages. */ +/** + * Resource collection API of ScriptPackages. + */ public interface ScriptPackages { /** - * List script packages available to run on the private cloud. - * + * List ScriptPackage resources by PrivateCloud. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. * @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 a list of the available script packages as paginated response with {@link PagedIterable}. + * @return the response of a ScriptPackage list operation as paginated response with {@link PagedIterable}. */ PagedIterable list(String resourceGroupName, String privateCloudName); /** - * List script packages available to run on the private cloud. - * + * List ScriptPackage resources by PrivateCloud. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. * @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 a list of the available script packages as paginated response with {@link PagedIterable}. + * @return the response of a ScriptPackage list operation as paginated response with {@link PagedIterable}. */ PagedIterable list(String resourceGroupName, String privateCloudName, Context context); /** - * Get a script package available to run on a private cloud. - * + * Get a ScriptPackage. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param scriptPackageName Name of the script package in the private cloud. + * @param scriptPackageName Name of the script package. * @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 a script package available to run on a private cloud along with {@link Response}. + * @return a ScriptPackage along with {@link Response}. */ - Response getWithResponse( - String resourceGroupName, String privateCloudName, String scriptPackageName, Context context); + Response getWithResponse(String resourceGroupName, String privateCloudName, String scriptPackageName, + Context context); /** - * Get a script package available to run on a private cloud. - * + * Get a ScriptPackage. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param scriptPackageName Name of the script package in the private cloud. + * @param scriptPackageName Name of the script package. * @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 a script package available to run on a private cloud. + * @return a ScriptPackage. */ ScriptPackage get(String resourceGroupName, String privateCloudName, String scriptPackageName); } diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ScriptPackagesList.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ScriptPackagesList.java deleted file mode 100644 index 8cea424d7b629..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ScriptPackagesList.java +++ /dev/null @@ -1,59 +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.avs.models; - -import com.azure.core.annotation.Immutable; -import com.azure.resourcemanager.avs.fluent.models.ScriptPackageInner; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** A list of the available script packages. */ -@Immutable -public final class ScriptPackagesList { - /* - * List of script package resources - */ - @JsonProperty(value = "value", access = JsonProperty.Access.WRITE_ONLY) - private List value; - - /* - * URL to get the next page if any - */ - @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) - private String nextLink; - - /** Creates an instance of ScriptPackagesList class. */ - public ScriptPackagesList() { - } - - /** - * Get the value property: List of script package resources. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Get the nextLink property: URL to get the next page if 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/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ScriptParameter.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ScriptParameter.java index f626c36b226d2..33f9fe8e211cc 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ScriptParameter.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ScriptParameter.java @@ -7,11 +7,14 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; -/** An parameter that the script will accept. */ +/** + * An parameter that the script will accept. + */ @Fluent public final class ScriptParameter { /* - * The type of parameter the script is expecting. psCredential is a PSCredentialObject + * The type of parameter the script is expecting. psCredential is a + * PSCredentialObject */ @JsonProperty(value = "type", access = JsonProperty.Access.WRITE_ONLY) private ScriptParameterTypes type; @@ -29,7 +32,8 @@ public final class ScriptParameter { private String description; /* - * Should this parameter be visible to arm and passed in the parameters argument when executing + * Should this parameter be visible to arm and passed in the parameters argument + * when executing */ @JsonProperty(value = "visibility", access = JsonProperty.Access.WRITE_ONLY) private VisibilityParameterEnum visibility; @@ -40,13 +44,16 @@ public final class ScriptParameter { @JsonProperty(value = "optional", access = JsonProperty.Access.WRITE_ONLY) private OptionalParamEnum optional; - /** Creates an instance of ScriptParameter class. */ + /** + * Creates an instance of ScriptParameter class. + */ public ScriptParameter() { } /** - * Get the type property: The type of parameter the script is expecting. psCredential is a PSCredentialObject. - * + * Get the type property: The type of parameter the script is expecting. psCredential is a + * PSCredentialObject. + * * @return the type value. */ public ScriptParameterTypes type() { @@ -55,7 +62,7 @@ public ScriptParameterTypes type() { /** * Get the name property: The parameter name that the script will expect a parameter value for. - * + * * @return the name value. */ public String name() { @@ -64,7 +71,7 @@ public String name() { /** * Set the name property: The parameter name that the script will expect a parameter value for. - * + * * @param name the name value to set. * @return the ScriptParameter object itself. */ @@ -75,7 +82,7 @@ public ScriptParameter withName(String name) { /** * Get the description property: User friendly description of the parameter. - * + * * @return the description value. */ public String description() { @@ -83,9 +90,9 @@ public String description() { } /** - * Get the visibility property: Should this parameter be visible to arm and passed in the parameters argument when - * executing. - * + * Get the visibility property: Should this parameter be visible to arm and passed in the parameters argument + * when executing. + * * @return the visibility value. */ public VisibilityParameterEnum visibility() { @@ -94,7 +101,7 @@ public VisibilityParameterEnum visibility() { /** * Get the optional property: Is this parameter required or optional. - * + * * @return the optional value. */ public OptionalParamEnum optional() { @@ -103,7 +110,7 @@ public OptionalParamEnum optional() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ScriptParameterTypes.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ScriptParameterTypes.java index 4e2302248c420..4d412526c2d96 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ScriptParameterTypes.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ScriptParameterTypes.java @@ -8,29 +8,43 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** The type of parameter the script is expecting. psCredential is a PSCredentialObject. */ +/** + * Script Parameter types. + */ public final class ScriptParameterTypes extends ExpandableStringEnum { - /** Static value String for ScriptParameterTypes. */ + /** + * Static value String for ScriptParameterTypes. + */ public static final ScriptParameterTypes STRING = fromString("String"); - /** Static value SecureString for ScriptParameterTypes. */ + /** + * Static value SecureString for ScriptParameterTypes. + */ public static final ScriptParameterTypes SECURE_STRING = fromString("SecureString"); - /** Static value Credential for ScriptParameterTypes. */ + /** + * Static value Credential for ScriptParameterTypes. + */ public static final ScriptParameterTypes CREDENTIAL = fromString("Credential"); - /** Static value Int for ScriptParameterTypes. */ + /** + * Static value Int for ScriptParameterTypes. + */ public static final ScriptParameterTypes INT = fromString("Int"); - /** Static value Bool for ScriptParameterTypes. */ + /** + * Static value Bool for ScriptParameterTypes. + */ public static final ScriptParameterTypes BOOL = fromString("Bool"); - /** Static value Float for ScriptParameterTypes. */ + /** + * Static value Float for ScriptParameterTypes. + */ public static final ScriptParameterTypes FLOAT = fromString("Float"); /** * Creates a new instance of ScriptParameterTypes value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -39,7 +53,7 @@ public ScriptParameterTypes() { /** * Creates or finds a ScriptParameterTypes from its string representation. - * + * * @param name a name to look for. * @return the corresponding ScriptParameterTypes. */ @@ -50,7 +64,7 @@ public static ScriptParameterTypes fromString(String name) { /** * Gets known ScriptParameterTypes values. - * + * * @return known ScriptParameterTypes values. */ public static Collection values() { diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ScriptSecureStringExecutionParameter.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ScriptSecureStringExecutionParameter.java index 9f7c01b71ca83..fc508767b8d77 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ScriptSecureStringExecutionParameter.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ScriptSecureStringExecutionParameter.java @@ -9,7 +9,9 @@ import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; -/** a plain text value execution parameter. */ +/** + * a plain text value execution parameter. + */ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type") @JsonTypeName("SecureValue") @Fluent @@ -20,13 +22,15 @@ public final class ScriptSecureStringExecutionParameter extends ScriptExecutionP @JsonProperty(value = "secureValue") private String secureValue; - /** Creates an instance of ScriptSecureStringExecutionParameter class. */ + /** + * Creates an instance of ScriptSecureStringExecutionParameter class. + */ public ScriptSecureStringExecutionParameter() { } /** * Get the secureValue property: A secure value for the passed parameter, not to be stored in logs. - * + * * @return the secureValue value. */ public String secureValue() { @@ -35,7 +39,7 @@ public String secureValue() { /** * Set the secureValue property: A secure value for the passed parameter, not to be stored in logs. - * + * * @param secureValue the secureValue value to set. * @return the ScriptSecureStringExecutionParameter object itself. */ @@ -44,7 +48,9 @@ public ScriptSecureStringExecutionParameter withSecureValue(String secureValue) return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public ScriptSecureStringExecutionParameter withName(String name) { super.withName(name); @@ -53,7 +59,7 @@ public ScriptSecureStringExecutionParameter withName(String name) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ @Override diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ScriptStringExecutionParameter.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ScriptStringExecutionParameter.java index 5b013c585b4f2..92c2a3e01bbee 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ScriptStringExecutionParameter.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ScriptStringExecutionParameter.java @@ -9,7 +9,9 @@ import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; -/** a plain text value execution parameter. */ +/** + * a plain text value execution parameter. + */ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type") @JsonTypeName("Value") @Fluent @@ -20,13 +22,15 @@ public final class ScriptStringExecutionParameter extends ScriptExecutionParamet @JsonProperty(value = "value") private String value; - /** Creates an instance of ScriptStringExecutionParameter class. */ + /** + * Creates an instance of ScriptStringExecutionParameter class. + */ public ScriptStringExecutionParameter() { } /** * Get the value property: The value for the passed parameter. - * + * * @return the value value. */ public String value() { @@ -35,7 +39,7 @@ public String value() { /** * Set the value property: The value for the passed parameter. - * + * * @param value the value value to set. * @return the ScriptStringExecutionParameter object itself. */ @@ -44,7 +48,9 @@ public ScriptStringExecutionParameter withValue(String value) { return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public ScriptStringExecutionParameter withName(String name) { super.withName(name); @@ -53,7 +59,7 @@ public ScriptStringExecutionParameter withName(String name) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ @Override diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/SegmentStatusEnum.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/SegmentStatusEnum.java index 41285ae17c5ab..ff2b90deb7b9a 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/SegmentStatusEnum.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/SegmentStatusEnum.java @@ -8,17 +8,23 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Segment status. */ +/** + * Segment status. + */ public final class SegmentStatusEnum extends ExpandableStringEnum { - /** Static value SUCCESS for SegmentStatusEnum. */ + /** + * Static value SUCCESS for SegmentStatusEnum. + */ public static final SegmentStatusEnum SUCCESS = fromString("SUCCESS"); - /** Static value FAILURE for SegmentStatusEnum. */ + /** + * Static value FAILURE for SegmentStatusEnum. + */ public static final SegmentStatusEnum FAILURE = fromString("FAILURE"); /** * Creates a new instance of SegmentStatusEnum value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -27,7 +33,7 @@ public SegmentStatusEnum() { /** * Creates or finds a SegmentStatusEnum from its string representation. - * + * * @param name a name to look for. * @return the corresponding SegmentStatusEnum. */ @@ -38,7 +44,7 @@ public static SegmentStatusEnum fromString(String name) { /** * Gets known SegmentStatusEnum values. - * + * * @return known SegmentStatusEnum values. */ public static Collection values() { diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ServiceSpecification.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ServiceSpecification.java deleted file mode 100644 index 90674af3ee143..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ServiceSpecification.java +++ /dev/null @@ -1,83 +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.avs.models; - -import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** Service specification payload. */ -@Fluent -public final class ServiceSpecification { - /* - * Specifications of the Log for Azure Monitoring - */ - @JsonProperty(value = "logSpecifications") - private List logSpecifications; - - /* - * Specifications of the Metrics for Azure Monitoring - */ - @JsonProperty(value = "metricSpecifications") - private List metricSpecifications; - - /** Creates an instance of ServiceSpecification class. */ - public ServiceSpecification() { - } - - /** - * Get the logSpecifications property: Specifications of the Log for Azure Monitoring. - * - * @return the logSpecifications value. - */ - public List logSpecifications() { - return this.logSpecifications; - } - - /** - * Set the logSpecifications property: Specifications of the Log for Azure Monitoring. - * - * @param logSpecifications the logSpecifications value to set. - * @return the ServiceSpecification object itself. - */ - public ServiceSpecification withLogSpecifications(List logSpecifications) { - this.logSpecifications = logSpecifications; - return this; - } - - /** - * Get the metricSpecifications property: Specifications of the Metrics for Azure Monitoring. - * - * @return the metricSpecifications value. - */ - public List metricSpecifications() { - return this.metricSpecifications; - } - - /** - * Set the metricSpecifications property: Specifications of the Metrics for Azure Monitoring. - * - * @param metricSpecifications the metricSpecifications value to set. - * @return the ServiceSpecification object itself. - */ - public ServiceSpecification withMetricSpecifications(List metricSpecifications) { - this.metricSpecifications = metricSpecifications; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (logSpecifications() != null) { - logSpecifications().forEach(e -> e.validate()); - } - if (metricSpecifications() != null) { - metricSpecifications().forEach(e -> e.validate()); - } - } -} diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/Sku.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/Sku.java index 0e32c9d1a4dca..477fd37c14849 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/Sku.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/Sku.java @@ -8,22 +8,53 @@ import com.azure.core.util.logging.ClientLogger; import com.fasterxml.jackson.annotation.JsonProperty; -/** The resource model definition representing SKU. */ +/** + * The resource model definition representing SKU. + */ @Fluent public final class Sku { /* - * The name of the SKU. + * The name of the SKU. E.g. P3. It is typically a letter+number code */ @JsonProperty(value = "name", required = true) private String name; - /** Creates an instance of Sku class. */ + /* + * This field is required to be implemented by the Resource Provider if the service has more than one tier, but is + * not required on a PUT. + */ + @JsonProperty(value = "tier") + private SkuTier tier; + + /* + * The SKU size. When the name field is the combination of tier and some other value, this would be the standalone + * code. + */ + @JsonProperty(value = "size") + private String size; + + /* + * If the service has different generations of hardware, for the same SKU, then that can be captured here. + */ + @JsonProperty(value = "family") + private String family; + + /* + * If the SKU supports scale out/in then the capacity integer should be included. If scale out/in is not possible + * for the resource this may be omitted. + */ + @JsonProperty(value = "capacity") + private Integer capacity; + + /** + * Creates an instance of Sku class. + */ public Sku() { } /** - * Get the name property: The name of the SKU. - * + * Get the name property: The name of the SKU. E.g. P3. It is typically a letter+number code. + * * @return the name value. */ public String name() { @@ -31,8 +62,8 @@ public String name() { } /** - * Set the name property: The name of the SKU. - * + * Set the name property: The name of the SKU. E.g. P3. It is typically a letter+number code. + * * @param name the name value to set. * @return the Sku object itself. */ @@ -41,9 +72,97 @@ public Sku withName(String name) { return this; } + /** + * Get the tier property: This field is required to be implemented by the Resource Provider if the service has more + * than one tier, but is not required on a PUT. + * + * @return the tier value. + */ + public SkuTier tier() { + return this.tier; + } + + /** + * Set the tier property: This field is required to be implemented by the Resource Provider if the service has more + * than one tier, but is not required on a PUT. + * + * @param tier the tier value to set. + * @return the Sku object itself. + */ + public Sku withTier(SkuTier tier) { + this.tier = tier; + return this; + } + + /** + * Get the size property: The SKU size. When the name field is the combination of tier and some other value, this + * would be the standalone code. + * + * @return the size value. + */ + public String size() { + return this.size; + } + + /** + * Set the size property: The SKU size. When the name field is the combination of tier and some other value, this + * would be the standalone code. + * + * @param size the size value to set. + * @return the Sku object itself. + */ + public Sku withSize(String size) { + this.size = size; + return this; + } + + /** + * Get the family property: If the service has different generations of hardware, for the same SKU, then that can + * be captured here. + * + * @return the family value. + */ + public String family() { + return this.family; + } + + /** + * Set the family property: If the service has different generations of hardware, for the same SKU, then that can + * be captured here. + * + * @param family the family value to set. + * @return the Sku object itself. + */ + public Sku withFamily(String family) { + this.family = family; + return this; + } + + /** + * Get the capacity property: If the SKU supports scale out/in then the capacity integer should be included. If + * scale out/in is not possible for the resource this may be omitted. + * + * @return the capacity value. + */ + public Integer capacity() { + return this.capacity; + } + + /** + * Set the capacity property: If the SKU supports scale out/in then the capacity integer should be included. If + * scale out/in is not possible for the resource this may be omitted. + * + * @param capacity the capacity value to set. + * @return the Sku object itself. + */ + public Sku withCapacity(Integer capacity) { + this.capacity = capacity; + return this; + } + /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/SkuTier.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/SkuTier.java new file mode 100644 index 0000000000000..ec1974a17cd1e --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/SkuTier.java @@ -0,0 +1,72 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.avs.models; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * This field is required to be implemented by the Resource Provider if the service has more than one tier, but is not + * required on a PUT. + */ +public enum SkuTier { + /** + * Enum value Free. + */ + FREE("Free"), + + /** + * Enum value Basic. + */ + BASIC("Basic"), + + /** + * Enum value Standard. + */ + STANDARD("Standard"), + + /** + * Enum value Premium. + */ + PREMIUM("Premium"); + + /** + * The actual serialized value for a SkuTier instance. + */ + private final String value; + + SkuTier(String value) { + this.value = value; + } + + /** + * Parses a serialized value to a SkuTier instance. + * + * @param value the serialized value to parse. + * @return the parsed SkuTier object, or null if unable to parse. + */ + @JsonCreator + public static SkuTier fromString(String value) { + if (value == null) { + return null; + } + SkuTier[] items = SkuTier.values(); + for (SkuTier item : items) { + if (item.toString().equalsIgnoreCase(value)) { + return item; + } + } + return null; + } + + /** + * {@inheritDoc} + */ + @JsonValue + @Override + public String toString() { + return this.value; + } +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/SslEnum.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/SslEnum.java index da9aef12ecc61..cab4bfef7a8cd 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/SslEnum.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/SslEnum.java @@ -8,17 +8,23 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Protect LDAP communication using SSL certificate (LDAPS). */ +/** + * Whether SSL is enabled or disabled. + */ public final class SslEnum extends ExpandableStringEnum { - /** Static value Enabled for SslEnum. */ + /** + * Static value Enabled for SslEnum. + */ public static final SslEnum ENABLED = fromString("Enabled"); - /** Static value Disabled for SslEnum. */ + /** + * Static value Disabled for SslEnum. + */ public static final SslEnum DISABLED = fromString("Disabled"); /** * Creates a new instance of SslEnum value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -27,7 +33,7 @@ public SslEnum() { /** * Creates or finds a SslEnum from its string representation. - * + * * @param name a name to look for. * @return the corresponding SslEnum. */ @@ -38,7 +44,7 @@ public static SslEnum fromString(String name) { /** * Gets known SslEnum values. - * + * * @return known SslEnum values. */ public static Collection values() { diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/SystemAssignedServiceIdentity.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/SystemAssignedServiceIdentity.java new file mode 100644 index 0000000000000..f9eedfc7ce9c5 --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/SystemAssignedServiceIdentity.java @@ -0,0 +1,96 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.avs.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.UUID; + +/** + * Managed service identity (either system assigned, or none). + */ +@Fluent +public final class SystemAssignedServiceIdentity { + /* + * The service principal ID of the system assigned identity. This property will only be provided for a system + * assigned identity. + */ + @JsonProperty(value = "principalId", access = JsonProperty.Access.WRITE_ONLY) + private UUID principalId; + + /* + * The tenant ID of the system assigned identity. This property will only be provided for a system assigned + * identity. + */ + @JsonProperty(value = "tenantId", access = JsonProperty.Access.WRITE_ONLY) + private UUID tenantId; + + /* + * Type of managed service identity (either system assigned, or none). + */ + @JsonProperty(value = "type", required = true) + private SystemAssignedServiceIdentityType type; + + /** + * Creates an instance of SystemAssignedServiceIdentity class. + */ + public SystemAssignedServiceIdentity() { + } + + /** + * Get the principalId property: The service principal ID of the system assigned identity. This property will only + * be provided for a system assigned identity. + * + * @return the principalId value. + */ + public UUID principalId() { + return this.principalId; + } + + /** + * Get the tenantId property: The tenant ID of the system assigned identity. This property will only be provided + * for a system assigned identity. + * + * @return the tenantId value. + */ + public UUID tenantId() { + return this.tenantId; + } + + /** + * Get the type property: Type of managed service identity (either system assigned, or none). + * + * @return the type value. + */ + public SystemAssignedServiceIdentityType type() { + return this.type; + } + + /** + * Set the type property: Type of managed service identity (either system assigned, or none). + * + * @param type the type value to set. + * @return the SystemAssignedServiceIdentity object itself. + */ + public SystemAssignedServiceIdentity withType(SystemAssignedServiceIdentityType type) { + this.type = type; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (type() == null) { + throw LOGGER.logExceptionAsError( + new IllegalArgumentException("Missing required property type in model SystemAssignedServiceIdentity")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(SystemAssignedServiceIdentity.class); +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/SystemAssignedServiceIdentityType.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/SystemAssignedServiceIdentityType.java new file mode 100644 index 0000000000000..03deb99cda1b4 --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/SystemAssignedServiceIdentityType.java @@ -0,0 +1,53 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.avs.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** + * Type of managed service identity (either system assigned, or none). + */ +public final class SystemAssignedServiceIdentityType extends ExpandableStringEnum { + /** + * Static value None for SystemAssignedServiceIdentityType. + */ + public static final SystemAssignedServiceIdentityType NONE = fromString("None"); + + /** + * Static value SystemAssigned for SystemAssignedServiceIdentityType. + */ + public static final SystemAssignedServiceIdentityType SYSTEM_ASSIGNED = fromString("SystemAssigned"); + + /** + * Creates a new instance of SystemAssignedServiceIdentityType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public SystemAssignedServiceIdentityType() { + } + + /** + * Creates or finds a SystemAssignedServiceIdentityType from its string representation. + * + * @param name a name to look for. + * @return the corresponding SystemAssignedServiceIdentityType. + */ + @JsonCreator + public static SystemAssignedServiceIdentityType fromString(String name) { + return fromString(name, SystemAssignedServiceIdentityType.class); + } + + /** + * Gets known SystemAssignedServiceIdentityType values. + * + * @return known SystemAssignedServiceIdentityType values. + */ + public static Collection values() { + return values(SystemAssignedServiceIdentityType.class); + } +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/Trial.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/Trial.java index 31f46a8f1a1e9..f65dae8db6549 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/Trial.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/Trial.java @@ -6,25 +6,27 @@ import com.azure.resourcemanager.avs.fluent.models.TrialInner; -/** An immutable client-side representation of Trial. */ +/** + * An immutable client-side representation of Trial. + */ public interface Trial { /** * Gets the status property: Trial status. - * + * * @return the status value. */ TrialStatus status(); /** * Gets the availableHosts property: Number of trial hosts available. - * + * * @return the availableHosts value. */ Integer availableHosts(); /** * Gets the inner com.azure.resourcemanager.avs.fluent.models.TrialInner object. - * + * * @return the inner object. */ TrialInner innerModel(); diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/TrialStatus.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/TrialStatus.java index bbc114d25a382..e39bbcb01caf6 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/TrialStatus.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/TrialStatus.java @@ -8,20 +8,28 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Trial status. */ +/** + * trial status. + */ public final class TrialStatus extends ExpandableStringEnum { - /** Static value TrialAvailable for TrialStatus. */ + /** + * Static value TrialAvailable for TrialStatus. + */ public static final TrialStatus TRIAL_AVAILABLE = fromString("TrialAvailable"); - /** Static value TrialUsed for TrialStatus. */ + /** + * Static value TrialUsed for TrialStatus. + */ public static final TrialStatus TRIAL_USED = fromString("TrialUsed"); - /** Static value TrialDisabled for TrialStatus. */ + /** + * Static value TrialDisabled for TrialStatus. + */ public static final TrialStatus TRIAL_DISABLED = fromString("TrialDisabled"); /** * Creates a new instance of TrialStatus value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -30,7 +38,7 @@ public TrialStatus() { /** * Creates or finds a TrialStatus from its string representation. - * + * * @param name a name to look for. * @return the corresponding TrialStatus. */ @@ -41,7 +49,7 @@ public static TrialStatus fromString(String name) { /** * Gets known TrialStatus values. - * + * * @return known TrialStatus values. */ public static Collection values() { diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/VMGroupStatusEnum.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/VMGroupStatusEnum.java index c8e21cb8e8c4e..ba35e5be78052 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/VMGroupStatusEnum.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/VMGroupStatusEnum.java @@ -8,17 +8,23 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** VM Group status. */ +/** + * VM group status. + */ public final class VMGroupStatusEnum extends ExpandableStringEnum { - /** Static value SUCCESS for VMGroupStatusEnum. */ + /** + * Static value SUCCESS for VMGroupStatusEnum. + */ public static final VMGroupStatusEnum SUCCESS = fromString("SUCCESS"); - /** Static value FAILURE for VMGroupStatusEnum. */ + /** + * Static value FAILURE for VMGroupStatusEnum. + */ public static final VMGroupStatusEnum FAILURE = fromString("FAILURE"); /** * Creates a new instance of VMGroupStatusEnum value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -27,7 +33,7 @@ public VMGroupStatusEnum() { /** * Creates or finds a VMGroupStatusEnum from its string representation. - * + * * @param name a name to look for. * @return the corresponding VMGroupStatusEnum. */ @@ -38,7 +44,7 @@ public static VMGroupStatusEnum fromString(String name) { /** * Gets known VMGroupStatusEnum values. - * + * * @return known VMGroupStatusEnum values. */ public static Collection values() { diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/VMTypeEnum.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/VMTypeEnum.java index a0de64a0226be..d5ae245267bae 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/VMTypeEnum.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/VMTypeEnum.java @@ -8,20 +8,28 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Virtual machine type. */ +/** + * VM type. + */ public final class VMTypeEnum extends ExpandableStringEnum { - /** Static value REGULAR for VMTypeEnum. */ + /** + * Static value REGULAR for VMTypeEnum. + */ public static final VMTypeEnum REGULAR = fromString("REGULAR"); - /** Static value EDGE for VMTypeEnum. */ + /** + * Static value EDGE for VMTypeEnum. + */ public static final VMTypeEnum EDGE = fromString("EDGE"); - /** Static value SERVICE for VMTypeEnum. */ + /** + * Static value SERVICE for VMTypeEnum. + */ public static final VMTypeEnum SERVICE = fromString("SERVICE"); /** * Creates a new instance of VMTypeEnum value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -30,7 +38,7 @@ public VMTypeEnum() { /** * Creates or finds a VMTypeEnum from its string representation. - * + * * @param name a name to look for. * @return the corresponding VMTypeEnum. */ @@ -41,7 +49,7 @@ public static VMTypeEnum fromString(String name) { /** * Gets known VMTypeEnum values. - * + * * @return known VMTypeEnum values. */ public static Collection values() { diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/VirtualMachine.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/VirtualMachine.java index bb487d8048ffd..d471b52908706 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/VirtualMachine.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/VirtualMachine.java @@ -4,62 +4,79 @@ package com.azure.resourcemanager.avs.models; +import com.azure.core.management.SystemData; import com.azure.resourcemanager.avs.fluent.models.VirtualMachineInner; -/** An immutable client-side representation of VirtualMachine. */ +/** + * An immutable client-side representation of VirtualMachine. + */ public interface VirtualMachine { /** * Gets the id property: Fully qualified resource Id for the resource. - * + * * @return the id value. */ String id(); /** * Gets the name property: The name of the resource. - * + * * @return the name value. */ String name(); /** * Gets the type property: The type of the resource. - * + * * @return the type value. */ String type(); + /** + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + SystemData systemData(); + + /** + * Gets the provisioningState property: The provisioning state of the resource. + * + * @return the provisioningState value. + */ + VirtualMachineProvisioningState provisioningState(); + /** * Gets the displayName property: Display name of the VM. - * + * * @return the displayName value. */ String displayName(); /** * Gets the moRefId property: Virtual machine managed object reference id. - * + * * @return the moRefId value. */ String moRefId(); /** * Gets the folderPath property: Path to virtual machine's folder starting from datacenter virtual machine folder. - * + * * @return the folderPath value. */ String folderPath(); /** * Gets the restrictMovement property: Whether VM DRS-driven movement is restricted (enabled) or not (disabled). - * + * * @return the restrictMovement value. */ VirtualMachineRestrictMovementState restrictMovement(); /** * Gets the inner com.azure.resourcemanager.avs.fluent.models.VirtualMachineInner object. - * + * * @return the inner object. */ VirtualMachineInner innerModel(); diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/VirtualMachineListResult.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/VirtualMachineListResult.java new file mode 100644 index 0000000000000..f88ed662aa93a --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/VirtualMachineListResult.java @@ -0,0 +1,80 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.avs.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.avs.fluent.models.VirtualMachineInner; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** + * The response of a VirtualMachine list operation. + */ +@Fluent +public final class VirtualMachineListResult { + /* + * The VirtualMachine items on this page + */ + @JsonProperty(value = "value", required = true) + private List value; + + /* + * The link to the next page of items + */ + @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) + private String nextLink; + + /** + * Creates an instance of VirtualMachineListResult class. + */ + public VirtualMachineListResult() { + } + + /** + * Get the value property: The VirtualMachine items on this page. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Set the value property: The VirtualMachine items on this page. + * + * @param value the value value to set. + * @return the VirtualMachineListResult object itself. + */ + public VirtualMachineListResult withValue(List value) { + this.value = value; + return this; + } + + /** + * Get the nextLink property: The link to the next page of items. + * + * @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) { + throw LOGGER.logExceptionAsError( + new IllegalArgumentException("Missing required property value in model VirtualMachineListResult")); + } else { + value().forEach(e -> e.validate()); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(VirtualMachineListResult.class); +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/VirtualMachineProvisioningState.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/VirtualMachineProvisioningState.java new file mode 100644 index 0000000000000..edc31bd611909 --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/VirtualMachineProvisioningState.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.avs.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** + * Virtual Machine provisioning state. + */ +public final class VirtualMachineProvisioningState extends ExpandableStringEnum { + /** + * Static value Succeeded for VirtualMachineProvisioningState. + */ + public static final VirtualMachineProvisioningState SUCCEEDED = fromString("Succeeded"); + + /** + * Static value Failed for VirtualMachineProvisioningState. + */ + public static final VirtualMachineProvisioningState FAILED = fromString("Failed"); + + /** + * Static value Canceled for VirtualMachineProvisioningState. + */ + public static final VirtualMachineProvisioningState CANCELED = fromString("Canceled"); + + /** + * Creates a new instance of VirtualMachineProvisioningState value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public VirtualMachineProvisioningState() { + } + + /** + * Creates or finds a VirtualMachineProvisioningState from its string representation. + * + * @param name a name to look for. + * @return the corresponding VirtualMachineProvisioningState. + */ + @JsonCreator + public static VirtualMachineProvisioningState fromString(String name) { + return fromString(name, VirtualMachineProvisioningState.class); + } + + /** + * Gets known VirtualMachineProvisioningState values. + * + * @return known VirtualMachineProvisioningState values. + */ + public static Collection values() { + return values(VirtualMachineProvisioningState.class); + } +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/VirtualMachineRestrictMovement.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/VirtualMachineRestrictMovement.java index a5ce9a3337320..14b5eafa12533 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/VirtualMachineRestrictMovement.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/VirtualMachineRestrictMovement.java @@ -7,7 +7,9 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; -/** Set VM DRS-driven movement to restricted (enabled) or not (disabled). */ +/** + * Set VM DRS-driven movement to restricted (enabled) or not (disabled). + */ @Fluent public final class VirtualMachineRestrictMovement { /* @@ -16,13 +18,15 @@ public final class VirtualMachineRestrictMovement { @JsonProperty(value = "restrictMovement") private VirtualMachineRestrictMovementState restrictMovement; - /** Creates an instance of VirtualMachineRestrictMovement class. */ + /** + * Creates an instance of VirtualMachineRestrictMovement class. + */ public VirtualMachineRestrictMovement() { } /** * Get the restrictMovement property: Whether VM DRS-driven movement is restricted (enabled) or not (disabled). - * + * * @return the restrictMovement value. */ public VirtualMachineRestrictMovementState restrictMovement() { @@ -31,7 +35,7 @@ public VirtualMachineRestrictMovementState restrictMovement() { /** * Set the restrictMovement property: Whether VM DRS-driven movement is restricted (enabled) or not (disabled). - * + * * @param restrictMovement the restrictMovement value to set. * @return the VirtualMachineRestrictMovement object itself. */ @@ -42,7 +46,7 @@ public VirtualMachineRestrictMovement withRestrictMovement(VirtualMachineRestric /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/VirtualMachineRestrictMovementState.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/VirtualMachineRestrictMovementState.java index a67a8a669a8d9..7d43b8fbeec6f 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/VirtualMachineRestrictMovementState.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/VirtualMachineRestrictMovementState.java @@ -8,18 +8,24 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Whether VM DRS-driven movement is restricted (enabled) or not (disabled). */ +/** + * Virtual Machine Restrict Movement state. + */ public final class VirtualMachineRestrictMovementState extends ExpandableStringEnum { - /** Static value Enabled for VirtualMachineRestrictMovementState. */ + /** + * Static value Enabled for VirtualMachineRestrictMovementState. + */ public static final VirtualMachineRestrictMovementState ENABLED = fromString("Enabled"); - /** Static value Disabled for VirtualMachineRestrictMovementState. */ + /** + * Static value Disabled for VirtualMachineRestrictMovementState. + */ public static final VirtualMachineRestrictMovementState DISABLED = fromString("Disabled"); /** * Creates a new instance of VirtualMachineRestrictMovementState value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -28,7 +34,7 @@ public VirtualMachineRestrictMovementState() { /** * Creates or finds a VirtualMachineRestrictMovementState from its string representation. - * + * * @param name a name to look for. * @return the corresponding VirtualMachineRestrictMovementState. */ @@ -39,7 +45,7 @@ public static VirtualMachineRestrictMovementState fromString(String name) { /** * Gets known VirtualMachineRestrictMovementState values. - * + * * @return known VirtualMachineRestrictMovementState values. */ public static Collection values() { diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/VirtualMachines.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/VirtualMachines.java index 61d18c347c0e8..3f358eca9c42a 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/VirtualMachines.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/VirtualMachines.java @@ -8,107 +8,96 @@ import com.azure.core.http.rest.Response; import com.azure.core.util.Context; -/** Resource collection API of VirtualMachines. */ +/** + * Resource collection API of VirtualMachines. + */ public interface VirtualMachines { /** - * List of virtual machines in a private cloud cluster. - * + * List VirtualMachine resources by Cluster. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param clusterName Name of the cluster in the private cloud. + * @param clusterName Name of the cluster. * @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 a list of Virtual Machines as paginated response with {@link PagedIterable}. + * @return the response of a VirtualMachine list operation as paginated response with {@link PagedIterable}. */ PagedIterable list(String resourceGroupName, String privateCloudName, String clusterName); /** - * List of virtual machines in a private cloud cluster. - * + * List VirtualMachine resources by Cluster. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param clusterName Name of the cluster in the private cloud. + * @param clusterName Name of the cluster. * @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 a list of Virtual Machines as paginated response with {@link PagedIterable}. + * @return the response of a VirtualMachine list operation as paginated response with {@link PagedIterable}. */ - PagedIterable list( - String resourceGroupName, String privateCloudName, String clusterName, Context context); + PagedIterable list(String resourceGroupName, String privateCloudName, String clusterName, + Context context); /** - * Get a virtual machine by id in a private cloud cluster. - * + * Get a VirtualMachine. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param clusterName Name of the cluster in the private cloud. - * @param virtualMachineId Virtual Machine identifier. + * @param clusterName Name of the cluster. + * @param virtualMachineId ID of the virtual machine. * @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 a virtual machine by id in a private cloud cluster along with {@link Response}. + * @return a VirtualMachine along with {@link Response}. */ - Response getWithResponse( - String resourceGroupName, - String privateCloudName, - String clusterName, - String virtualMachineId, - Context context); + Response getWithResponse(String resourceGroupName, String privateCloudName, String clusterName, + String virtualMachineId, Context context); /** - * Get a virtual machine by id in a private cloud cluster. - * + * Get a VirtualMachine. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param clusterName Name of the cluster in the private cloud. - * @param virtualMachineId Virtual Machine identifier. + * @param clusterName Name of the cluster. + * @param virtualMachineId ID of the virtual machine. * @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 a virtual machine by id in a private cloud cluster. + * @return a VirtualMachine. */ VirtualMachine get(String resourceGroupName, String privateCloudName, String clusterName, String virtualMachineId); /** * Enable or disable DRS-driven VM movement restriction. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param clusterName Name of the cluster in the private cloud. - * @param virtualMachineId Virtual Machine identifier. - * @param restrictMovement Whether VM DRS-driven movement is restricted (Enabled) or not (Disabled). + * @param clusterName Name of the cluster. + * @param virtualMachineId ID of the virtual machine. + * @param restrictMovement The body type of the operation request. * @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. */ - void restrictMovement( - String resourceGroupName, - String privateCloudName, - String clusterName, - String virtualMachineId, - VirtualMachineRestrictMovement restrictMovement); + void restrictMovement(String resourceGroupName, String privateCloudName, String clusterName, + String virtualMachineId, VirtualMachineRestrictMovement restrictMovement); /** * Enable or disable DRS-driven VM movement restriction. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param clusterName Name of the cluster in the private cloud. - * @param virtualMachineId Virtual Machine identifier. - * @param restrictMovement Whether VM DRS-driven movement is restricted (Enabled) or not (Disabled). + * @param clusterName Name of the cluster. + * @param virtualMachineId ID of the virtual machine. + * @param restrictMovement The body type of the operation request. * @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. */ - void restrictMovement( - String resourceGroupName, - String privateCloudName, - String clusterName, - String virtualMachineId, - VirtualMachineRestrictMovement restrictMovement, - Context context); + void restrictMovement(String resourceGroupName, String privateCloudName, String clusterName, + String virtualMachineId, VirtualMachineRestrictMovement restrictMovement, Context context); } diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/VirtualMachinesList.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/VirtualMachinesList.java deleted file mode 100644 index f34c01e0b7e1d..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/VirtualMachinesList.java +++ /dev/null @@ -1,59 +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.avs.models; - -import com.azure.core.annotation.Immutable; -import com.azure.resourcemanager.avs.fluent.models.VirtualMachineInner; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** A list of Virtual Machines. */ -@Immutable -public final class VirtualMachinesList { - /* - * The items to be displayed on the page - */ - @JsonProperty(value = "value", access = JsonProperty.Access.WRITE_ONLY) - private List value; - - /* - * URL to get the next page if any - */ - @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) - private String nextLink; - - /** Creates an instance of VirtualMachinesList class. */ - public VirtualMachinesList() { - } - - /** - * Get the value property: The items to be displayed on the page. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Get the nextLink property: URL to get the next page if 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/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/VisibilityParameterEnum.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/VisibilityParameterEnum.java index 246d630e0b3b3..8db6123aecdb4 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/VisibilityParameterEnum.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/VisibilityParameterEnum.java @@ -8,17 +8,23 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Should this parameter be visible to arm and passed in the parameters argument when executing. */ +/** + * Visibility Parameter. + */ public final class VisibilityParameterEnum extends ExpandableStringEnum { - /** Static value Visible for VisibilityParameterEnum. */ + /** + * Static value Visible for VisibilityParameterEnum. + */ public static final VisibilityParameterEnum VISIBLE = fromString("Visible"); - /** Static value Hidden for VisibilityParameterEnum. */ + /** + * Static value Hidden for VisibilityParameterEnum. + */ public static final VisibilityParameterEnum HIDDEN = fromString("Hidden"); /** * Creates a new instance of VisibilityParameterEnum value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -27,7 +33,7 @@ public VisibilityParameterEnum() { /** * Creates or finds a VisibilityParameterEnum from its string representation. - * + * * @param name a name to look for. * @return the corresponding VisibilityParameterEnum. */ @@ -38,7 +44,7 @@ public static VisibilityParameterEnum fromString(String name) { /** * Gets known VisibilityParameterEnum values. - * + * * @return known VisibilityParameterEnum values. */ public static Collection values() { diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/VmHostPlacementPolicyProperties.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/VmHostPlacementPolicyProperties.java index 4f878e55ae1d8..d7dbfc04d3436 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/VmHostPlacementPolicyProperties.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/VmHostPlacementPolicyProperties.java @@ -11,7 +11,9 @@ import com.fasterxml.jackson.annotation.JsonTypeName; import java.util.List; -/** VM-Host placement policy properties. */ +/** + * VM-Host placement policy properties. + */ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type") @JsonTypeName("VmHost") @Fluent @@ -46,13 +48,15 @@ public final class VmHostPlacementPolicyProperties extends PlacementPolicyProper @JsonProperty(value = "azureHybridBenefitType") private AzureHybridBenefitType azureHybridBenefitType; - /** Creates an instance of VmHostPlacementPolicyProperties class. */ + /** + * Creates an instance of VmHostPlacementPolicyProperties class. + */ public VmHostPlacementPolicyProperties() { } /** * Get the vmMembers property: Virtual machine members list. - * + * * @return the vmMembers value. */ public List vmMembers() { @@ -61,7 +65,7 @@ public List vmMembers() { /** * Set the vmMembers property: Virtual machine members list. - * + * * @param vmMembers the vmMembers value to set. * @return the VmHostPlacementPolicyProperties object itself. */ @@ -72,7 +76,7 @@ public VmHostPlacementPolicyProperties withVmMembers(List vmMembers) { /** * Get the hostMembers property: Host members list. - * + * * @return the hostMembers value. */ public List hostMembers() { @@ -81,7 +85,7 @@ public List hostMembers() { /** * Set the hostMembers property: Host members list. - * + * * @param hostMembers the hostMembers value to set. * @return the VmHostPlacementPolicyProperties object itself. */ @@ -92,7 +96,7 @@ public VmHostPlacementPolicyProperties withHostMembers(List hostMembers) /** * Get the affinityType property: placement policy affinity type. - * + * * @return the affinityType value. */ public AffinityType affinityType() { @@ -101,7 +105,7 @@ public AffinityType affinityType() { /** * Set the affinityType property: placement policy affinity type. - * + * * @param affinityType the affinityType value to set. * @return the VmHostPlacementPolicyProperties object itself. */ @@ -112,7 +116,7 @@ public VmHostPlacementPolicyProperties withAffinityType(AffinityType affinityTyp /** * Get the affinityStrength property: vm-host placement policy affinity strength (should/must). - * + * * @return the affinityStrength value. */ public AffinityStrength affinityStrength() { @@ -121,7 +125,7 @@ public AffinityStrength affinityStrength() { /** * Set the affinityStrength property: vm-host placement policy affinity strength (should/must). - * + * * @param affinityStrength the affinityStrength value to set. * @return the VmHostPlacementPolicyProperties object itself. */ @@ -132,7 +136,7 @@ public VmHostPlacementPolicyProperties withAffinityStrength(AffinityStrength aff /** * Get the azureHybridBenefitType property: placement policy azure hybrid benefit opt-in type. - * + * * @return the azureHybridBenefitType value. */ public AzureHybridBenefitType azureHybridBenefitType() { @@ -141,7 +145,7 @@ public AzureHybridBenefitType azureHybridBenefitType() { /** * Set the azureHybridBenefitType property: placement policy azure hybrid benefit opt-in type. - * + * * @param azureHybridBenefitType the azureHybridBenefitType value to set. * @return the VmHostPlacementPolicyProperties object itself. */ @@ -150,14 +154,18 @@ public VmHostPlacementPolicyProperties withAzureHybridBenefitType(AzureHybridBen return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public VmHostPlacementPolicyProperties withState(PlacementPolicyState state) { super.withState(state); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public VmHostPlacementPolicyProperties withDisplayName(String displayName) { super.withDisplayName(displayName); @@ -166,29 +174,23 @@ public VmHostPlacementPolicyProperties withDisplayName(String displayName) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ @Override public void validate() { super.validate(); if (vmMembers() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property vmMembers in model VmHostPlacementPolicyProperties")); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + "Missing required property vmMembers in model VmHostPlacementPolicyProperties")); } if (hostMembers() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property hostMembers in model VmHostPlacementPolicyProperties")); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + "Missing required property hostMembers in model VmHostPlacementPolicyProperties")); } if (affinityType() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property affinityType in model VmHostPlacementPolicyProperties")); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + "Missing required property affinityType in model VmHostPlacementPolicyProperties")); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/VmPlacementPolicyProperties.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/VmPlacementPolicyProperties.java index 9490841d7fdd3..07fbd5e6b573b 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/VmPlacementPolicyProperties.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/VmPlacementPolicyProperties.java @@ -11,7 +11,9 @@ import com.fasterxml.jackson.annotation.JsonTypeName; import java.util.List; -/** VM-VM placement policy properties. */ +/** + * VM-VM placement policy properties. + */ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type") @JsonTypeName("VmVm") @Fluent @@ -28,13 +30,15 @@ public final class VmPlacementPolicyProperties extends PlacementPolicyProperties @JsonProperty(value = "affinityType", required = true) private AffinityType affinityType; - /** Creates an instance of VmPlacementPolicyProperties class. */ + /** + * Creates an instance of VmPlacementPolicyProperties class. + */ public VmPlacementPolicyProperties() { } /** * Get the vmMembers property: Virtual machine members list. - * + * * @return the vmMembers value. */ public List vmMembers() { @@ -43,7 +47,7 @@ public List vmMembers() { /** * Set the vmMembers property: Virtual machine members list. - * + * * @param vmMembers the vmMembers value to set. * @return the VmPlacementPolicyProperties object itself. */ @@ -54,7 +58,7 @@ public VmPlacementPolicyProperties withVmMembers(List vmMembers) { /** * Get the affinityType property: placement policy affinity type. - * + * * @return the affinityType value. */ public AffinityType affinityType() { @@ -63,7 +67,7 @@ public AffinityType affinityType() { /** * Set the affinityType property: placement policy affinity type. - * + * * @param affinityType the affinityType value to set. * @return the VmPlacementPolicyProperties object itself. */ @@ -72,14 +76,18 @@ public VmPlacementPolicyProperties withAffinityType(AffinityType affinityType) { return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public VmPlacementPolicyProperties withState(PlacementPolicyState state) { super.withState(state); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public VmPlacementPolicyProperties withDisplayName(String displayName) { super.withDisplayName(displayName); @@ -88,23 +96,19 @@ public VmPlacementPolicyProperties withDisplayName(String displayName) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ @Override public void validate() { super.validate(); if (vmMembers() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property vmMembers in model VmPlacementPolicyProperties")); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + "Missing required property vmMembers in model VmPlacementPolicyProperties")); } if (affinityType() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property affinityType in model VmPlacementPolicyProperties")); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + "Missing required property affinityType in model VmPlacementPolicyProperties")); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetwork.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetwork.java index 6a1f5adc5c2e6..be59cf3574dc4 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetwork.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetwork.java @@ -4,34 +4,51 @@ package com.azure.resourcemanager.avs.models; +import com.azure.core.management.SystemData; import com.azure.resourcemanager.avs.fluent.models.WorkloadNetworkInner; -/** An immutable client-side representation of WorkloadNetwork. */ +/** + * An immutable client-side representation of WorkloadNetwork. + */ public interface WorkloadNetwork { /** * Gets the id property: Fully qualified resource Id for the resource. - * + * * @return the id value. */ String id(); /** * Gets the name property: The name of the resource. - * + * * @return the name value. */ String name(); /** * Gets the type property: The type of the resource. - * + * * @return the type value. */ String type(); + /** + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + SystemData systemData(); + + /** + * Gets the provisioningState property: The provisioning state of the resource. + * + * @return the provisioningState value. + */ + WorkloadNetworkProvisioningState provisioningState(); + /** * Gets the inner com.azure.resourcemanager.avs.fluent.models.WorkloadNetworkInner object. - * + * * @return the inner object. */ WorkloadNetworkInner innerModel(); diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkDhcp.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkDhcp.java index 36c0a603a04c3..d8d7ecce8d795 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkDhcp.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkDhcp.java @@ -4,69 +4,87 @@ package com.azure.resourcemanager.avs.models; +import com.azure.core.management.SystemData; import com.azure.core.util.Context; import com.azure.resourcemanager.avs.fluent.models.WorkloadNetworkDhcpInner; -/** An immutable client-side representation of WorkloadNetworkDhcp. */ +/** + * An immutable client-side representation of WorkloadNetworkDhcp. + */ public interface WorkloadNetworkDhcp { /** * Gets the id property: Fully qualified resource Id for the resource. - * + * * @return the id value. */ String id(); /** * Gets the name property: The name of the resource. - * + * * @return the name value. */ String name(); /** * Gets the type property: The type of the resource. - * + * * @return the type value. */ String type(); /** - * Gets the properties property: DHCP properties. - * + * Gets the properties property: The resource-specific properties for this resource. + * * @return the properties value. */ WorkloadNetworkDhcpEntity properties(); + /** + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + SystemData systemData(); + /** * Gets the name of the resource group. - * + * * @return the name of the resource group. */ String resourceGroupName(); /** * Gets the inner com.azure.resourcemanager.avs.fluent.models.WorkloadNetworkDhcpInner object. - * + * * @return the inner object. */ WorkloadNetworkDhcpInner innerModel(); - /** The entirety of the WorkloadNetworkDhcp definition. */ + /** + * The entirety of the WorkloadNetworkDhcp definition. + */ interface Definition extends DefinitionStages.Blank, DefinitionStages.WithParentResource, DefinitionStages.WithCreate { } - /** The WorkloadNetworkDhcp definition stages. */ + /** + * The WorkloadNetworkDhcp definition stages. + */ interface DefinitionStages { - /** The first stage of the WorkloadNetworkDhcp definition. */ + /** + * The first stage of the WorkloadNetworkDhcp definition. + */ interface Blank extends WithParentResource { } - /** The stage of the WorkloadNetworkDhcp definition allowing to specify parent resource. */ + /** + * The stage of the WorkloadNetworkDhcp definition allowing to specify parent resource. + */ interface WithParentResource { /** * Specifies resourceGroupName, privateCloudName. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. * @return the next definition stage. @@ -81,26 +99,28 @@ interface WithParentResource { interface WithCreate extends DefinitionStages.WithProperties { /** * Executes the create request. - * + * * @return the created resource. */ WorkloadNetworkDhcp create(); /** * Executes the create request. - * + * * @param context The context to associate with this operation. * @return the created resource. */ WorkloadNetworkDhcp create(Context context); } - /** The stage of the WorkloadNetworkDhcp definition allowing to specify properties. */ + /** + * The stage of the WorkloadNetworkDhcp definition allowing to specify properties. + */ interface WithProperties { /** - * Specifies the properties property: DHCP properties.. - * - * @param properties DHCP properties. + * Specifies the properties property: The resource-specific properties for this resource.. + * + * @param properties The resource-specific properties for this resource. * @return the next definition stage. */ WithCreate withProperties(WorkloadNetworkDhcpEntity properties); @@ -109,53 +129,59 @@ interface WithProperties { /** * Begins update for the WorkloadNetworkDhcp resource. - * + * * @return the stage of resource update. */ WorkloadNetworkDhcp.Update update(); - /** The template for WorkloadNetworkDhcp update. */ + /** + * The template for WorkloadNetworkDhcp update. + */ interface Update extends UpdateStages.WithProperties { /** * Executes the update request. - * + * * @return the updated resource. */ WorkloadNetworkDhcp apply(); /** * Executes the update request. - * + * * @param context The context to associate with this operation. * @return the updated resource. */ WorkloadNetworkDhcp apply(Context context); } - /** The WorkloadNetworkDhcp update stages. */ + /** + * The WorkloadNetworkDhcp update stages. + */ interface UpdateStages { - /** The stage of the WorkloadNetworkDhcp update allowing to specify properties. */ + /** + * The stage of the WorkloadNetworkDhcp update allowing to specify properties. + */ interface WithProperties { /** - * Specifies the properties property: DHCP properties.. - * - * @param properties DHCP properties. + * Specifies the properties property: The updatable properties of a DHCP update. + * + * @param properties The updatable properties of a DHCP update. * @return the next definition stage. */ - Update withProperties(WorkloadNetworkDhcpEntity properties); + Update withProperties(WorkloadNetworkDhcpEntityUpdate properties); } } /** * Refreshes the resource to sync with Azure. - * + * * @return the refreshed resource. */ WorkloadNetworkDhcp refresh(); /** * Refreshes the resource to sync with Azure. - * + * * @param context The context to associate with this operation. * @return the refreshed resource. */ diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkDhcpEntity.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkDhcpEntity.java index 3a4d30859f4e7..2dbb84993c58e 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkDhcpEntity.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkDhcpEntity.java @@ -11,7 +11,10 @@ import com.fasterxml.jackson.annotation.JsonTypeName; import java.util.List; -/** Base class for WorkloadNetworkDhcpServer and WorkloadNetworkDhcpRelay to inherit from. */ +/** + * Base class for WorkloadNetworkDhcpServer and WorkloadNetworkDhcpRelay to + * inherit from. + */ @JsonTypeInfo( use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, @@ -19,9 +22,8 @@ defaultImpl = WorkloadNetworkDhcpEntity.class) @JsonTypeName("WorkloadNetworkDhcpEntity") @JsonSubTypes({ - @JsonSubTypes.Type(name = "SERVER", value = WorkloadNetworkDhcpServer.class), - @JsonSubTypes.Type(name = "RELAY", value = WorkloadNetworkDhcpRelay.class) -}) + @JsonSubTypes.Type(name = "RELAY", value = WorkloadNetworkDhcpRelay.class), + @JsonSubTypes.Type(name = "SERVER", value = WorkloadNetworkDhcpServer.class) }) @Fluent public class WorkloadNetworkDhcpEntity { /* @@ -48,13 +50,15 @@ public class WorkloadNetworkDhcpEntity { @JsonProperty(value = "revision") private Long revision; - /** Creates an instance of WorkloadNetworkDhcpEntity class. */ + /** + * Creates an instance of WorkloadNetworkDhcpEntity class. + */ public WorkloadNetworkDhcpEntity() { } /** * Get the displayName property: Display name of the DHCP entity. - * + * * @return the displayName value. */ public String displayName() { @@ -63,7 +67,7 @@ public String displayName() { /** * Set the displayName property: Display name of the DHCP entity. - * + * * @param displayName the displayName value to set. * @return the WorkloadNetworkDhcpEntity object itself. */ @@ -74,7 +78,7 @@ public WorkloadNetworkDhcpEntity withDisplayName(String displayName) { /** * Get the segments property: NSX Segments consuming DHCP. - * + * * @return the segments value. */ public List segments() { @@ -83,7 +87,7 @@ public List segments() { /** * Get the provisioningState property: The provisioning state. - * + * * @return the provisioningState value. */ public WorkloadNetworkDhcpProvisioningState provisioningState() { @@ -92,7 +96,7 @@ public WorkloadNetworkDhcpProvisioningState provisioningState() { /** * Get the revision property: NSX revision number. - * + * * @return the revision value. */ public Long revision() { @@ -101,7 +105,7 @@ public Long revision() { /** * Set the revision property: NSX revision number. - * + * * @param revision the revision value to set. * @return the WorkloadNetworkDhcpEntity object itself. */ @@ -112,7 +116,7 @@ public WorkloadNetworkDhcpEntity withRevision(Long revision) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkDhcpEntityUpdate.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkDhcpEntityUpdate.java new file mode 100644 index 0000000000000..7620f76d9f373 --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkDhcpEntityUpdate.java @@ -0,0 +1,93 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.avs.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** + * Base class for WorkloadNetworkDhcpServer and WorkloadNetworkDhcpRelay to + * inherit from. + */ +@JsonTypeInfo( + use = JsonTypeInfo.Id.NAME, + include = JsonTypeInfo.As.PROPERTY, + property = "dhcpType", + defaultImpl = WorkloadNetworkDhcpEntityUpdate.class) +@JsonTypeName("WorkloadNetworkDhcpEntityUpdate") +@JsonSubTypes({ + @JsonSubTypes.Type(name = "RELAY", value = WorkloadNetworkDhcpRelayUpdate.class), + @JsonSubTypes.Type(name = "SERVER", value = WorkloadNetworkDhcpServerUpdate.class) }) +@Fluent +public class WorkloadNetworkDhcpEntityUpdate { + /* + * Display name of the DHCP entity. + */ + @JsonProperty(value = "displayName") + private String displayName; + + /* + * NSX revision number. + */ + @JsonProperty(value = "revision") + private Long revision; + + /** + * Creates an instance of WorkloadNetworkDhcpEntityUpdate class. + */ + public WorkloadNetworkDhcpEntityUpdate() { + } + + /** + * Get the displayName property: Display name of the DHCP entity. + * + * @return the displayName value. + */ + public String displayName() { + return this.displayName; + } + + /** + * Set the displayName property: Display name of the DHCP entity. + * + * @param displayName the displayName value to set. + * @return the WorkloadNetworkDhcpEntityUpdate object itself. + */ + public WorkloadNetworkDhcpEntityUpdate withDisplayName(String displayName) { + this.displayName = displayName; + return this; + } + + /** + * Get the revision property: NSX revision number. + * + * @return the revision value. + */ + public Long revision() { + return this.revision; + } + + /** + * Set the revision property: NSX revision number. + * + * @param revision the revision value to set. + * @return the WorkloadNetworkDhcpEntityUpdate object itself. + */ + public WorkloadNetworkDhcpEntityUpdate withRevision(Long revision) { + this.revision = revision; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkDhcpList.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkDhcpList.java deleted file mode 100644 index 5a8c6027a8ad6..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkDhcpList.java +++ /dev/null @@ -1,59 +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.avs.models; - -import com.azure.core.annotation.Immutable; -import com.azure.resourcemanager.avs.fluent.models.WorkloadNetworkDhcpInner; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** A list of NSX dhcp entities. */ -@Immutable -public final class WorkloadNetworkDhcpList { - /* - * The items on the page - */ - @JsonProperty(value = "value", access = JsonProperty.Access.WRITE_ONLY) - private List value; - - /* - * URL to get the next page if any - */ - @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) - private String nextLink; - - /** Creates an instance of WorkloadNetworkDhcpList class. */ - public WorkloadNetworkDhcpList() { - } - - /** - * Get the value property: The items on the page. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Get the nextLink property: URL to get the next page if 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/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkDhcpListResult.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkDhcpListResult.java new file mode 100644 index 0000000000000..390ae2255d1ef --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkDhcpListResult.java @@ -0,0 +1,80 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.avs.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.avs.fluent.models.WorkloadNetworkDhcpInner; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** + * The response of a WorkloadNetworkDhcp list operation. + */ +@Fluent +public final class WorkloadNetworkDhcpListResult { + /* + * The WorkloadNetworkDhcp items on this page + */ + @JsonProperty(value = "value", required = true) + private List value; + + /* + * The link to the next page of items + */ + @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) + private String nextLink; + + /** + * Creates an instance of WorkloadNetworkDhcpListResult class. + */ + public WorkloadNetworkDhcpListResult() { + } + + /** + * Get the value property: The WorkloadNetworkDhcp items on this page. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Set the value property: The WorkloadNetworkDhcp items on this page. + * + * @param value the value value to set. + * @return the WorkloadNetworkDhcpListResult object itself. + */ + public WorkloadNetworkDhcpListResult withValue(List value) { + this.value = value; + return this; + } + + /** + * Get the nextLink property: The link to the next page of items. + * + * @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) { + throw LOGGER.logExceptionAsError( + new IllegalArgumentException("Missing required property value in model WorkloadNetworkDhcpListResult")); + } else { + value().forEach(e -> e.validate()); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(WorkloadNetworkDhcpListResult.class); +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkDhcpProvisioningState.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkDhcpProvisioningState.java index 012ad2dad9203..8817d546cd69f 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkDhcpProvisioningState.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkDhcpProvisioningState.java @@ -8,30 +8,44 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** The provisioning state. */ +/** + * Workload Network DHCP provisioning state. + */ public final class WorkloadNetworkDhcpProvisioningState extends ExpandableStringEnum { - /** Static value Succeeded for WorkloadNetworkDhcpProvisioningState. */ + /** + * Static value Succeeded for WorkloadNetworkDhcpProvisioningState. + */ public static final WorkloadNetworkDhcpProvisioningState SUCCEEDED = fromString("Succeeded"); - /** Static value Failed for WorkloadNetworkDhcpProvisioningState. */ + /** + * Static value Failed for WorkloadNetworkDhcpProvisioningState. + */ public static final WorkloadNetworkDhcpProvisioningState FAILED = fromString("Failed"); - /** Static value Building for WorkloadNetworkDhcpProvisioningState. */ + /** + * Static value Canceled for WorkloadNetworkDhcpProvisioningState. + */ + public static final WorkloadNetworkDhcpProvisioningState CANCELED = fromString("Canceled"); + + /** + * Static value Building for WorkloadNetworkDhcpProvisioningState. + */ public static final WorkloadNetworkDhcpProvisioningState BUILDING = fromString("Building"); - /** Static value Deleting for WorkloadNetworkDhcpProvisioningState. */ + /** + * Static value Deleting for WorkloadNetworkDhcpProvisioningState. + */ public static final WorkloadNetworkDhcpProvisioningState DELETING = fromString("Deleting"); - /** Static value Updating for WorkloadNetworkDhcpProvisioningState. */ + /** + * Static value Updating for WorkloadNetworkDhcpProvisioningState. + */ public static final WorkloadNetworkDhcpProvisioningState UPDATING = fromString("Updating"); - /** Static value Canceled for WorkloadNetworkDhcpProvisioningState. */ - public static final WorkloadNetworkDhcpProvisioningState CANCELED = fromString("Canceled"); - /** * Creates a new instance of WorkloadNetworkDhcpProvisioningState value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -40,7 +54,7 @@ public WorkloadNetworkDhcpProvisioningState() { /** * Creates or finds a WorkloadNetworkDhcpProvisioningState from its string representation. - * + * * @param name a name to look for. * @return the corresponding WorkloadNetworkDhcpProvisioningState. */ @@ -51,7 +65,7 @@ public static WorkloadNetworkDhcpProvisioningState fromString(String name) { /** * Gets known WorkloadNetworkDhcpProvisioningState values. - * + * * @return known WorkloadNetworkDhcpProvisioningState values. */ public static Collection values() { diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkDhcpRelay.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkDhcpRelay.java index 237b520ca080e..6969ae07b16f0 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkDhcpRelay.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkDhcpRelay.java @@ -10,7 +10,9 @@ import com.fasterxml.jackson.annotation.JsonTypeName; import java.util.List; -/** NSX DHCP Relay. */ +/** + * NSX DHCP Relay. + */ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "dhcpType") @JsonTypeName("RELAY") @Fluent @@ -21,13 +23,15 @@ public final class WorkloadNetworkDhcpRelay extends WorkloadNetworkDhcpEntity { @JsonProperty(value = "serverAddresses") private List serverAddresses; - /** Creates an instance of WorkloadNetworkDhcpRelay class. */ + /** + * Creates an instance of WorkloadNetworkDhcpRelay class. + */ public WorkloadNetworkDhcpRelay() { } /** * Get the serverAddresses property: DHCP Relay Addresses. Max 3. - * + * * @return the serverAddresses value. */ public List serverAddresses() { @@ -36,7 +40,7 @@ public List serverAddresses() { /** * Set the serverAddresses property: DHCP Relay Addresses. Max 3. - * + * * @param serverAddresses the serverAddresses value to set. * @return the WorkloadNetworkDhcpRelay object itself. */ @@ -45,14 +49,18 @@ public WorkloadNetworkDhcpRelay withServerAddresses(List serverAddresses return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public WorkloadNetworkDhcpRelay withDisplayName(String displayName) { super.withDisplayName(displayName); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public WorkloadNetworkDhcpRelay withRevision(Long revision) { super.withRevision(revision); @@ -61,7 +69,7 @@ public WorkloadNetworkDhcpRelay withRevision(Long revision) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ @Override diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkDhcpRelayUpdate.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkDhcpRelayUpdate.java new file mode 100644 index 0000000000000..b12a75e01fc41 --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkDhcpRelayUpdate.java @@ -0,0 +1,79 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.avs.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import java.util.List; + +/** + * NSX DHCP Relay. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "dhcpType") +@JsonTypeName("RELAY") +@Fluent +public final class WorkloadNetworkDhcpRelayUpdate extends WorkloadNetworkDhcpEntityUpdate { + /* + * DHCP Relay Addresses. Max 3. + */ + @JsonProperty(value = "serverAddresses") + private List serverAddresses; + + /** + * Creates an instance of WorkloadNetworkDhcpRelayUpdate class. + */ + public WorkloadNetworkDhcpRelayUpdate() { + } + + /** + * Get the serverAddresses property: DHCP Relay Addresses. Max 3. + * + * @return the serverAddresses value. + */ + public List serverAddresses() { + return this.serverAddresses; + } + + /** + * Set the serverAddresses property: DHCP Relay Addresses. Max 3. + * + * @param serverAddresses the serverAddresses value to set. + * @return the WorkloadNetworkDhcpRelayUpdate object itself. + */ + public WorkloadNetworkDhcpRelayUpdate withServerAddresses(List serverAddresses) { + this.serverAddresses = serverAddresses; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public WorkloadNetworkDhcpRelayUpdate withDisplayName(String displayName) { + super.withDisplayName(displayName); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public WorkloadNetworkDhcpRelayUpdate withRevision(Long revision) { + super.withRevision(revision); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + } +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkDhcpServer.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkDhcpServer.java index b4a427a995f4c..fb91611552ca2 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkDhcpServer.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkDhcpServer.java @@ -9,7 +9,9 @@ import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; -/** NSX DHCP Server. */ +/** + * NSX DHCP Server. + */ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "dhcpType") @JsonTypeName("SERVER") @Fluent @@ -24,15 +26,17 @@ public final class WorkloadNetworkDhcpServer extends WorkloadNetworkDhcpEntity { * DHCP Server Lease Time. */ @JsonProperty(value = "leaseTime") - private Long leaseTime; + private Integer leaseTime; - /** Creates an instance of WorkloadNetworkDhcpServer class. */ + /** + * Creates an instance of WorkloadNetworkDhcpServer class. + */ public WorkloadNetworkDhcpServer() { } /** * Get the serverAddress property: DHCP Server Address. - * + * * @return the serverAddress value. */ public String serverAddress() { @@ -41,7 +45,7 @@ public String serverAddress() { /** * Set the serverAddress property: DHCP Server Address. - * + * * @param serverAddress the serverAddress value to set. * @return the WorkloadNetworkDhcpServer object itself. */ @@ -52,32 +56,36 @@ public WorkloadNetworkDhcpServer withServerAddress(String serverAddress) { /** * Get the leaseTime property: DHCP Server Lease Time. - * + * * @return the leaseTime value. */ - public Long leaseTime() { + public Integer leaseTime() { return this.leaseTime; } /** * Set the leaseTime property: DHCP Server Lease Time. - * + * * @param leaseTime the leaseTime value to set. * @return the WorkloadNetworkDhcpServer object itself. */ - public WorkloadNetworkDhcpServer withLeaseTime(Long leaseTime) { + public WorkloadNetworkDhcpServer withLeaseTime(Integer leaseTime) { this.leaseTime = leaseTime; return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public WorkloadNetworkDhcpServer withDisplayName(String displayName) { super.withDisplayName(displayName); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public WorkloadNetworkDhcpServer withRevision(Long revision) { super.withRevision(revision); @@ -86,7 +94,7 @@ public WorkloadNetworkDhcpServer withRevision(Long revision) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ @Override diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkDhcpServerUpdate.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkDhcpServerUpdate.java new file mode 100644 index 0000000000000..44f7436fb4b26 --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkDhcpServerUpdate.java @@ -0,0 +1,104 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.avs.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** + * NSX DHCP Server. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "dhcpType") +@JsonTypeName("SERVER") +@Fluent +public final class WorkloadNetworkDhcpServerUpdate extends WorkloadNetworkDhcpEntityUpdate { + /* + * DHCP Server Address. + */ + @JsonProperty(value = "serverAddress") + private String serverAddress; + + /* + * DHCP Server Lease Time. + */ + @JsonProperty(value = "leaseTime") + private Integer leaseTime; + + /** + * Creates an instance of WorkloadNetworkDhcpServerUpdate class. + */ + public WorkloadNetworkDhcpServerUpdate() { + } + + /** + * Get the serverAddress property: DHCP Server Address. + * + * @return the serverAddress value. + */ + public String serverAddress() { + return this.serverAddress; + } + + /** + * Set the serverAddress property: DHCP Server Address. + * + * @param serverAddress the serverAddress value to set. + * @return the WorkloadNetworkDhcpServerUpdate object itself. + */ + public WorkloadNetworkDhcpServerUpdate withServerAddress(String serverAddress) { + this.serverAddress = serverAddress; + return this; + } + + /** + * Get the leaseTime property: DHCP Server Lease Time. + * + * @return the leaseTime value. + */ + public Integer leaseTime() { + return this.leaseTime; + } + + /** + * Set the leaseTime property: DHCP Server Lease Time. + * + * @param leaseTime the leaseTime value to set. + * @return the WorkloadNetworkDhcpServerUpdate object itself. + */ + public WorkloadNetworkDhcpServerUpdate withLeaseTime(Integer leaseTime) { + this.leaseTime = leaseTime; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public WorkloadNetworkDhcpServerUpdate withDisplayName(String displayName) { + super.withDisplayName(displayName); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public WorkloadNetworkDhcpServerUpdate withRevision(Long revision) { + super.withRevision(revision); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + } +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkDhcpUpdate.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkDhcpUpdate.java new file mode 100644 index 0000000000000..aa821b56596c1 --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkDhcpUpdate.java @@ -0,0 +1,57 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.avs.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * NSX DHCP update. + */ +@Fluent +public final class WorkloadNetworkDhcpUpdate { + /* + * The updatable properties of a DHCP update + */ + @JsonProperty(value = "properties") + private WorkloadNetworkDhcpEntityUpdate properties; + + /** + * Creates an instance of WorkloadNetworkDhcpUpdate class. + */ + public WorkloadNetworkDhcpUpdate() { + } + + /** + * Get the properties property: The updatable properties of a DHCP update. + * + * @return the properties value. + */ + public WorkloadNetworkDhcpEntityUpdate properties() { + return this.properties; + } + + /** + * Set the properties property: The updatable properties of a DHCP update. + * + * @param properties the properties value to set. + * @return the WorkloadNetworkDhcpUpdate object itself. + */ + public WorkloadNetworkDhcpUpdate withProperties(WorkloadNetworkDhcpEntityUpdate properties) { + this.properties = properties; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (properties() != null) { + properties().validate(); + } + } +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkDnsService.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkDnsService.java index 9cd9d96344a91..c6e4c0ae73274 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkDnsService.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkDnsService.java @@ -4,119 +4,137 @@ package com.azure.resourcemanager.avs.models; +import com.azure.core.management.SystemData; import com.azure.core.util.Context; import com.azure.resourcemanager.avs.fluent.models.WorkloadNetworkDnsServiceInner; import java.util.List; -/** An immutable client-side representation of WorkloadNetworkDnsService. */ +/** + * An immutable client-side representation of WorkloadNetworkDnsService. + */ public interface WorkloadNetworkDnsService { /** * Gets the id property: Fully qualified resource Id for the resource. - * + * * @return the id value. */ String id(); /** * Gets the name property: The name of the resource. - * + * * @return the name value. */ String name(); /** * Gets the type property: The type of the resource. - * + * * @return the type value. */ String type(); + /** + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + SystemData systemData(); + /** * Gets the displayName property: Display name of the DNS Service. - * + * * @return the displayName value. */ String displayName(); /** * Gets the dnsServiceIp property: DNS service IP of the DNS Service. - * + * * @return the dnsServiceIp value. */ String dnsServiceIp(); /** * Gets the defaultDnsZone property: Default DNS zone of the DNS Service. - * + * * @return the defaultDnsZone value. */ String defaultDnsZone(); /** * Gets the fqdnZones property: FQDN zones of the DNS Service. - * + * * @return the fqdnZones value. */ List fqdnZones(); /** * Gets the logLevel property: DNS Service log level. - * + * * @return the logLevel value. */ DnsServiceLogLevelEnum logLevel(); /** * Gets the status property: DNS Service status. - * + * * @return the status value. */ DnsServiceStatusEnum status(); /** * Gets the provisioningState property: The provisioning state. - * + * * @return the provisioningState value. */ WorkloadNetworkDnsServiceProvisioningState provisioningState(); /** * Gets the revision property: NSX revision number. - * + * * @return the revision value. */ Long revision(); /** * Gets the name of the resource group. - * + * * @return the name of the resource group. */ String resourceGroupName(); /** * Gets the inner com.azure.resourcemanager.avs.fluent.models.WorkloadNetworkDnsServiceInner object. - * + * * @return the inner object. */ WorkloadNetworkDnsServiceInner innerModel(); - /** The entirety of the WorkloadNetworkDnsService definition. */ + /** + * The entirety of the WorkloadNetworkDnsService definition. + */ interface Definition extends DefinitionStages.Blank, DefinitionStages.WithParentResource, DefinitionStages.WithCreate { } - /** The WorkloadNetworkDnsService definition stages. */ + /** + * The WorkloadNetworkDnsService definition stages. + */ interface DefinitionStages { - /** The first stage of the WorkloadNetworkDnsService definition. */ + /** + * The first stage of the WorkloadNetworkDnsService definition. + */ interface Blank extends WithParentResource { } - /** The stage of the WorkloadNetworkDnsService definition allowing to specify parent resource. */ + /** + * The stage of the WorkloadNetworkDnsService definition allowing to specify parent resource. + */ interface WithParentResource { /** * Specifies resourceGroupName, privateCloudName. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. * @return the next definition stage. @@ -128,89 +146,97 @@ interface WithParentResource { * The stage of the WorkloadNetworkDnsService definition which contains all the minimum required properties for * the resource to be created, but also allows for any other optional properties to be specified. */ - interface WithCreate - extends DefinitionStages.WithDisplayName, - DefinitionStages.WithDnsServiceIp, - DefinitionStages.WithDefaultDnsZone, - DefinitionStages.WithFqdnZones, - DefinitionStages.WithLogLevel, - DefinitionStages.WithRevision { + interface WithCreate extends DefinitionStages.WithDisplayName, DefinitionStages.WithDnsServiceIp, + DefinitionStages.WithDefaultDnsZone, DefinitionStages.WithFqdnZones, DefinitionStages.WithLogLevel, + DefinitionStages.WithRevision { /** * Executes the create request. - * + * * @return the created resource. */ WorkloadNetworkDnsService create(); /** * Executes the create request. - * + * * @param context The context to associate with this operation. * @return the created resource. */ WorkloadNetworkDnsService create(Context context); } - /** The stage of the WorkloadNetworkDnsService definition allowing to specify displayName. */ + /** + * The stage of the WorkloadNetworkDnsService definition allowing to specify displayName. + */ interface WithDisplayName { /** * Specifies the displayName property: Display name of the DNS Service.. - * + * * @param displayName Display name of the DNS Service. * @return the next definition stage. */ WithCreate withDisplayName(String displayName); } - /** The stage of the WorkloadNetworkDnsService definition allowing to specify dnsServiceIp. */ + /** + * The stage of the WorkloadNetworkDnsService definition allowing to specify dnsServiceIp. + */ interface WithDnsServiceIp { /** * Specifies the dnsServiceIp property: DNS service IP of the DNS Service.. - * + * * @param dnsServiceIp DNS service IP of the DNS Service. * @return the next definition stage. */ WithCreate withDnsServiceIp(String dnsServiceIp); } - /** The stage of the WorkloadNetworkDnsService definition allowing to specify defaultDnsZone. */ + /** + * The stage of the WorkloadNetworkDnsService definition allowing to specify defaultDnsZone. + */ interface WithDefaultDnsZone { /** * Specifies the defaultDnsZone property: Default DNS zone of the DNS Service.. - * + * * @param defaultDnsZone Default DNS zone of the DNS Service. * @return the next definition stage. */ WithCreate withDefaultDnsZone(String defaultDnsZone); } - /** The stage of the WorkloadNetworkDnsService definition allowing to specify fqdnZones. */ + /** + * The stage of the WorkloadNetworkDnsService definition allowing to specify fqdnZones. + */ interface WithFqdnZones { /** * Specifies the fqdnZones property: FQDN zones of the DNS Service.. - * + * * @param fqdnZones FQDN zones of the DNS Service. * @return the next definition stage. */ WithCreate withFqdnZones(List fqdnZones); } - /** The stage of the WorkloadNetworkDnsService definition allowing to specify logLevel. */ + /** + * The stage of the WorkloadNetworkDnsService definition allowing to specify logLevel. + */ interface WithLogLevel { /** * Specifies the logLevel property: DNS Service log level.. - * + * * @param logLevel DNS Service log level. * @return the next definition stage. */ WithCreate withLogLevel(DnsServiceLogLevelEnum logLevel); } - /** The stage of the WorkloadNetworkDnsService definition allowing to specify revision. */ + /** + * The stage of the WorkloadNetworkDnsService definition allowing to specify revision. + */ interface WithRevision { /** * Specifies the revision property: NSX revision number.. - * + * * @param revision NSX revision number. * @return the next definition stage. */ @@ -220,97 +246,109 @@ interface WithRevision { /** * Begins update for the WorkloadNetworkDnsService resource. - * + * * @return the stage of resource update. */ WorkloadNetworkDnsService.Update update(); - /** The template for WorkloadNetworkDnsService update. */ + /** + * The template for WorkloadNetworkDnsService update. + */ interface Update - extends UpdateStages.WithDisplayName, - UpdateStages.WithDnsServiceIp, - UpdateStages.WithDefaultDnsZone, - UpdateStages.WithFqdnZones, - UpdateStages.WithLogLevel, - UpdateStages.WithRevision { + extends UpdateStages.WithDisplayName, UpdateStages.WithDnsServiceIp, UpdateStages.WithDefaultDnsZone, + UpdateStages.WithFqdnZones, UpdateStages.WithLogLevel, UpdateStages.WithRevision { /** * Executes the update request. - * + * * @return the updated resource. */ WorkloadNetworkDnsService apply(); /** * Executes the update request. - * + * * @param context The context to associate with this operation. * @return the updated resource. */ WorkloadNetworkDnsService apply(Context context); } - /** The WorkloadNetworkDnsService update stages. */ + /** + * The WorkloadNetworkDnsService update stages. + */ interface UpdateStages { - /** The stage of the WorkloadNetworkDnsService update allowing to specify displayName. */ + /** + * The stage of the WorkloadNetworkDnsService update allowing to specify displayName. + */ interface WithDisplayName { /** * Specifies the displayName property: Display name of the DNS Service.. - * + * * @param displayName Display name of the DNS Service. * @return the next definition stage. */ Update withDisplayName(String displayName); } - /** The stage of the WorkloadNetworkDnsService update allowing to specify dnsServiceIp. */ + /** + * The stage of the WorkloadNetworkDnsService update allowing to specify dnsServiceIp. + */ interface WithDnsServiceIp { /** * Specifies the dnsServiceIp property: DNS service IP of the DNS Service.. - * + * * @param dnsServiceIp DNS service IP of the DNS Service. * @return the next definition stage. */ Update withDnsServiceIp(String dnsServiceIp); } - /** The stage of the WorkloadNetworkDnsService update allowing to specify defaultDnsZone. */ + /** + * The stage of the WorkloadNetworkDnsService update allowing to specify defaultDnsZone. + */ interface WithDefaultDnsZone { /** * Specifies the defaultDnsZone property: Default DNS zone of the DNS Service.. - * + * * @param defaultDnsZone Default DNS zone of the DNS Service. * @return the next definition stage. */ Update withDefaultDnsZone(String defaultDnsZone); } - /** The stage of the WorkloadNetworkDnsService update allowing to specify fqdnZones. */ + /** + * The stage of the WorkloadNetworkDnsService update allowing to specify fqdnZones. + */ interface WithFqdnZones { /** * Specifies the fqdnZones property: FQDN zones of the DNS Service.. - * + * * @param fqdnZones FQDN zones of the DNS Service. * @return the next definition stage. */ Update withFqdnZones(List fqdnZones); } - /** The stage of the WorkloadNetworkDnsService update allowing to specify logLevel. */ + /** + * The stage of the WorkloadNetworkDnsService update allowing to specify logLevel. + */ interface WithLogLevel { /** * Specifies the logLevel property: DNS Service log level.. - * + * * @param logLevel DNS Service log level. * @return the next definition stage. */ Update withLogLevel(DnsServiceLogLevelEnum logLevel); } - /** The stage of the WorkloadNetworkDnsService update allowing to specify revision. */ + /** + * The stage of the WorkloadNetworkDnsService update allowing to specify revision. + */ interface WithRevision { /** * Specifies the revision property: NSX revision number.. - * + * * @param revision NSX revision number. * @return the next definition stage. */ @@ -320,14 +358,14 @@ interface WithRevision { /** * Refreshes the resource to sync with Azure. - * + * * @return the refreshed resource. */ WorkloadNetworkDnsService refresh(); /** * Refreshes the resource to sync with Azure. - * + * * @param context The context to associate with this operation. * @return the refreshed resource. */ diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkDnsServiceListResult.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkDnsServiceListResult.java new file mode 100644 index 0000000000000..08ca8b83532de --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkDnsServiceListResult.java @@ -0,0 +1,80 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.avs.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.avs.fluent.models.WorkloadNetworkDnsServiceInner; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** + * The response of a WorkloadNetworkDnsService list operation. + */ +@Fluent +public final class WorkloadNetworkDnsServiceListResult { + /* + * The WorkloadNetworkDnsService items on this page + */ + @JsonProperty(value = "value", required = true) + private List value; + + /* + * The link to the next page of items + */ + @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) + private String nextLink; + + /** + * Creates an instance of WorkloadNetworkDnsServiceListResult class. + */ + public WorkloadNetworkDnsServiceListResult() { + } + + /** + * Get the value property: The WorkloadNetworkDnsService items on this page. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Set the value property: The WorkloadNetworkDnsService items on this page. + * + * @param value the value value to set. + * @return the WorkloadNetworkDnsServiceListResult object itself. + */ + public WorkloadNetworkDnsServiceListResult withValue(List value) { + this.value = value; + return this; + } + + /** + * Get the nextLink property: The link to the next page of items. + * + * @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) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + "Missing required property value in model WorkloadNetworkDnsServiceListResult")); + } else { + value().forEach(e -> e.validate()); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(WorkloadNetworkDnsServiceListResult.class); +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkDnsServiceProvisioningState.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkDnsServiceProvisioningState.java index 8f73e6ad277c6..fed0a99c152af 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkDnsServiceProvisioningState.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkDnsServiceProvisioningState.java @@ -8,30 +8,44 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** The provisioning state. */ +/** + * Workload Network DNS Service provisioning state. + */ public final class WorkloadNetworkDnsServiceProvisioningState extends ExpandableStringEnum { - /** Static value Succeeded for WorkloadNetworkDnsServiceProvisioningState. */ + /** + * Static value Succeeded for WorkloadNetworkDnsServiceProvisioningState. + */ public static final WorkloadNetworkDnsServiceProvisioningState SUCCEEDED = fromString("Succeeded"); - /** Static value Failed for WorkloadNetworkDnsServiceProvisioningState. */ + /** + * Static value Failed for WorkloadNetworkDnsServiceProvisioningState. + */ public static final WorkloadNetworkDnsServiceProvisioningState FAILED = fromString("Failed"); - /** Static value Building for WorkloadNetworkDnsServiceProvisioningState. */ + /** + * Static value Canceled for WorkloadNetworkDnsServiceProvisioningState. + */ + public static final WorkloadNetworkDnsServiceProvisioningState CANCELED = fromString("Canceled"); + + /** + * Static value Building for WorkloadNetworkDnsServiceProvisioningState. + */ public static final WorkloadNetworkDnsServiceProvisioningState BUILDING = fromString("Building"); - /** Static value Deleting for WorkloadNetworkDnsServiceProvisioningState. */ + /** + * Static value Deleting for WorkloadNetworkDnsServiceProvisioningState. + */ public static final WorkloadNetworkDnsServiceProvisioningState DELETING = fromString("Deleting"); - /** Static value Updating for WorkloadNetworkDnsServiceProvisioningState. */ + /** + * Static value Updating for WorkloadNetworkDnsServiceProvisioningState. + */ public static final WorkloadNetworkDnsServiceProvisioningState UPDATING = fromString("Updating"); - /** Static value Canceled for WorkloadNetworkDnsServiceProvisioningState. */ - public static final WorkloadNetworkDnsServiceProvisioningState CANCELED = fromString("Canceled"); - /** * Creates a new instance of WorkloadNetworkDnsServiceProvisioningState value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -40,7 +54,7 @@ public WorkloadNetworkDnsServiceProvisioningState() { /** * Creates or finds a WorkloadNetworkDnsServiceProvisioningState from its string representation. - * + * * @param name a name to look for. * @return the corresponding WorkloadNetworkDnsServiceProvisioningState. */ @@ -51,7 +65,7 @@ public static WorkloadNetworkDnsServiceProvisioningState fromString(String name) /** * Gets known WorkloadNetworkDnsServiceProvisioningState values. - * + * * @return known WorkloadNetworkDnsServiceProvisioningState values. */ public static Collection values() { diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkDnsServiceUpdate.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkDnsServiceUpdate.java new file mode 100644 index 0000000000000..01911dd0a977b --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkDnsServiceUpdate.java @@ -0,0 +1,204 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.avs.models; + +import com.azure.core.annotation.Fluent; +import com.azure.resourcemanager.avs.fluent.models.WorkloadNetworkDnsServiceProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** + * NSX DNS Service update. + */ +@Fluent +public final class WorkloadNetworkDnsServiceUpdate { + /* + * The updatable properties of a DNS Service update + */ + @JsonProperty(value = "properties") + private WorkloadNetworkDnsServiceProperties innerProperties; + + /** + * Creates an instance of WorkloadNetworkDnsServiceUpdate class. + */ + public WorkloadNetworkDnsServiceUpdate() { + } + + /** + * Get the innerProperties property: The updatable properties of a DNS Service update. + * + * @return the innerProperties value. + */ + private WorkloadNetworkDnsServiceProperties innerProperties() { + return this.innerProperties; + } + + /** + * Get the displayName property: Display name of the DNS Service. + * + * @return the displayName value. + */ + public String displayName() { + return this.innerProperties() == null ? null : this.innerProperties().displayName(); + } + + /** + * Set the displayName property: Display name of the DNS Service. + * + * @param displayName the displayName value to set. + * @return the WorkloadNetworkDnsServiceUpdate object itself. + */ + public WorkloadNetworkDnsServiceUpdate withDisplayName(String displayName) { + if (this.innerProperties() == null) { + this.innerProperties = new WorkloadNetworkDnsServiceProperties(); + } + this.innerProperties().withDisplayName(displayName); + return this; + } + + /** + * Get the dnsServiceIp property: DNS service IP of the DNS Service. + * + * @return the dnsServiceIp value. + */ + public String dnsServiceIp() { + return this.innerProperties() == null ? null : this.innerProperties().dnsServiceIp(); + } + + /** + * Set the dnsServiceIp property: DNS service IP of the DNS Service. + * + * @param dnsServiceIp the dnsServiceIp value to set. + * @return the WorkloadNetworkDnsServiceUpdate object itself. + */ + public WorkloadNetworkDnsServiceUpdate withDnsServiceIp(String dnsServiceIp) { + if (this.innerProperties() == null) { + this.innerProperties = new WorkloadNetworkDnsServiceProperties(); + } + this.innerProperties().withDnsServiceIp(dnsServiceIp); + return this; + } + + /** + * Get the defaultDnsZone property: Default DNS zone of the DNS Service. + * + * @return the defaultDnsZone value. + */ + public String defaultDnsZone() { + return this.innerProperties() == null ? null : this.innerProperties().defaultDnsZone(); + } + + /** + * Set the defaultDnsZone property: Default DNS zone of the DNS Service. + * + * @param defaultDnsZone the defaultDnsZone value to set. + * @return the WorkloadNetworkDnsServiceUpdate object itself. + */ + public WorkloadNetworkDnsServiceUpdate withDefaultDnsZone(String defaultDnsZone) { + if (this.innerProperties() == null) { + this.innerProperties = new WorkloadNetworkDnsServiceProperties(); + } + this.innerProperties().withDefaultDnsZone(defaultDnsZone); + return this; + } + + /** + * Get the fqdnZones property: FQDN zones of the DNS Service. + * + * @return the fqdnZones value. + */ + public List fqdnZones() { + return this.innerProperties() == null ? null : this.innerProperties().fqdnZones(); + } + + /** + * Set the fqdnZones property: FQDN zones of the DNS Service. + * + * @param fqdnZones the fqdnZones value to set. + * @return the WorkloadNetworkDnsServiceUpdate object itself. + */ + public WorkloadNetworkDnsServiceUpdate withFqdnZones(List fqdnZones) { + if (this.innerProperties() == null) { + this.innerProperties = new WorkloadNetworkDnsServiceProperties(); + } + this.innerProperties().withFqdnZones(fqdnZones); + return this; + } + + /** + * Get the logLevel property: DNS Service log level. + * + * @return the logLevel value. + */ + public DnsServiceLogLevelEnum logLevel() { + return this.innerProperties() == null ? null : this.innerProperties().logLevel(); + } + + /** + * Set the logLevel property: DNS Service log level. + * + * @param logLevel the logLevel value to set. + * @return the WorkloadNetworkDnsServiceUpdate object itself. + */ + public WorkloadNetworkDnsServiceUpdate withLogLevel(DnsServiceLogLevelEnum logLevel) { + if (this.innerProperties() == null) { + this.innerProperties = new WorkloadNetworkDnsServiceProperties(); + } + this.innerProperties().withLogLevel(logLevel); + return this; + } + + /** + * Get the status property: DNS Service status. + * + * @return the status value. + */ + public DnsServiceStatusEnum status() { + return this.innerProperties() == null ? null : this.innerProperties().status(); + } + + /** + * Get the provisioningState property: The provisioning state. + * + * @return the provisioningState value. + */ + public WorkloadNetworkDnsServiceProvisioningState provisioningState() { + return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); + } + + /** + * Get the revision property: NSX revision number. + * + * @return the revision value. + */ + public Long revision() { + return this.innerProperties() == null ? null : this.innerProperties().revision(); + } + + /** + * Set the revision property: NSX revision number. + * + * @param revision the revision value to set. + * @return the WorkloadNetworkDnsServiceUpdate object itself. + */ + public WorkloadNetworkDnsServiceUpdate withRevision(Long revision) { + if (this.innerProperties() == null) { + this.innerProperties = new WorkloadNetworkDnsServiceProperties(); + } + this.innerProperties().withRevision(revision); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (innerProperties() != null) { + innerProperties().validate(); + } + } +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkDnsServicesList.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkDnsServicesList.java deleted file mode 100644 index 48c08fb3ff514..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkDnsServicesList.java +++ /dev/null @@ -1,59 +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.avs.models; - -import com.azure.core.annotation.Immutable; -import com.azure.resourcemanager.avs.fluent.models.WorkloadNetworkDnsServiceInner; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** A list of NSX DNS Services. */ -@Immutable -public final class WorkloadNetworkDnsServicesList { - /* - * The items on the page - */ - @JsonProperty(value = "value", access = JsonProperty.Access.WRITE_ONLY) - private List value; - - /* - * URL to get the next page if any - */ - @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) - private String nextLink; - - /** Creates an instance of WorkloadNetworkDnsServicesList class. */ - public WorkloadNetworkDnsServicesList() { - } - - /** - * Get the value property: The items on the page. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Get the nextLink property: URL to get the next page if 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/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkDnsZone.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkDnsZone.java index dbfb3bd569fe6..cef91e5cd1b84 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkDnsZone.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkDnsZone.java @@ -4,112 +4,130 @@ package com.azure.resourcemanager.avs.models; +import com.azure.core.management.SystemData; import com.azure.core.util.Context; import com.azure.resourcemanager.avs.fluent.models.WorkloadNetworkDnsZoneInner; import java.util.List; -/** An immutable client-side representation of WorkloadNetworkDnsZone. */ +/** + * An immutable client-side representation of WorkloadNetworkDnsZone. + */ public interface WorkloadNetworkDnsZone { /** * Gets the id property: Fully qualified resource Id for the resource. - * + * * @return the id value. */ String id(); /** * Gets the name property: The name of the resource. - * + * * @return the name value. */ String name(); /** * Gets the type property: The type of the resource. - * + * * @return the type value. */ String type(); + /** + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + SystemData systemData(); + /** * Gets the displayName property: Display name of the DNS Zone. - * + * * @return the displayName value. */ String displayName(); /** * Gets the domain property: Domain names of the DNS Zone. - * + * * @return the domain value. */ List domain(); /** * Gets the dnsServerIps property: DNS Server IP array of the DNS Zone. - * + * * @return the dnsServerIps value. */ List dnsServerIps(); /** * Gets the sourceIp property: Source IP of the DNS Zone. - * + * * @return the sourceIp value. */ String sourceIp(); /** * Gets the dnsServices property: Number of DNS Services using the DNS zone. - * + * * @return the dnsServices value. */ - Long dnsServices(); + Integer dnsServices(); /** * Gets the provisioningState property: The provisioning state. - * + * * @return the provisioningState value. */ WorkloadNetworkDnsZoneProvisioningState provisioningState(); /** * Gets the revision property: NSX revision number. - * + * * @return the revision value. */ Long revision(); /** * Gets the name of the resource group. - * + * * @return the name of the resource group. */ String resourceGroupName(); /** * Gets the inner com.azure.resourcemanager.avs.fluent.models.WorkloadNetworkDnsZoneInner object. - * + * * @return the inner object. */ WorkloadNetworkDnsZoneInner innerModel(); - /** The entirety of the WorkloadNetworkDnsZone definition. */ + /** + * The entirety of the WorkloadNetworkDnsZone definition. + */ interface Definition extends DefinitionStages.Blank, DefinitionStages.WithParentResource, DefinitionStages.WithCreate { } - /** The WorkloadNetworkDnsZone definition stages. */ + /** + * The WorkloadNetworkDnsZone definition stages. + */ interface DefinitionStages { - /** The first stage of the WorkloadNetworkDnsZone definition. */ + /** + * The first stage of the WorkloadNetworkDnsZone definition. + */ interface Blank extends WithParentResource { } - /** The stage of the WorkloadNetworkDnsZone definition allowing to specify parent resource. */ + /** + * The stage of the WorkloadNetworkDnsZone definition allowing to specify parent resource. + */ interface WithParentResource { /** * Specifies resourceGroupName, privateCloudName. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. * @return the next definition stage. @@ -122,88 +140,96 @@ interface WithParentResource { * resource to be created, but also allows for any other optional properties to be specified. */ interface WithCreate - extends DefinitionStages.WithDisplayName, - DefinitionStages.WithDomain, - DefinitionStages.WithDnsServerIps, - DefinitionStages.WithSourceIp, - DefinitionStages.WithDnsServices, - DefinitionStages.WithRevision { + extends DefinitionStages.WithDisplayName, DefinitionStages.WithDomain, DefinitionStages.WithDnsServerIps, + DefinitionStages.WithSourceIp, DefinitionStages.WithDnsServices, DefinitionStages.WithRevision { /** * Executes the create request. - * + * * @return the created resource. */ WorkloadNetworkDnsZone create(); /** * Executes the create request. - * + * * @param context The context to associate with this operation. * @return the created resource. */ WorkloadNetworkDnsZone create(Context context); } - /** The stage of the WorkloadNetworkDnsZone definition allowing to specify displayName. */ + /** + * The stage of the WorkloadNetworkDnsZone definition allowing to specify displayName. + */ interface WithDisplayName { /** * Specifies the displayName property: Display name of the DNS Zone.. - * + * * @param displayName Display name of the DNS Zone. * @return the next definition stage. */ WithCreate withDisplayName(String displayName); } - /** The stage of the WorkloadNetworkDnsZone definition allowing to specify domain. */ + /** + * The stage of the WorkloadNetworkDnsZone definition allowing to specify domain. + */ interface WithDomain { /** * Specifies the domain property: Domain names of the DNS Zone.. - * + * * @param domain Domain names of the DNS Zone. * @return the next definition stage. */ WithCreate withDomain(List domain); } - /** The stage of the WorkloadNetworkDnsZone definition allowing to specify dnsServerIps. */ + /** + * The stage of the WorkloadNetworkDnsZone definition allowing to specify dnsServerIps. + */ interface WithDnsServerIps { /** * Specifies the dnsServerIps property: DNS Server IP array of the DNS Zone.. - * + * * @param dnsServerIps DNS Server IP array of the DNS Zone. * @return the next definition stage. */ WithCreate withDnsServerIps(List dnsServerIps); } - /** The stage of the WorkloadNetworkDnsZone definition allowing to specify sourceIp. */ + /** + * The stage of the WorkloadNetworkDnsZone definition allowing to specify sourceIp. + */ interface WithSourceIp { /** * Specifies the sourceIp property: Source IP of the DNS Zone.. - * + * * @param sourceIp Source IP of the DNS Zone. * @return the next definition stage. */ WithCreate withSourceIp(String sourceIp); } - /** The stage of the WorkloadNetworkDnsZone definition allowing to specify dnsServices. */ + /** + * The stage of the WorkloadNetworkDnsZone definition allowing to specify dnsServices. + */ interface WithDnsServices { /** * Specifies the dnsServices property: Number of DNS Services using the DNS zone.. - * + * * @param dnsServices Number of DNS Services using the DNS zone. * @return the next definition stage. */ - WithCreate withDnsServices(Long dnsServices); + WithCreate withDnsServices(Integer dnsServices); } - /** The stage of the WorkloadNetworkDnsZone definition allowing to specify revision. */ + /** + * The stage of the WorkloadNetworkDnsZone definition allowing to specify revision. + */ interface WithRevision { /** * Specifies the revision property: NSX revision number.. - * + * * @param revision NSX revision number. * @return the next definition stage. */ @@ -213,97 +239,108 @@ interface WithRevision { /** * Begins update for the WorkloadNetworkDnsZone resource. - * + * * @return the stage of resource update. */ WorkloadNetworkDnsZone.Update update(); - /** The template for WorkloadNetworkDnsZone update. */ - interface Update - extends UpdateStages.WithDisplayName, - UpdateStages.WithDomain, - UpdateStages.WithDnsServerIps, - UpdateStages.WithSourceIp, - UpdateStages.WithDnsServices, - UpdateStages.WithRevision { + /** + * The template for WorkloadNetworkDnsZone update. + */ + interface Update extends UpdateStages.WithDisplayName, UpdateStages.WithDomain, UpdateStages.WithDnsServerIps, + UpdateStages.WithSourceIp, UpdateStages.WithDnsServices, UpdateStages.WithRevision { /** * Executes the update request. - * + * * @return the updated resource. */ WorkloadNetworkDnsZone apply(); /** * Executes the update request. - * + * * @param context The context to associate with this operation. * @return the updated resource. */ WorkloadNetworkDnsZone apply(Context context); } - /** The WorkloadNetworkDnsZone update stages. */ + /** + * The WorkloadNetworkDnsZone update stages. + */ interface UpdateStages { - /** The stage of the WorkloadNetworkDnsZone update allowing to specify displayName. */ + /** + * The stage of the WorkloadNetworkDnsZone update allowing to specify displayName. + */ interface WithDisplayName { /** * Specifies the displayName property: Display name of the DNS Zone.. - * + * * @param displayName Display name of the DNS Zone. * @return the next definition stage. */ Update withDisplayName(String displayName); } - /** The stage of the WorkloadNetworkDnsZone update allowing to specify domain. */ + /** + * The stage of the WorkloadNetworkDnsZone update allowing to specify domain. + */ interface WithDomain { /** * Specifies the domain property: Domain names of the DNS Zone.. - * + * * @param domain Domain names of the DNS Zone. * @return the next definition stage. */ Update withDomain(List domain); } - /** The stage of the WorkloadNetworkDnsZone update allowing to specify dnsServerIps. */ + /** + * The stage of the WorkloadNetworkDnsZone update allowing to specify dnsServerIps. + */ interface WithDnsServerIps { /** * Specifies the dnsServerIps property: DNS Server IP array of the DNS Zone.. - * + * * @param dnsServerIps DNS Server IP array of the DNS Zone. * @return the next definition stage. */ Update withDnsServerIps(List dnsServerIps); } - /** The stage of the WorkloadNetworkDnsZone update allowing to specify sourceIp. */ + /** + * The stage of the WorkloadNetworkDnsZone update allowing to specify sourceIp. + */ interface WithSourceIp { /** * Specifies the sourceIp property: Source IP of the DNS Zone.. - * + * * @param sourceIp Source IP of the DNS Zone. * @return the next definition stage. */ Update withSourceIp(String sourceIp); } - /** The stage of the WorkloadNetworkDnsZone update allowing to specify dnsServices. */ + /** + * The stage of the WorkloadNetworkDnsZone update allowing to specify dnsServices. + */ interface WithDnsServices { /** * Specifies the dnsServices property: Number of DNS Services using the DNS zone.. - * + * * @param dnsServices Number of DNS Services using the DNS zone. * @return the next definition stage. */ - Update withDnsServices(Long dnsServices); + Update withDnsServices(Integer dnsServices); } - /** The stage of the WorkloadNetworkDnsZone update allowing to specify revision. */ + /** + * The stage of the WorkloadNetworkDnsZone update allowing to specify revision. + */ interface WithRevision { /** * Specifies the revision property: NSX revision number.. - * + * * @param revision NSX revision number. * @return the next definition stage. */ @@ -313,14 +350,14 @@ interface WithRevision { /** * Refreshes the resource to sync with Azure. - * + * * @return the refreshed resource. */ WorkloadNetworkDnsZone refresh(); /** * Refreshes the resource to sync with Azure. - * + * * @param context The context to associate with this operation. * @return the refreshed resource. */ diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkDnsZoneListResult.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkDnsZoneListResult.java new file mode 100644 index 0000000000000..7cf52a4b02291 --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkDnsZoneListResult.java @@ -0,0 +1,80 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.avs.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.avs.fluent.models.WorkloadNetworkDnsZoneInner; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** + * The response of a WorkloadNetworkDnsZone list operation. + */ +@Fluent +public final class WorkloadNetworkDnsZoneListResult { + /* + * The WorkloadNetworkDnsZone items on this page + */ + @JsonProperty(value = "value", required = true) + private List value; + + /* + * The link to the next page of items + */ + @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) + private String nextLink; + + /** + * Creates an instance of WorkloadNetworkDnsZoneListResult class. + */ + public WorkloadNetworkDnsZoneListResult() { + } + + /** + * Get the value property: The WorkloadNetworkDnsZone items on this page. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Set the value property: The WorkloadNetworkDnsZone items on this page. + * + * @param value the value value to set. + * @return the WorkloadNetworkDnsZoneListResult object itself. + */ + public WorkloadNetworkDnsZoneListResult withValue(List value) { + this.value = value; + return this; + } + + /** + * Get the nextLink property: The link to the next page of items. + * + * @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) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + "Missing required property value in model WorkloadNetworkDnsZoneListResult")); + } else { + value().forEach(e -> e.validate()); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(WorkloadNetworkDnsZoneListResult.class); +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkDnsZoneProvisioningState.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkDnsZoneProvisioningState.java index 08edc90378dde..9e9a10ad397bf 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkDnsZoneProvisioningState.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkDnsZoneProvisioningState.java @@ -8,30 +8,44 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** The provisioning state. */ +/** + * Workload Network DNS Zone provisioning state. + */ public final class WorkloadNetworkDnsZoneProvisioningState extends ExpandableStringEnum { - /** Static value Succeeded for WorkloadNetworkDnsZoneProvisioningState. */ + /** + * Static value Succeeded for WorkloadNetworkDnsZoneProvisioningState. + */ public static final WorkloadNetworkDnsZoneProvisioningState SUCCEEDED = fromString("Succeeded"); - /** Static value Failed for WorkloadNetworkDnsZoneProvisioningState. */ + /** + * Static value Failed for WorkloadNetworkDnsZoneProvisioningState. + */ public static final WorkloadNetworkDnsZoneProvisioningState FAILED = fromString("Failed"); - /** Static value Building for WorkloadNetworkDnsZoneProvisioningState. */ + /** + * Static value Canceled for WorkloadNetworkDnsZoneProvisioningState. + */ + public static final WorkloadNetworkDnsZoneProvisioningState CANCELED = fromString("Canceled"); + + /** + * Static value Building for WorkloadNetworkDnsZoneProvisioningState. + */ public static final WorkloadNetworkDnsZoneProvisioningState BUILDING = fromString("Building"); - /** Static value Deleting for WorkloadNetworkDnsZoneProvisioningState. */ + /** + * Static value Deleting for WorkloadNetworkDnsZoneProvisioningState. + */ public static final WorkloadNetworkDnsZoneProvisioningState DELETING = fromString("Deleting"); - /** Static value Updating for WorkloadNetworkDnsZoneProvisioningState. */ + /** + * Static value Updating for WorkloadNetworkDnsZoneProvisioningState. + */ public static final WorkloadNetworkDnsZoneProvisioningState UPDATING = fromString("Updating"); - /** Static value Canceled for WorkloadNetworkDnsZoneProvisioningState. */ - public static final WorkloadNetworkDnsZoneProvisioningState CANCELED = fromString("Canceled"); - /** * Creates a new instance of WorkloadNetworkDnsZoneProvisioningState value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -40,7 +54,7 @@ public WorkloadNetworkDnsZoneProvisioningState() { /** * Creates or finds a WorkloadNetworkDnsZoneProvisioningState from its string representation. - * + * * @param name a name to look for. * @return the corresponding WorkloadNetworkDnsZoneProvisioningState. */ @@ -51,7 +65,7 @@ public static WorkloadNetworkDnsZoneProvisioningState fromString(String name) { /** * Gets known WorkloadNetworkDnsZoneProvisioningState values. - * + * * @return known WorkloadNetworkDnsZoneProvisioningState values. */ public static Collection values() { diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkDnsZoneUpdate.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkDnsZoneUpdate.java new file mode 100644 index 0000000000000..efcf630c0bd5d --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkDnsZoneUpdate.java @@ -0,0 +1,195 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.avs.models; + +import com.azure.core.annotation.Fluent; +import com.azure.resourcemanager.avs.fluent.models.WorkloadNetworkDnsZoneProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** + * NSX DNS Zone update. + */ +@Fluent +public final class WorkloadNetworkDnsZoneUpdate { + /* + * The updatable properties of a DNS Zone update + */ + @JsonProperty(value = "properties") + private WorkloadNetworkDnsZoneProperties innerProperties; + + /** + * Creates an instance of WorkloadNetworkDnsZoneUpdate class. + */ + public WorkloadNetworkDnsZoneUpdate() { + } + + /** + * Get the innerProperties property: The updatable properties of a DNS Zone update. + * + * @return the innerProperties value. + */ + private WorkloadNetworkDnsZoneProperties innerProperties() { + return this.innerProperties; + } + + /** + * Get the displayName property: Display name of the DNS Zone. + * + * @return the displayName value. + */ + public String displayName() { + return this.innerProperties() == null ? null : this.innerProperties().displayName(); + } + + /** + * Set the displayName property: Display name of the DNS Zone. + * + * @param displayName the displayName value to set. + * @return the WorkloadNetworkDnsZoneUpdate object itself. + */ + public WorkloadNetworkDnsZoneUpdate withDisplayName(String displayName) { + if (this.innerProperties() == null) { + this.innerProperties = new WorkloadNetworkDnsZoneProperties(); + } + this.innerProperties().withDisplayName(displayName); + return this; + } + + /** + * Get the domain property: Domain names of the DNS Zone. + * + * @return the domain value. + */ + public List domain() { + return this.innerProperties() == null ? null : this.innerProperties().domain(); + } + + /** + * Set the domain property: Domain names of the DNS Zone. + * + * @param domain the domain value to set. + * @return the WorkloadNetworkDnsZoneUpdate object itself. + */ + public WorkloadNetworkDnsZoneUpdate withDomain(List domain) { + if (this.innerProperties() == null) { + this.innerProperties = new WorkloadNetworkDnsZoneProperties(); + } + this.innerProperties().withDomain(domain); + return this; + } + + /** + * Get the dnsServerIps property: DNS Server IP array of the DNS Zone. + * + * @return the dnsServerIps value. + */ + public List dnsServerIps() { + return this.innerProperties() == null ? null : this.innerProperties().dnsServerIps(); + } + + /** + * Set the dnsServerIps property: DNS Server IP array of the DNS Zone. + * + * @param dnsServerIps the dnsServerIps value to set. + * @return the WorkloadNetworkDnsZoneUpdate object itself. + */ + public WorkloadNetworkDnsZoneUpdate withDnsServerIps(List dnsServerIps) { + if (this.innerProperties() == null) { + this.innerProperties = new WorkloadNetworkDnsZoneProperties(); + } + this.innerProperties().withDnsServerIps(dnsServerIps); + return this; + } + + /** + * Get the sourceIp property: Source IP of the DNS Zone. + * + * @return the sourceIp value. + */ + public String sourceIp() { + return this.innerProperties() == null ? null : this.innerProperties().sourceIp(); + } + + /** + * Set the sourceIp property: Source IP of the DNS Zone. + * + * @param sourceIp the sourceIp value to set. + * @return the WorkloadNetworkDnsZoneUpdate object itself. + */ + public WorkloadNetworkDnsZoneUpdate withSourceIp(String sourceIp) { + if (this.innerProperties() == null) { + this.innerProperties = new WorkloadNetworkDnsZoneProperties(); + } + this.innerProperties().withSourceIp(sourceIp); + return this; + } + + /** + * Get the dnsServices property: Number of DNS Services using the DNS zone. + * + * @return the dnsServices value. + */ + public Integer dnsServices() { + return this.innerProperties() == null ? null : this.innerProperties().dnsServices(); + } + + /** + * Set the dnsServices property: Number of DNS Services using the DNS zone. + * + * @param dnsServices the dnsServices value to set. + * @return the WorkloadNetworkDnsZoneUpdate object itself. + */ + public WorkloadNetworkDnsZoneUpdate withDnsServices(Integer dnsServices) { + if (this.innerProperties() == null) { + this.innerProperties = new WorkloadNetworkDnsZoneProperties(); + } + this.innerProperties().withDnsServices(dnsServices); + return this; + } + + /** + * Get the provisioningState property: The provisioning state. + * + * @return the provisioningState value. + */ + public WorkloadNetworkDnsZoneProvisioningState provisioningState() { + return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); + } + + /** + * Get the revision property: NSX revision number. + * + * @return the revision value. + */ + public Long revision() { + return this.innerProperties() == null ? null : this.innerProperties().revision(); + } + + /** + * Set the revision property: NSX revision number. + * + * @param revision the revision value to set. + * @return the WorkloadNetworkDnsZoneUpdate object itself. + */ + public WorkloadNetworkDnsZoneUpdate withRevision(Long revision) { + if (this.innerProperties() == null) { + this.innerProperties = new WorkloadNetworkDnsZoneProperties(); + } + this.innerProperties().withRevision(revision); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (innerProperties() != null) { + innerProperties().validate(); + } + } +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkDnsZonesList.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkDnsZonesList.java deleted file mode 100644 index eae0312f71d53..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkDnsZonesList.java +++ /dev/null @@ -1,59 +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.avs.models; - -import com.azure.core.annotation.Immutable; -import com.azure.resourcemanager.avs.fluent.models.WorkloadNetworkDnsZoneInner; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** A list of NSX DNS Zones. */ -@Immutable -public final class WorkloadNetworkDnsZonesList { - /* - * The items on the page - */ - @JsonProperty(value = "value", access = JsonProperty.Access.WRITE_ONLY) - private List value; - - /* - * URL to get the next page if any - */ - @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) - private String nextLink; - - /** Creates an instance of WorkloadNetworkDnsZonesList class. */ - public WorkloadNetworkDnsZonesList() { - } - - /** - * Get the value property: The items on the page. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Get the nextLink property: URL to get the next page if 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/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkGateway.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkGateway.java index c65b3101945e8..fc5f23c15a902 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkGateway.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkGateway.java @@ -4,48 +4,65 @@ package com.azure.resourcemanager.avs.models; +import com.azure.core.management.SystemData; import com.azure.resourcemanager.avs.fluent.models.WorkloadNetworkGatewayInner; -/** An immutable client-side representation of WorkloadNetworkGateway. */ +/** + * An immutable client-side representation of WorkloadNetworkGateway. + */ public interface WorkloadNetworkGateway { /** * Gets the id property: Fully qualified resource Id for the resource. - * + * * @return the id value. */ String id(); /** * Gets the name property: The name of the resource. - * + * * @return the name value. */ String name(); /** * Gets the type property: The type of the resource. - * + * * @return the type value. */ String type(); + /** + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + SystemData systemData(); + + /** + * Gets the provisioningState property: The provisioning state of the resource. + * + * @return the provisioningState value. + */ + WorkloadNetworkProvisioningState provisioningState(); + /** * Gets the displayName property: Display name of the DHCP entity. - * + * * @return the displayName value. */ String displayName(); /** * Gets the path property: NSX Gateway Path. - * + * * @return the path value. */ String path(); /** * Gets the inner com.azure.resourcemanager.avs.fluent.models.WorkloadNetworkGatewayInner object. - * + * * @return the inner object. */ WorkloadNetworkGatewayInner innerModel(); diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkGatewayList.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkGatewayList.java deleted file mode 100644 index 8a4d22638ed14..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkGatewayList.java +++ /dev/null @@ -1,59 +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.avs.models; - -import com.azure.core.annotation.Immutable; -import com.azure.resourcemanager.avs.fluent.models.WorkloadNetworkGatewayInner; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** A list of NSX Gateways. */ -@Immutable -public final class WorkloadNetworkGatewayList { - /* - * The items on the page - */ - @JsonProperty(value = "value", access = JsonProperty.Access.WRITE_ONLY) - private List value; - - /* - * URL to get the next page if any - */ - @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) - private String nextLink; - - /** Creates an instance of WorkloadNetworkGatewayList class. */ - public WorkloadNetworkGatewayList() { - } - - /** - * Get the value property: The items on the page. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Get the nextLink property: URL to get the next page if 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/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkGatewayListResult.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkGatewayListResult.java new file mode 100644 index 0000000000000..00f444ee7ceba --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkGatewayListResult.java @@ -0,0 +1,80 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.avs.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.avs.fluent.models.WorkloadNetworkGatewayInner; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** + * The response of a WorkloadNetworkGateway list operation. + */ +@Fluent +public final class WorkloadNetworkGatewayListResult { + /* + * The WorkloadNetworkGateway items on this page + */ + @JsonProperty(value = "value", required = true) + private List value; + + /* + * The link to the next page of items + */ + @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) + private String nextLink; + + /** + * Creates an instance of WorkloadNetworkGatewayListResult class. + */ + public WorkloadNetworkGatewayListResult() { + } + + /** + * Get the value property: The WorkloadNetworkGateway items on this page. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Set the value property: The WorkloadNetworkGateway items on this page. + * + * @param value the value value to set. + * @return the WorkloadNetworkGatewayListResult object itself. + */ + public WorkloadNetworkGatewayListResult withValue(List value) { + this.value = value; + return this; + } + + /** + * Get the nextLink property: The link to the next page of items. + * + * @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) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + "Missing required property value in model WorkloadNetworkGatewayListResult")); + } else { + value().forEach(e -> e.validate()); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(WorkloadNetworkGatewayListResult.class); +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkList.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkList.java deleted file mode 100644 index dfeea962626ce..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkList.java +++ /dev/null @@ -1,59 +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.avs.models; - -import com.azure.core.annotation.Immutable; -import com.azure.resourcemanager.avs.fluent.models.WorkloadNetworkInner; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** A list of workload networks. */ -@Immutable -public final class WorkloadNetworkList { - /* - * The items on the page - */ - @JsonProperty(value = "value", access = JsonProperty.Access.WRITE_ONLY) - private List value; - - /* - * URL to get the next page if any - */ - @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) - private String nextLink; - - /** Creates an instance of WorkloadNetworkList class. */ - public WorkloadNetworkList() { - } - - /** - * Get the value property: The items on the page. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Get the nextLink property: URL to get the next page if 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/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkListResult.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkListResult.java new file mode 100644 index 0000000000000..5bb125697ce1f --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkListResult.java @@ -0,0 +1,80 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.avs.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.avs.fluent.models.WorkloadNetworkInner; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** + * The response of a WorkloadNetwork list operation. + */ +@Fluent +public final class WorkloadNetworkListResult { + /* + * The WorkloadNetwork items on this page + */ + @JsonProperty(value = "value", required = true) + private List value; + + /* + * The link to the next page of items + */ + @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) + private String nextLink; + + /** + * Creates an instance of WorkloadNetworkListResult class. + */ + public WorkloadNetworkListResult() { + } + + /** + * Get the value property: The WorkloadNetwork items on this page. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Set the value property: The WorkloadNetwork items on this page. + * + * @param value the value value to set. + * @return the WorkloadNetworkListResult object itself. + */ + public WorkloadNetworkListResult withValue(List value) { + this.value = value; + return this; + } + + /** + * Get the nextLink property: The link to the next page of items. + * + * @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) { + throw LOGGER.logExceptionAsError( + new IllegalArgumentException("Missing required property value in model WorkloadNetworkListResult")); + } else { + value().forEach(e -> e.validate()); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(WorkloadNetworkListResult.class); +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkName.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkName.java deleted file mode 100644 index 34ce7436ab362..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkName.java +++ /dev/null @@ -1,44 +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.avs.models; - -import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** Defines values for WorkloadNetworkName. */ -public final class WorkloadNetworkName extends ExpandableStringEnum { - /** Static value default for WorkloadNetworkName. */ - public static final WorkloadNetworkName DEFAULT = fromString("default"); - - /** - * Creates a new instance of WorkloadNetworkName value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public WorkloadNetworkName() { - } - - /** - * Creates or finds a WorkloadNetworkName from its string representation. - * - * @param name a name to look for. - * @return the corresponding WorkloadNetworkName. - */ - @JsonCreator - public static WorkloadNetworkName fromString(String name) { - return fromString(name, WorkloadNetworkName.class); - } - - /** - * Gets known WorkloadNetworkName values. - * - * @return known WorkloadNetworkName values. - */ - public static Collection values() { - return values(WorkloadNetworkName.class); - } -} diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkPortMirroring.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkPortMirroring.java index 7ebb0f556d94c..a446ad3bb3814 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkPortMirroring.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkPortMirroring.java @@ -4,111 +4,129 @@ package com.azure.resourcemanager.avs.models; +import com.azure.core.management.SystemData; import com.azure.core.util.Context; import com.azure.resourcemanager.avs.fluent.models.WorkloadNetworkPortMirroringInner; -/** An immutable client-side representation of WorkloadNetworkPortMirroring. */ +/** + * An immutable client-side representation of WorkloadNetworkPortMirroring. + */ public interface WorkloadNetworkPortMirroring { /** * Gets the id property: Fully qualified resource Id for the resource. - * + * * @return the id value. */ String id(); /** * Gets the name property: The name of the resource. - * + * * @return the name value. */ String name(); /** * Gets the type property: The type of the resource. - * + * * @return the type value. */ String type(); + /** + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + SystemData systemData(); + /** * Gets the displayName property: Display name of the port mirroring profile. - * + * * @return the displayName value. */ String displayName(); /** * Gets the direction property: Direction of port mirroring profile. - * + * * @return the direction value. */ PortMirroringDirectionEnum direction(); /** * Gets the source property: Source VM Group. - * + * * @return the source value. */ String source(); /** * Gets the destination property: Destination VM Group. - * + * * @return the destination value. */ String destination(); /** * Gets the status property: Port Mirroring Status. - * + * * @return the status value. */ PortMirroringStatusEnum status(); /** * Gets the provisioningState property: The provisioning state. - * + * * @return the provisioningState value. */ WorkloadNetworkPortMirroringProvisioningState provisioningState(); /** * Gets the revision property: NSX revision number. - * + * * @return the revision value. */ Long revision(); /** * Gets the name of the resource group. - * + * * @return the name of the resource group. */ String resourceGroupName(); /** * Gets the inner com.azure.resourcemanager.avs.fluent.models.WorkloadNetworkPortMirroringInner object. - * + * * @return the inner object. */ WorkloadNetworkPortMirroringInner innerModel(); - /** The entirety of the WorkloadNetworkPortMirroring definition. */ + /** + * The entirety of the WorkloadNetworkPortMirroring definition. + */ interface Definition extends DefinitionStages.Blank, DefinitionStages.WithParentResource, DefinitionStages.WithCreate { } - /** The WorkloadNetworkPortMirroring definition stages. */ + /** + * The WorkloadNetworkPortMirroring definition stages. + */ interface DefinitionStages { - /** The first stage of the WorkloadNetworkPortMirroring definition. */ + /** + * The first stage of the WorkloadNetworkPortMirroring definition. + */ interface Blank extends WithParentResource { } - /** The stage of the WorkloadNetworkPortMirroring definition allowing to specify parent resource. */ + /** + * The stage of the WorkloadNetworkPortMirroring definition allowing to specify parent resource. + */ interface WithParentResource { /** * Specifies resourceGroupName, privateCloudName. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. * @return the next definition stage. @@ -120,77 +138,83 @@ interface WithParentResource { * The stage of the WorkloadNetworkPortMirroring definition which contains all the minimum required properties * for the resource to be created, but also allows for any other optional properties to be specified. */ - interface WithCreate - extends DefinitionStages.WithDisplayName, - DefinitionStages.WithDirection, - DefinitionStages.WithSource, - DefinitionStages.WithDestination, - DefinitionStages.WithRevision { + interface WithCreate extends DefinitionStages.WithDisplayName, DefinitionStages.WithDirection, + DefinitionStages.WithSource, DefinitionStages.WithDestination, DefinitionStages.WithRevision { /** * Executes the create request. - * + * * @return the created resource. */ WorkloadNetworkPortMirroring create(); /** * Executes the create request. - * + * * @param context The context to associate with this operation. * @return the created resource. */ WorkloadNetworkPortMirroring create(Context context); } - /** The stage of the WorkloadNetworkPortMirroring definition allowing to specify displayName. */ + /** + * The stage of the WorkloadNetworkPortMirroring definition allowing to specify displayName. + */ interface WithDisplayName { /** * Specifies the displayName property: Display name of the port mirroring profile.. - * + * * @param displayName Display name of the port mirroring profile. * @return the next definition stage. */ WithCreate withDisplayName(String displayName); } - /** The stage of the WorkloadNetworkPortMirroring definition allowing to specify direction. */ + /** + * The stage of the WorkloadNetworkPortMirroring definition allowing to specify direction. + */ interface WithDirection { /** * Specifies the direction property: Direction of port mirroring profile.. - * + * * @param direction Direction of port mirroring profile. * @return the next definition stage. */ WithCreate withDirection(PortMirroringDirectionEnum direction); } - /** The stage of the WorkloadNetworkPortMirroring definition allowing to specify source. */ + /** + * The stage of the WorkloadNetworkPortMirroring definition allowing to specify source. + */ interface WithSource { /** * Specifies the source property: Source VM Group.. - * + * * @param source Source VM Group. * @return the next definition stage. */ WithCreate withSource(String source); } - /** The stage of the WorkloadNetworkPortMirroring definition allowing to specify destination. */ + /** + * The stage of the WorkloadNetworkPortMirroring definition allowing to specify destination. + */ interface WithDestination { /** * Specifies the destination property: Destination VM Group.. - * + * * @param destination Destination VM Group. * @return the next definition stage. */ WithCreate withDestination(String destination); } - /** The stage of the WorkloadNetworkPortMirroring definition allowing to specify revision. */ + /** + * The stage of the WorkloadNetworkPortMirroring definition allowing to specify revision. + */ interface WithRevision { /** * Specifies the revision property: NSX revision number.. - * + * * @param revision NSX revision number. * @return the next definition stage. */ @@ -200,85 +224,95 @@ interface WithRevision { /** * Begins update for the WorkloadNetworkPortMirroring resource. - * + * * @return the stage of resource update. */ WorkloadNetworkPortMirroring.Update update(); - /** The template for WorkloadNetworkPortMirroring update. */ - interface Update - extends UpdateStages.WithDisplayName, - UpdateStages.WithDirection, - UpdateStages.WithSource, - UpdateStages.WithDestination, - UpdateStages.WithRevision { + /** + * The template for WorkloadNetworkPortMirroring update. + */ + interface Update extends UpdateStages.WithDisplayName, UpdateStages.WithDirection, UpdateStages.WithSource, + UpdateStages.WithDestination, UpdateStages.WithRevision { /** * Executes the update request. - * + * * @return the updated resource. */ WorkloadNetworkPortMirroring apply(); /** * Executes the update request. - * + * * @param context The context to associate with this operation. * @return the updated resource. */ WorkloadNetworkPortMirroring apply(Context context); } - /** The WorkloadNetworkPortMirroring update stages. */ + /** + * The WorkloadNetworkPortMirroring update stages. + */ interface UpdateStages { - /** The stage of the WorkloadNetworkPortMirroring update allowing to specify displayName. */ + /** + * The stage of the WorkloadNetworkPortMirroring update allowing to specify displayName. + */ interface WithDisplayName { /** * Specifies the displayName property: Display name of the port mirroring profile.. - * + * * @param displayName Display name of the port mirroring profile. * @return the next definition stage. */ Update withDisplayName(String displayName); } - /** The stage of the WorkloadNetworkPortMirroring update allowing to specify direction. */ + /** + * The stage of the WorkloadNetworkPortMirroring update allowing to specify direction. + */ interface WithDirection { /** * Specifies the direction property: Direction of port mirroring profile.. - * + * * @param direction Direction of port mirroring profile. * @return the next definition stage. */ Update withDirection(PortMirroringDirectionEnum direction); } - /** The stage of the WorkloadNetworkPortMirroring update allowing to specify source. */ + /** + * The stage of the WorkloadNetworkPortMirroring update allowing to specify source. + */ interface WithSource { /** * Specifies the source property: Source VM Group.. - * + * * @param source Source VM Group. * @return the next definition stage. */ Update withSource(String source); } - /** The stage of the WorkloadNetworkPortMirroring update allowing to specify destination. */ + /** + * The stage of the WorkloadNetworkPortMirroring update allowing to specify destination. + */ interface WithDestination { /** * Specifies the destination property: Destination VM Group.. - * + * * @param destination Destination VM Group. * @return the next definition stage. */ Update withDestination(String destination); } - /** The stage of the WorkloadNetworkPortMirroring update allowing to specify revision. */ + /** + * The stage of the WorkloadNetworkPortMirroring update allowing to specify revision. + */ interface WithRevision { /** * Specifies the revision property: NSX revision number.. - * + * * @param revision NSX revision number. * @return the next definition stage. */ @@ -288,14 +322,14 @@ interface WithRevision { /** * Refreshes the resource to sync with Azure. - * + * * @return the refreshed resource. */ WorkloadNetworkPortMirroring refresh(); /** * Refreshes the resource to sync with Azure. - * + * * @param context The context to associate with this operation. * @return the refreshed resource. */ diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkPortMirroringList.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkPortMirroringList.java deleted file mode 100644 index 516774fb18195..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkPortMirroringList.java +++ /dev/null @@ -1,59 +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.avs.models; - -import com.azure.core.annotation.Immutable; -import com.azure.resourcemanager.avs.fluent.models.WorkloadNetworkPortMirroringInner; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** A list of NSX Port Mirroring. */ -@Immutable -public final class WorkloadNetworkPortMirroringList { - /* - * The items on the page - */ - @JsonProperty(value = "value", access = JsonProperty.Access.WRITE_ONLY) - private List value; - - /* - * URL to get the next page if any - */ - @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) - private String nextLink; - - /** Creates an instance of WorkloadNetworkPortMirroringList class. */ - public WorkloadNetworkPortMirroringList() { - } - - /** - * Get the value property: The items on the page. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Get the nextLink property: URL to get the next page if 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/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkPortMirroringListResult.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkPortMirroringListResult.java new file mode 100644 index 0000000000000..7c14a99b0cf19 --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkPortMirroringListResult.java @@ -0,0 +1,80 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.avs.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.avs.fluent.models.WorkloadNetworkPortMirroringInner; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** + * The response of a WorkloadNetworkPortMirroring list operation. + */ +@Fluent +public final class WorkloadNetworkPortMirroringListResult { + /* + * The WorkloadNetworkPortMirroring items on this page + */ + @JsonProperty(value = "value", required = true) + private List value; + + /* + * The link to the next page of items + */ + @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) + private String nextLink; + + /** + * Creates an instance of WorkloadNetworkPortMirroringListResult class. + */ + public WorkloadNetworkPortMirroringListResult() { + } + + /** + * Get the value property: The WorkloadNetworkPortMirroring items on this page. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Set the value property: The WorkloadNetworkPortMirroring items on this page. + * + * @param value the value value to set. + * @return the WorkloadNetworkPortMirroringListResult object itself. + */ + public WorkloadNetworkPortMirroringListResult withValue(List value) { + this.value = value; + return this; + } + + /** + * Get the nextLink property: The link to the next page of items. + * + * @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) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + "Missing required property value in model WorkloadNetworkPortMirroringListResult")); + } else { + value().forEach(e -> e.validate()); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(WorkloadNetworkPortMirroringListResult.class); +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkPortMirroringProvisioningState.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkPortMirroringProvisioningState.java index c952771473563..6cccaf7af476c 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkPortMirroringProvisioningState.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkPortMirroringProvisioningState.java @@ -8,30 +8,44 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** The provisioning state. */ +/** + * Workload Network Port Mirroring provisioning state. + */ public final class WorkloadNetworkPortMirroringProvisioningState extends ExpandableStringEnum { - /** Static value Succeeded for WorkloadNetworkPortMirroringProvisioningState. */ + /** + * Static value Succeeded for WorkloadNetworkPortMirroringProvisioningState. + */ public static final WorkloadNetworkPortMirroringProvisioningState SUCCEEDED = fromString("Succeeded"); - /** Static value Failed for WorkloadNetworkPortMirroringProvisioningState. */ + /** + * Static value Failed for WorkloadNetworkPortMirroringProvisioningState. + */ public static final WorkloadNetworkPortMirroringProvisioningState FAILED = fromString("Failed"); - /** Static value Building for WorkloadNetworkPortMirroringProvisioningState. */ + /** + * Static value Canceled for WorkloadNetworkPortMirroringProvisioningState. + */ + public static final WorkloadNetworkPortMirroringProvisioningState CANCELED = fromString("Canceled"); + + /** + * Static value Building for WorkloadNetworkPortMirroringProvisioningState. + */ public static final WorkloadNetworkPortMirroringProvisioningState BUILDING = fromString("Building"); - /** Static value Deleting for WorkloadNetworkPortMirroringProvisioningState. */ + /** + * Static value Deleting for WorkloadNetworkPortMirroringProvisioningState. + */ public static final WorkloadNetworkPortMirroringProvisioningState DELETING = fromString("Deleting"); - /** Static value Updating for WorkloadNetworkPortMirroringProvisioningState. */ + /** + * Static value Updating for WorkloadNetworkPortMirroringProvisioningState. + */ public static final WorkloadNetworkPortMirroringProvisioningState UPDATING = fromString("Updating"); - /** Static value Canceled for WorkloadNetworkPortMirroringProvisioningState. */ - public static final WorkloadNetworkPortMirroringProvisioningState CANCELED = fromString("Canceled"); - /** * Creates a new instance of WorkloadNetworkPortMirroringProvisioningState value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -40,7 +54,7 @@ public WorkloadNetworkPortMirroringProvisioningState() { /** * Creates or finds a WorkloadNetworkPortMirroringProvisioningState from its string representation. - * + * * @param name a name to look for. * @return the corresponding WorkloadNetworkPortMirroringProvisioningState. */ @@ -51,7 +65,7 @@ public static WorkloadNetworkPortMirroringProvisioningState fromString(String na /** * Gets known WorkloadNetworkPortMirroringProvisioningState values. - * + * * @return known WorkloadNetworkPortMirroringProvisioningState values. */ public static Collection values() { diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkPortMirroringUpdate.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkPortMirroringUpdate.java new file mode 100644 index 0000000000000..96a1711dbcec0 --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkPortMirroringUpdate.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.avs.models; + +import com.azure.core.annotation.Fluent; +import com.azure.resourcemanager.avs.fluent.models.WorkloadNetworkPortMirroringProperties; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * NSX Port Mirroring update. + */ +@Fluent +public final class WorkloadNetworkPortMirroringUpdate { + /* + * The updatable properties of a Port Mirroring update + */ + @JsonProperty(value = "properties") + private WorkloadNetworkPortMirroringProperties innerProperties; + + /** + * Creates an instance of WorkloadNetworkPortMirroringUpdate class. + */ + public WorkloadNetworkPortMirroringUpdate() { + } + + /** + * Get the innerProperties property: The updatable properties of a Port Mirroring update. + * + * @return the innerProperties value. + */ + private WorkloadNetworkPortMirroringProperties innerProperties() { + return this.innerProperties; + } + + /** + * Get the displayName property: Display name of the port mirroring profile. + * + * @return the displayName value. + */ + public String displayName() { + return this.innerProperties() == null ? null : this.innerProperties().displayName(); + } + + /** + * Set the displayName property: Display name of the port mirroring profile. + * + * @param displayName the displayName value to set. + * @return the WorkloadNetworkPortMirroringUpdate object itself. + */ + public WorkloadNetworkPortMirroringUpdate withDisplayName(String displayName) { + if (this.innerProperties() == null) { + this.innerProperties = new WorkloadNetworkPortMirroringProperties(); + } + this.innerProperties().withDisplayName(displayName); + return this; + } + + /** + * Get the direction property: Direction of port mirroring profile. + * + * @return the direction value. + */ + public PortMirroringDirectionEnum direction() { + return this.innerProperties() == null ? null : this.innerProperties().direction(); + } + + /** + * Set the direction property: Direction of port mirroring profile. + * + * @param direction the direction value to set. + * @return the WorkloadNetworkPortMirroringUpdate object itself. + */ + public WorkloadNetworkPortMirroringUpdate withDirection(PortMirroringDirectionEnum direction) { + if (this.innerProperties() == null) { + this.innerProperties = new WorkloadNetworkPortMirroringProperties(); + } + this.innerProperties().withDirection(direction); + return this; + } + + /** + * Get the source property: Source VM Group. + * + * @return the source value. + */ + public String source() { + return this.innerProperties() == null ? null : this.innerProperties().source(); + } + + /** + * Set the source property: Source VM Group. + * + * @param source the source value to set. + * @return the WorkloadNetworkPortMirroringUpdate object itself. + */ + public WorkloadNetworkPortMirroringUpdate withSource(String source) { + if (this.innerProperties() == null) { + this.innerProperties = new WorkloadNetworkPortMirroringProperties(); + } + this.innerProperties().withSource(source); + return this; + } + + /** + * Get the destination property: Destination VM Group. + * + * @return the destination value. + */ + public String destination() { + return this.innerProperties() == null ? null : this.innerProperties().destination(); + } + + /** + * Set the destination property: Destination VM Group. + * + * @param destination the destination value to set. + * @return the WorkloadNetworkPortMirroringUpdate object itself. + */ + public WorkloadNetworkPortMirroringUpdate withDestination(String destination) { + if (this.innerProperties() == null) { + this.innerProperties = new WorkloadNetworkPortMirroringProperties(); + } + this.innerProperties().withDestination(destination); + return this; + } + + /** + * Get the status property: Port Mirroring Status. + * + * @return the status value. + */ + public PortMirroringStatusEnum status() { + return this.innerProperties() == null ? null : this.innerProperties().status(); + } + + /** + * Get the provisioningState property: The provisioning state. + * + * @return the provisioningState value. + */ + public WorkloadNetworkPortMirroringProvisioningState provisioningState() { + return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); + } + + /** + * Get the revision property: NSX revision number. + * + * @return the revision value. + */ + public Long revision() { + return this.innerProperties() == null ? null : this.innerProperties().revision(); + } + + /** + * Set the revision property: NSX revision number. + * + * @param revision the revision value to set. + * @return the WorkloadNetworkPortMirroringUpdate object itself. + */ + public WorkloadNetworkPortMirroringUpdate withRevision(Long revision) { + if (this.innerProperties() == null) { + this.innerProperties = new WorkloadNetworkPortMirroringProperties(); + } + this.innerProperties().withRevision(revision); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (innerProperties() != null) { + innerProperties().validate(); + } + } +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkProvisioningState.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkProvisioningState.java new file mode 100644 index 0000000000000..e778437720aa2 --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkProvisioningState.java @@ -0,0 +1,73 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.avs.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** + * base Workload Network provisioning state. + */ +public final class WorkloadNetworkProvisioningState extends ExpandableStringEnum { + /** + * Static value Succeeded for WorkloadNetworkProvisioningState. + */ + public static final WorkloadNetworkProvisioningState SUCCEEDED = fromString("Succeeded"); + + /** + * Static value Failed for WorkloadNetworkProvisioningState. + */ + public static final WorkloadNetworkProvisioningState FAILED = fromString("Failed"); + + /** + * Static value Canceled for WorkloadNetworkProvisioningState. + */ + public static final WorkloadNetworkProvisioningState CANCELED = fromString("Canceled"); + + /** + * Static value Building for WorkloadNetworkProvisioningState. + */ + public static final WorkloadNetworkProvisioningState BUILDING = fromString("Building"); + + /** + * Static value Deleting for WorkloadNetworkProvisioningState. + */ + public static final WorkloadNetworkProvisioningState DELETING = fromString("Deleting"); + + /** + * Static value Updating for WorkloadNetworkProvisioningState. + */ + public static final WorkloadNetworkProvisioningState UPDATING = fromString("Updating"); + + /** + * Creates a new instance of WorkloadNetworkProvisioningState value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public WorkloadNetworkProvisioningState() { + } + + /** + * Creates or finds a WorkloadNetworkProvisioningState from its string representation. + * + * @param name a name to look for. + * @return the corresponding WorkloadNetworkProvisioningState. + */ + @JsonCreator + public static WorkloadNetworkProvisioningState fromString(String name) { + return fromString(name, WorkloadNetworkProvisioningState.class); + } + + /** + * Gets known WorkloadNetworkProvisioningState values. + * + * @return known WorkloadNetworkProvisioningState values. + */ + public static Collection values() { + return values(WorkloadNetworkProvisioningState.class); + } +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkPublicIPsList.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkPublicIPsList.java deleted file mode 100644 index 6dffca84e92e2..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkPublicIPsList.java +++ /dev/null @@ -1,59 +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.avs.models; - -import com.azure.core.annotation.Immutable; -import com.azure.resourcemanager.avs.fluent.models.WorkloadNetworkPublicIpInner; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** A list of NSX Public IP Blocks. */ -@Immutable -public final class WorkloadNetworkPublicIPsList { - /* - * The items on the page - */ - @JsonProperty(value = "value", access = JsonProperty.Access.WRITE_ONLY) - private List value; - - /* - * URL to get the next page if any - */ - @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) - private String nextLink; - - /** Creates an instance of WorkloadNetworkPublicIPsList class. */ - public WorkloadNetworkPublicIPsList() { - } - - /** - * Get the value property: The items on the page. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Get the nextLink property: URL to get the next page if 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/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkPublicIp.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkPublicIp.java index 45d9a0b9ded21..fada5305c0ad5 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkPublicIp.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkPublicIp.java @@ -4,83 +4,101 @@ package com.azure.resourcemanager.avs.models; +import com.azure.core.management.SystemData; import com.azure.core.util.Context; import com.azure.resourcemanager.avs.fluent.models.WorkloadNetworkPublicIpInner; -/** An immutable client-side representation of WorkloadNetworkPublicIp. */ +/** + * An immutable client-side representation of WorkloadNetworkPublicIp. + */ public interface WorkloadNetworkPublicIp { /** * Gets the id property: Fully qualified resource Id for the resource. - * + * * @return the id value. */ String id(); /** * Gets the name property: The name of the resource. - * + * * @return the name value. */ String name(); /** * Gets the type property: The type of the resource. - * + * * @return the type value. */ String type(); + /** + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + SystemData systemData(); + /** * Gets the displayName property: Display name of the Public IP Block. - * + * * @return the displayName value. */ String displayName(); /** * Gets the numberOfPublicIPs property: Number of Public IPs requested. - * + * * @return the numberOfPublicIPs value. */ Long numberOfPublicIPs(); /** * Gets the publicIpBlock property: CIDR Block of the Public IP Block. - * + * * @return the publicIpBlock value. */ String publicIpBlock(); /** * Gets the provisioningState property: The provisioning state. - * + * * @return the provisioningState value. */ WorkloadNetworkPublicIpProvisioningState provisioningState(); /** * Gets the inner com.azure.resourcemanager.avs.fluent.models.WorkloadNetworkPublicIpInner object. - * + * * @return the inner object. */ WorkloadNetworkPublicIpInner innerModel(); - /** The entirety of the WorkloadNetworkPublicIp definition. */ + /** + * The entirety of the WorkloadNetworkPublicIp definition. + */ interface Definition extends DefinitionStages.Blank, DefinitionStages.WithParentResource, DefinitionStages.WithCreate { } - /** The WorkloadNetworkPublicIp definition stages. */ + /** + * The WorkloadNetworkPublicIp definition stages. + */ interface DefinitionStages { - /** The first stage of the WorkloadNetworkPublicIp definition. */ + /** + * The first stage of the WorkloadNetworkPublicIp definition. + */ interface Blank extends WithParentResource { } - /** The stage of the WorkloadNetworkPublicIp definition allowing to specify parent resource. */ + /** + * The stage of the WorkloadNetworkPublicIp definition allowing to specify parent resource. + */ interface WithParentResource { /** * Specifies resourceGroupName, privateCloudName. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. * @return the next definition stage. @@ -95,36 +113,40 @@ interface WithParentResource { interface WithCreate extends DefinitionStages.WithDisplayName, DefinitionStages.WithNumberOfPublicIPs { /** * Executes the create request. - * + * * @return the created resource. */ WorkloadNetworkPublicIp create(); /** * Executes the create request. - * + * * @param context The context to associate with this operation. * @return the created resource. */ WorkloadNetworkPublicIp create(Context context); } - /** The stage of the WorkloadNetworkPublicIp definition allowing to specify displayName. */ + /** + * The stage of the WorkloadNetworkPublicIp definition allowing to specify displayName. + */ interface WithDisplayName { /** * Specifies the displayName property: Display name of the Public IP Block.. - * + * * @param displayName Display name of the Public IP Block. * @return the next definition stage. */ WithCreate withDisplayName(String displayName); } - /** The stage of the WorkloadNetworkPublicIp definition allowing to specify numberOfPublicIPs. */ + /** + * The stage of the WorkloadNetworkPublicIp definition allowing to specify numberOfPublicIPs. + */ interface WithNumberOfPublicIPs { /** * Specifies the numberOfPublicIPs property: Number of Public IPs requested.. - * + * * @param numberOfPublicIPs Number of Public IPs requested. * @return the next definition stage. */ @@ -134,14 +156,14 @@ interface WithNumberOfPublicIPs { /** * Refreshes the resource to sync with Azure. - * + * * @return the refreshed resource. */ WorkloadNetworkPublicIp refresh(); /** * Refreshes the resource to sync with Azure. - * + * * @param context The context to associate with this operation. * @return the refreshed resource. */ diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkPublicIpListResult.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkPublicIpListResult.java new file mode 100644 index 0000000000000..0f0d610da0a14 --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkPublicIpListResult.java @@ -0,0 +1,80 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.avs.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.avs.fluent.models.WorkloadNetworkPublicIpInner; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** + * The response of a WorkloadNetworkPublicIP list operation. + */ +@Fluent +public final class WorkloadNetworkPublicIpListResult { + /* + * The WorkloadNetworkPublicIP items on this page + */ + @JsonProperty(value = "value", required = true) + private List value; + + /* + * The link to the next page of items + */ + @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) + private String nextLink; + + /** + * Creates an instance of WorkloadNetworkPublicIpListResult class. + */ + public WorkloadNetworkPublicIpListResult() { + } + + /** + * Get the value property: The WorkloadNetworkPublicIP items on this page. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Set the value property: The WorkloadNetworkPublicIP items on this page. + * + * @param value the value value to set. + * @return the WorkloadNetworkPublicIpListResult object itself. + */ + public WorkloadNetworkPublicIpListResult withValue(List value) { + this.value = value; + return this; + } + + /** + * Get the nextLink property: The link to the next page of items. + * + * @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) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + "Missing required property value in model WorkloadNetworkPublicIpListResult")); + } else { + value().forEach(e -> e.validate()); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(WorkloadNetworkPublicIpListResult.class); +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkPublicIpProvisioningState.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkPublicIpProvisioningState.java index 66d02384486ad..59f992d352d46 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkPublicIpProvisioningState.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkPublicIpProvisioningState.java @@ -8,30 +8,44 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** The provisioning state. */ +/** + * Workload Network Public IP provisioning state. + */ public final class WorkloadNetworkPublicIpProvisioningState extends ExpandableStringEnum { - /** Static value Succeeded for WorkloadNetworkPublicIpProvisioningState. */ + /** + * Static value Succeeded for WorkloadNetworkPublicIpProvisioningState. + */ public static final WorkloadNetworkPublicIpProvisioningState SUCCEEDED = fromString("Succeeded"); - /** Static value Failed for WorkloadNetworkPublicIpProvisioningState. */ + /** + * Static value Failed for WorkloadNetworkPublicIpProvisioningState. + */ public static final WorkloadNetworkPublicIpProvisioningState FAILED = fromString("Failed"); - /** Static value Building for WorkloadNetworkPublicIpProvisioningState. */ + /** + * Static value Canceled for WorkloadNetworkPublicIpProvisioningState. + */ + public static final WorkloadNetworkPublicIpProvisioningState CANCELED = fromString("Canceled"); + + /** + * Static value Building for WorkloadNetworkPublicIpProvisioningState. + */ public static final WorkloadNetworkPublicIpProvisioningState BUILDING = fromString("Building"); - /** Static value Deleting for WorkloadNetworkPublicIpProvisioningState. */ + /** + * Static value Deleting for WorkloadNetworkPublicIpProvisioningState. + */ public static final WorkloadNetworkPublicIpProvisioningState DELETING = fromString("Deleting"); - /** Static value Updating for WorkloadNetworkPublicIpProvisioningState. */ + /** + * Static value Updating for WorkloadNetworkPublicIpProvisioningState. + */ public static final WorkloadNetworkPublicIpProvisioningState UPDATING = fromString("Updating"); - /** Static value Canceled for WorkloadNetworkPublicIpProvisioningState. */ - public static final WorkloadNetworkPublicIpProvisioningState CANCELED = fromString("Canceled"); - /** * Creates a new instance of WorkloadNetworkPublicIpProvisioningState value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -40,7 +54,7 @@ public WorkloadNetworkPublicIpProvisioningState() { /** * Creates or finds a WorkloadNetworkPublicIpProvisioningState from its string representation. - * + * * @param name a name to look for. * @return the corresponding WorkloadNetworkPublicIpProvisioningState. */ @@ -51,7 +65,7 @@ public static WorkloadNetworkPublicIpProvisioningState fromString(String name) { /** * Gets known WorkloadNetworkPublicIpProvisioningState values. - * + * * @return known WorkloadNetworkPublicIpProvisioningState values. */ public static Collection values() { diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkSegment.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkSegment.java index b990fecdd0301..47bcaa0510d61 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkSegment.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkSegment.java @@ -4,112 +4,130 @@ package com.azure.resourcemanager.avs.models; +import com.azure.core.management.SystemData; import com.azure.core.util.Context; import com.azure.resourcemanager.avs.fluent.models.WorkloadNetworkSegmentInner; import java.util.List; -/** An immutable client-side representation of WorkloadNetworkSegment. */ +/** + * An immutable client-side representation of WorkloadNetworkSegment. + */ public interface WorkloadNetworkSegment { /** * Gets the id property: Fully qualified resource Id for the resource. - * + * * @return the id value. */ String id(); /** * Gets the name property: The name of the resource. - * + * * @return the name value. */ String name(); /** * Gets the type property: The type of the resource. - * + * * @return the type value. */ String type(); + /** + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + SystemData systemData(); + /** * Gets the displayName property: Display name of the segment. - * + * * @return the displayName value. */ String displayName(); /** * Gets the connectedGateway property: Gateway which to connect segment to. - * + * * @return the connectedGateway value. */ String connectedGateway(); /** * Gets the subnet property: Subnet which to connect segment to. - * + * * @return the subnet value. */ WorkloadNetworkSegmentSubnet subnet(); /** * Gets the portVif property: Port Vif which segment is associated with. - * + * * @return the portVif value. */ List portVif(); /** * Gets the status property: Segment status. - * + * * @return the status value. */ SegmentStatusEnum status(); /** * Gets the provisioningState property: The provisioning state. - * + * * @return the provisioningState value. */ WorkloadNetworkSegmentProvisioningState provisioningState(); /** * Gets the revision property: NSX revision number. - * + * * @return the revision value. */ Long revision(); /** * Gets the name of the resource group. - * + * * @return the name of the resource group. */ String resourceGroupName(); /** * Gets the inner com.azure.resourcemanager.avs.fluent.models.WorkloadNetworkSegmentInner object. - * + * * @return the inner object. */ WorkloadNetworkSegmentInner innerModel(); - /** The entirety of the WorkloadNetworkSegment definition. */ + /** + * The entirety of the WorkloadNetworkSegment definition. + */ interface Definition extends DefinitionStages.Blank, DefinitionStages.WithParentResource, DefinitionStages.WithCreate { } - /** The WorkloadNetworkSegment definition stages. */ + /** + * The WorkloadNetworkSegment definition stages. + */ interface DefinitionStages { - /** The first stage of the WorkloadNetworkSegment definition. */ + /** + * The first stage of the WorkloadNetworkSegment definition. + */ interface Blank extends WithParentResource { } - /** The stage of the WorkloadNetworkSegment definition allowing to specify parent resource. */ + /** + * The stage of the WorkloadNetworkSegment definition allowing to specify parent resource. + */ interface WithParentResource { /** * Specifies resourceGroupName, privateCloudName. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. * @return the next definition stage. @@ -121,65 +139,70 @@ interface WithParentResource { * The stage of the WorkloadNetworkSegment definition which contains all the minimum required properties for the * resource to be created, but also allows for any other optional properties to be specified. */ - interface WithCreate - extends DefinitionStages.WithDisplayName, - DefinitionStages.WithConnectedGateway, - DefinitionStages.WithSubnet, - DefinitionStages.WithRevision { + interface WithCreate extends DefinitionStages.WithDisplayName, DefinitionStages.WithConnectedGateway, + DefinitionStages.WithSubnet, DefinitionStages.WithRevision { /** * Executes the create request. - * + * * @return the created resource. */ WorkloadNetworkSegment create(); /** * Executes the create request. - * + * * @param context The context to associate with this operation. * @return the created resource. */ WorkloadNetworkSegment create(Context context); } - /** The stage of the WorkloadNetworkSegment definition allowing to specify displayName. */ + /** + * The stage of the WorkloadNetworkSegment definition allowing to specify displayName. + */ interface WithDisplayName { /** * Specifies the displayName property: Display name of the segment.. - * + * * @param displayName Display name of the segment. * @return the next definition stage. */ WithCreate withDisplayName(String displayName); } - /** The stage of the WorkloadNetworkSegment definition allowing to specify connectedGateway. */ + /** + * The stage of the WorkloadNetworkSegment definition allowing to specify connectedGateway. + */ interface WithConnectedGateway { /** * Specifies the connectedGateway property: Gateway which to connect segment to.. - * + * * @param connectedGateway Gateway which to connect segment to. * @return the next definition stage. */ WithCreate withConnectedGateway(String connectedGateway); } - /** The stage of the WorkloadNetworkSegment definition allowing to specify subnet. */ + /** + * The stage of the WorkloadNetworkSegment definition allowing to specify subnet. + */ interface WithSubnet { /** * Specifies the subnet property: Subnet which to connect segment to.. - * + * * @param subnet Subnet which to connect segment to. * @return the next definition stage. */ WithCreate withSubnet(WorkloadNetworkSegmentSubnet subnet); } - /** The stage of the WorkloadNetworkSegment definition allowing to specify revision. */ + /** + * The stage of the WorkloadNetworkSegment definition allowing to specify revision. + */ interface WithRevision { /** * Specifies the revision property: NSX revision number.. - * + * * @param revision NSX revision number. * @return the next definition stage. */ @@ -189,73 +212,82 @@ interface WithRevision { /** * Begins update for the WorkloadNetworkSegment resource. - * + * * @return the stage of resource update. */ WorkloadNetworkSegment.Update update(); - /** The template for WorkloadNetworkSegment update. */ - interface Update - extends UpdateStages.WithDisplayName, - UpdateStages.WithConnectedGateway, - UpdateStages.WithSubnet, - UpdateStages.WithRevision { + /** + * The template for WorkloadNetworkSegment update. + */ + interface Update extends UpdateStages.WithDisplayName, UpdateStages.WithConnectedGateway, UpdateStages.WithSubnet, + UpdateStages.WithRevision { /** * Executes the update request. - * + * * @return the updated resource. */ WorkloadNetworkSegment apply(); /** * Executes the update request. - * + * * @param context The context to associate with this operation. * @return the updated resource. */ WorkloadNetworkSegment apply(Context context); } - /** The WorkloadNetworkSegment update stages. */ + /** + * The WorkloadNetworkSegment update stages. + */ interface UpdateStages { - /** The stage of the WorkloadNetworkSegment update allowing to specify displayName. */ + /** + * The stage of the WorkloadNetworkSegment update allowing to specify displayName. + */ interface WithDisplayName { /** * Specifies the displayName property: Display name of the segment.. - * + * * @param displayName Display name of the segment. * @return the next definition stage. */ Update withDisplayName(String displayName); } - /** The stage of the WorkloadNetworkSegment update allowing to specify connectedGateway. */ + /** + * The stage of the WorkloadNetworkSegment update allowing to specify connectedGateway. + */ interface WithConnectedGateway { /** * Specifies the connectedGateway property: Gateway which to connect segment to.. - * + * * @param connectedGateway Gateway which to connect segment to. * @return the next definition stage. */ Update withConnectedGateway(String connectedGateway); } - /** The stage of the WorkloadNetworkSegment update allowing to specify subnet. */ + /** + * The stage of the WorkloadNetworkSegment update allowing to specify subnet. + */ interface WithSubnet { /** * Specifies the subnet property: Subnet which to connect segment to.. - * + * * @param subnet Subnet which to connect segment to. * @return the next definition stage. */ Update withSubnet(WorkloadNetworkSegmentSubnet subnet); } - /** The stage of the WorkloadNetworkSegment update allowing to specify revision. */ + /** + * The stage of the WorkloadNetworkSegment update allowing to specify revision. + */ interface WithRevision { /** * Specifies the revision property: NSX revision number.. - * + * * @param revision NSX revision number. * @return the next definition stage. */ @@ -265,14 +297,14 @@ interface WithRevision { /** * Refreshes the resource to sync with Azure. - * + * * @return the refreshed resource. */ WorkloadNetworkSegment refresh(); /** * Refreshes the resource to sync with Azure. - * + * * @param context The context to associate with this operation. * @return the refreshed resource. */ diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkSegmentListResult.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkSegmentListResult.java new file mode 100644 index 0000000000000..da16dbc96cb92 --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkSegmentListResult.java @@ -0,0 +1,80 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.avs.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.avs.fluent.models.WorkloadNetworkSegmentInner; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** + * The response of a WorkloadNetworkSegment list operation. + */ +@Fluent +public final class WorkloadNetworkSegmentListResult { + /* + * The WorkloadNetworkSegment items on this page + */ + @JsonProperty(value = "value", required = true) + private List value; + + /* + * The link to the next page of items + */ + @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) + private String nextLink; + + /** + * Creates an instance of WorkloadNetworkSegmentListResult class. + */ + public WorkloadNetworkSegmentListResult() { + } + + /** + * Get the value property: The WorkloadNetworkSegment items on this page. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Set the value property: The WorkloadNetworkSegment items on this page. + * + * @param value the value value to set. + * @return the WorkloadNetworkSegmentListResult object itself. + */ + public WorkloadNetworkSegmentListResult withValue(List value) { + this.value = value; + return this; + } + + /** + * Get the nextLink property: The link to the next page of items. + * + * @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) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + "Missing required property value in model WorkloadNetworkSegmentListResult")); + } else { + value().forEach(e -> e.validate()); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(WorkloadNetworkSegmentListResult.class); +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkSegmentPortVif.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkSegmentPortVif.java index 149673fa5dda7..4609a1a861c07 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkSegmentPortVif.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkSegmentPortVif.java @@ -7,7 +7,9 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; -/** Ports and any VIF attached to segment. */ +/** + * Ports and any VIF attached to segment. + */ @Fluent public final class WorkloadNetworkSegmentPortVif { /* @@ -16,13 +18,15 @@ public final class WorkloadNetworkSegmentPortVif { @JsonProperty(value = "portName") private String portName; - /** Creates an instance of WorkloadNetworkSegmentPortVif class. */ + /** + * Creates an instance of WorkloadNetworkSegmentPortVif class. + */ public WorkloadNetworkSegmentPortVif() { } /** * Get the portName property: Name of port or VIF attached to segment. - * + * * @return the portName value. */ public String portName() { @@ -31,7 +35,7 @@ public String portName() { /** * Set the portName property: Name of port or VIF attached to segment. - * + * * @param portName the portName value to set. * @return the WorkloadNetworkSegmentPortVif object itself. */ @@ -42,7 +46,7 @@ public WorkloadNetworkSegmentPortVif withPortName(String portName) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkSegmentProvisioningState.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkSegmentProvisioningState.java index 4342b4b55a7a3..683197c707e79 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkSegmentProvisioningState.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkSegmentProvisioningState.java @@ -8,30 +8,44 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** The provisioning state. */ +/** + * Workload Network Segment provisioning state. + */ public final class WorkloadNetworkSegmentProvisioningState extends ExpandableStringEnum { - /** Static value Succeeded for WorkloadNetworkSegmentProvisioningState. */ + /** + * Static value Succeeded for WorkloadNetworkSegmentProvisioningState. + */ public static final WorkloadNetworkSegmentProvisioningState SUCCEEDED = fromString("Succeeded"); - /** Static value Failed for WorkloadNetworkSegmentProvisioningState. */ + /** + * Static value Failed for WorkloadNetworkSegmentProvisioningState. + */ public static final WorkloadNetworkSegmentProvisioningState FAILED = fromString("Failed"); - /** Static value Building for WorkloadNetworkSegmentProvisioningState. */ + /** + * Static value Canceled for WorkloadNetworkSegmentProvisioningState. + */ + public static final WorkloadNetworkSegmentProvisioningState CANCELED = fromString("Canceled"); + + /** + * Static value Building for WorkloadNetworkSegmentProvisioningState. + */ public static final WorkloadNetworkSegmentProvisioningState BUILDING = fromString("Building"); - /** Static value Deleting for WorkloadNetworkSegmentProvisioningState. */ + /** + * Static value Deleting for WorkloadNetworkSegmentProvisioningState. + */ public static final WorkloadNetworkSegmentProvisioningState DELETING = fromString("Deleting"); - /** Static value Updating for WorkloadNetworkSegmentProvisioningState. */ + /** + * Static value Updating for WorkloadNetworkSegmentProvisioningState. + */ public static final WorkloadNetworkSegmentProvisioningState UPDATING = fromString("Updating"); - /** Static value Canceled for WorkloadNetworkSegmentProvisioningState. */ - public static final WorkloadNetworkSegmentProvisioningState CANCELED = fromString("Canceled"); - /** * Creates a new instance of WorkloadNetworkSegmentProvisioningState value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -40,7 +54,7 @@ public WorkloadNetworkSegmentProvisioningState() { /** * Creates or finds a WorkloadNetworkSegmentProvisioningState from its string representation. - * + * * @param name a name to look for. * @return the corresponding WorkloadNetworkSegmentProvisioningState. */ @@ -51,7 +65,7 @@ public static WorkloadNetworkSegmentProvisioningState fromString(String name) { /** * Gets known WorkloadNetworkSegmentProvisioningState values. - * + * * @return known WorkloadNetworkSegmentProvisioningState values. */ public static Collection values() { diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkSegmentSubnet.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkSegmentSubnet.java index bc57151382bd0..86e5e3ebeeac1 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkSegmentSubnet.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkSegmentSubnet.java @@ -8,7 +8,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** Subnet configuration for segment. */ +/** + * Subnet configuration for segment. + */ @Fluent public final class WorkloadNetworkSegmentSubnet { /* @@ -23,13 +25,15 @@ public final class WorkloadNetworkSegmentSubnet { @JsonProperty(value = "gatewayAddress") private String gatewayAddress; - /** Creates an instance of WorkloadNetworkSegmentSubnet class. */ + /** + * Creates an instance of WorkloadNetworkSegmentSubnet class. + */ public WorkloadNetworkSegmentSubnet() { } /** * Get the dhcpRanges property: DHCP Range assigned for subnet. - * + * * @return the dhcpRanges value. */ public List dhcpRanges() { @@ -38,7 +42,7 @@ public List dhcpRanges() { /** * Set the dhcpRanges property: DHCP Range assigned for subnet. - * + * * @param dhcpRanges the dhcpRanges value to set. * @return the WorkloadNetworkSegmentSubnet object itself. */ @@ -49,7 +53,7 @@ public WorkloadNetworkSegmentSubnet withDhcpRanges(List dhcpRanges) { /** * Get the gatewayAddress property: Gateway address. - * + * * @return the gatewayAddress value. */ public String gatewayAddress() { @@ -58,7 +62,7 @@ public String gatewayAddress() { /** * Set the gatewayAddress property: Gateway address. - * + * * @param gatewayAddress the gatewayAddress value to set. * @return the WorkloadNetworkSegmentSubnet object itself. */ @@ -69,7 +73,7 @@ public WorkloadNetworkSegmentSubnet withGatewayAddress(String gatewayAddress) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkSegmentUpdate.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkSegmentUpdate.java new file mode 100644 index 0000000000000..7aef4a7ac55d7 --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkSegmentUpdate.java @@ -0,0 +1,167 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.avs.models; + +import com.azure.core.annotation.Fluent; +import com.azure.resourcemanager.avs.fluent.models.WorkloadNetworkSegmentProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** + * NSX Segment update. + */ +@Fluent +public final class WorkloadNetworkSegmentUpdate { + /* + * The updatable properties of a Segment update + */ + @JsonProperty(value = "properties") + private WorkloadNetworkSegmentProperties innerProperties; + + /** + * Creates an instance of WorkloadNetworkSegmentUpdate class. + */ + public WorkloadNetworkSegmentUpdate() { + } + + /** + * Get the innerProperties property: The updatable properties of a Segment update. + * + * @return the innerProperties value. + */ + private WorkloadNetworkSegmentProperties innerProperties() { + return this.innerProperties; + } + + /** + * Get the displayName property: Display name of the segment. + * + * @return the displayName value. + */ + public String displayName() { + return this.innerProperties() == null ? null : this.innerProperties().displayName(); + } + + /** + * Set the displayName property: Display name of the segment. + * + * @param displayName the displayName value to set. + * @return the WorkloadNetworkSegmentUpdate object itself. + */ + public WorkloadNetworkSegmentUpdate withDisplayName(String displayName) { + if (this.innerProperties() == null) { + this.innerProperties = new WorkloadNetworkSegmentProperties(); + } + this.innerProperties().withDisplayName(displayName); + return this; + } + + /** + * Get the connectedGateway property: Gateway which to connect segment to. + * + * @return the connectedGateway value. + */ + public String connectedGateway() { + return this.innerProperties() == null ? null : this.innerProperties().connectedGateway(); + } + + /** + * Set the connectedGateway property: Gateway which to connect segment to. + * + * @param connectedGateway the connectedGateway value to set. + * @return the WorkloadNetworkSegmentUpdate object itself. + */ + public WorkloadNetworkSegmentUpdate withConnectedGateway(String connectedGateway) { + if (this.innerProperties() == null) { + this.innerProperties = new WorkloadNetworkSegmentProperties(); + } + this.innerProperties().withConnectedGateway(connectedGateway); + return this; + } + + /** + * Get the subnet property: Subnet which to connect segment to. + * + * @return the subnet value. + */ + public WorkloadNetworkSegmentSubnet subnet() { + return this.innerProperties() == null ? null : this.innerProperties().subnet(); + } + + /** + * Set the subnet property: Subnet which to connect segment to. + * + * @param subnet the subnet value to set. + * @return the WorkloadNetworkSegmentUpdate object itself. + */ + public WorkloadNetworkSegmentUpdate withSubnet(WorkloadNetworkSegmentSubnet subnet) { + if (this.innerProperties() == null) { + this.innerProperties = new WorkloadNetworkSegmentProperties(); + } + this.innerProperties().withSubnet(subnet); + return this; + } + + /** + * Get the portVif property: Port Vif which segment is associated with. + * + * @return the portVif value. + */ + public List portVif() { + return this.innerProperties() == null ? null : this.innerProperties().portVif(); + } + + /** + * Get the status property: Segment status. + * + * @return the status value. + */ + public SegmentStatusEnum status() { + return this.innerProperties() == null ? null : this.innerProperties().status(); + } + + /** + * Get the provisioningState property: The provisioning state. + * + * @return the provisioningState value. + */ + public WorkloadNetworkSegmentProvisioningState provisioningState() { + return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); + } + + /** + * Get the revision property: NSX revision number. + * + * @return the revision value. + */ + public Long revision() { + return this.innerProperties() == null ? null : this.innerProperties().revision(); + } + + /** + * Set the revision property: NSX revision number. + * + * @param revision the revision value to set. + * @return the WorkloadNetworkSegmentUpdate object itself. + */ + public WorkloadNetworkSegmentUpdate withRevision(Long revision) { + if (this.innerProperties() == null) { + this.innerProperties = new WorkloadNetworkSegmentProperties(); + } + this.innerProperties().withRevision(revision); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (innerProperties() != null) { + innerProperties().validate(); + } + } +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkSegmentsList.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkSegmentsList.java deleted file mode 100644 index 55c33dbfc7171..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkSegmentsList.java +++ /dev/null @@ -1,59 +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.avs.models; - -import com.azure.core.annotation.Immutable; -import com.azure.resourcemanager.avs.fluent.models.WorkloadNetworkSegmentInner; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** A list of NSX Segments. */ -@Immutable -public final class WorkloadNetworkSegmentsList { - /* - * The items on the page - */ - @JsonProperty(value = "value", access = JsonProperty.Access.WRITE_ONLY) - private List value; - - /* - * URL to get the next page if any - */ - @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) - private String nextLink; - - /** Creates an instance of WorkloadNetworkSegmentsList class. */ - public WorkloadNetworkSegmentsList() { - } - - /** - * Get the value property: The items on the page. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Get the nextLink property: URL to get the next page if 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/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkVMGroup.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkVMGroup.java index 003876277700d..cb464c2ecfae0 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkVMGroup.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkVMGroup.java @@ -4,98 +4,116 @@ package com.azure.resourcemanager.avs.models; +import com.azure.core.management.SystemData; import com.azure.core.util.Context; import com.azure.resourcemanager.avs.fluent.models.WorkloadNetworkVMGroupInner; import java.util.List; -/** An immutable client-side representation of WorkloadNetworkVMGroup. */ +/** + * An immutable client-side representation of WorkloadNetworkVMGroup. + */ public interface WorkloadNetworkVMGroup { /** * Gets the id property: Fully qualified resource Id for the resource. - * + * * @return the id value. */ String id(); /** * Gets the name property: The name of the resource. - * + * * @return the name value. */ String name(); /** * Gets the type property: The type of the resource. - * + * * @return the type value. */ String type(); + /** + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + SystemData systemData(); + /** * Gets the displayName property: Display name of the VM group. - * + * * @return the displayName value. */ String displayName(); /** * Gets the members property: Virtual machine members of this group. - * + * * @return the members value. */ List members(); /** * Gets the status property: VM Group status. - * + * * @return the status value. */ VMGroupStatusEnum status(); /** * Gets the provisioningState property: The provisioning state. - * + * * @return the provisioningState value. */ WorkloadNetworkVMGroupProvisioningState provisioningState(); /** * Gets the revision property: NSX revision number. - * + * * @return the revision value. */ Long revision(); /** * Gets the name of the resource group. - * + * * @return the name of the resource group. */ String resourceGroupName(); /** * Gets the inner com.azure.resourcemanager.avs.fluent.models.WorkloadNetworkVMGroupInner object. - * + * * @return the inner object. */ WorkloadNetworkVMGroupInner innerModel(); - /** The entirety of the WorkloadNetworkVMGroup definition. */ + /** + * The entirety of the WorkloadNetworkVMGroup definition. + */ interface Definition extends DefinitionStages.Blank, DefinitionStages.WithParentResource, DefinitionStages.WithCreate { } - /** The WorkloadNetworkVMGroup definition stages. */ + /** + * The WorkloadNetworkVMGroup definition stages. + */ interface DefinitionStages { - /** The first stage of the WorkloadNetworkVMGroup definition. */ + /** + * The first stage of the WorkloadNetworkVMGroup definition. + */ interface Blank extends WithParentResource { } - /** The stage of the WorkloadNetworkVMGroup definition allowing to specify parent resource. */ + /** + * The stage of the WorkloadNetworkVMGroup definition allowing to specify parent resource. + */ interface WithParentResource { /** * Specifies resourceGroupName, privateCloudName. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. * @return the next definition stage. @@ -111,47 +129,53 @@ interface WithCreate extends DefinitionStages.WithDisplayName, DefinitionStages.WithMembers, DefinitionStages.WithRevision { /** * Executes the create request. - * + * * @return the created resource. */ WorkloadNetworkVMGroup create(); /** * Executes the create request. - * + * * @param context The context to associate with this operation. * @return the created resource. */ WorkloadNetworkVMGroup create(Context context); } - /** The stage of the WorkloadNetworkVMGroup definition allowing to specify displayName. */ + /** + * The stage of the WorkloadNetworkVMGroup definition allowing to specify displayName. + */ interface WithDisplayName { /** * Specifies the displayName property: Display name of the VM group.. - * + * * @param displayName Display name of the VM group. * @return the next definition stage. */ WithCreate withDisplayName(String displayName); } - /** The stage of the WorkloadNetworkVMGroup definition allowing to specify members. */ + /** + * The stage of the WorkloadNetworkVMGroup definition allowing to specify members. + */ interface WithMembers { /** * Specifies the members property: Virtual machine members of this group.. - * + * * @param members Virtual machine members of this group. * @return the next definition stage. */ WithCreate withMembers(List members); } - /** The stage of the WorkloadNetworkVMGroup definition allowing to specify revision. */ + /** + * The stage of the WorkloadNetworkVMGroup definition allowing to specify revision. + */ interface WithRevision { /** * Specifies the revision property: NSX revision number.. - * + * * @param revision NSX revision number. * @return the next definition stage. */ @@ -161,58 +185,68 @@ interface WithRevision { /** * Begins update for the WorkloadNetworkVMGroup resource. - * + * * @return the stage of resource update. */ WorkloadNetworkVMGroup.Update update(); - /** The template for WorkloadNetworkVMGroup update. */ + /** + * The template for WorkloadNetworkVMGroup update. + */ interface Update extends UpdateStages.WithDisplayName, UpdateStages.WithMembers, UpdateStages.WithRevision { /** * Executes the update request. - * + * * @return the updated resource. */ WorkloadNetworkVMGroup apply(); /** * Executes the update request. - * + * * @param context The context to associate with this operation. * @return the updated resource. */ WorkloadNetworkVMGroup apply(Context context); } - /** The WorkloadNetworkVMGroup update stages. */ + /** + * The WorkloadNetworkVMGroup update stages. + */ interface UpdateStages { - /** The stage of the WorkloadNetworkVMGroup update allowing to specify displayName. */ + /** + * The stage of the WorkloadNetworkVMGroup update allowing to specify displayName. + */ interface WithDisplayName { /** * Specifies the displayName property: Display name of the VM group.. - * + * * @param displayName Display name of the VM group. * @return the next definition stage. */ Update withDisplayName(String displayName); } - /** The stage of the WorkloadNetworkVMGroup update allowing to specify members. */ + /** + * The stage of the WorkloadNetworkVMGroup update allowing to specify members. + */ interface WithMembers { /** * Specifies the members property: Virtual machine members of this group.. - * + * * @param members Virtual machine members of this group. * @return the next definition stage. */ Update withMembers(List members); } - /** The stage of the WorkloadNetworkVMGroup update allowing to specify revision. */ + /** + * The stage of the WorkloadNetworkVMGroup update allowing to specify revision. + */ interface WithRevision { /** * Specifies the revision property: NSX revision number.. - * + * * @param revision NSX revision number. * @return the next definition stage. */ @@ -222,14 +256,14 @@ interface WithRevision { /** * Refreshes the resource to sync with Azure. - * + * * @return the refreshed resource. */ WorkloadNetworkVMGroup refresh(); /** * Refreshes the resource to sync with Azure. - * + * * @param context The context to associate with this operation. * @return the refreshed resource. */ diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkVMGroupListResult.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkVMGroupListResult.java new file mode 100644 index 0000000000000..0cfdf3245abc6 --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkVMGroupListResult.java @@ -0,0 +1,80 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.avs.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.avs.fluent.models.WorkloadNetworkVMGroupInner; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** + * The response of a WorkloadNetworkVMGroup list operation. + */ +@Fluent +public final class WorkloadNetworkVMGroupListResult { + /* + * The WorkloadNetworkVMGroup items on this page + */ + @JsonProperty(value = "value", required = true) + private List value; + + /* + * The link to the next page of items + */ + @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) + private String nextLink; + + /** + * Creates an instance of WorkloadNetworkVMGroupListResult class. + */ + public WorkloadNetworkVMGroupListResult() { + } + + /** + * Get the value property: The WorkloadNetworkVMGroup items on this page. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Set the value property: The WorkloadNetworkVMGroup items on this page. + * + * @param value the value value to set. + * @return the WorkloadNetworkVMGroupListResult object itself. + */ + public WorkloadNetworkVMGroupListResult withValue(List value) { + this.value = value; + return this; + } + + /** + * Get the nextLink property: The link to the next page of items. + * + * @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) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + "Missing required property value in model WorkloadNetworkVMGroupListResult")); + } else { + value().forEach(e -> e.validate()); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(WorkloadNetworkVMGroupListResult.class); +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkVMGroupProvisioningState.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkVMGroupProvisioningState.java index c802cc7d2b3c5..15b2a38b0de32 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkVMGroupProvisioningState.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkVMGroupProvisioningState.java @@ -8,30 +8,44 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** The provisioning state. */ +/** + * Workload Network VM Group provisioning state. + */ public final class WorkloadNetworkVMGroupProvisioningState extends ExpandableStringEnum { - /** Static value Succeeded for WorkloadNetworkVMGroupProvisioningState. */ + /** + * Static value Succeeded for WorkloadNetworkVMGroupProvisioningState. + */ public static final WorkloadNetworkVMGroupProvisioningState SUCCEEDED = fromString("Succeeded"); - /** Static value Failed for WorkloadNetworkVMGroupProvisioningState. */ + /** + * Static value Failed for WorkloadNetworkVMGroupProvisioningState. + */ public static final WorkloadNetworkVMGroupProvisioningState FAILED = fromString("Failed"); - /** Static value Building for WorkloadNetworkVMGroupProvisioningState. */ + /** + * Static value Canceled for WorkloadNetworkVMGroupProvisioningState. + */ + public static final WorkloadNetworkVMGroupProvisioningState CANCELED = fromString("Canceled"); + + /** + * Static value Building for WorkloadNetworkVMGroupProvisioningState. + */ public static final WorkloadNetworkVMGroupProvisioningState BUILDING = fromString("Building"); - /** Static value Deleting for WorkloadNetworkVMGroupProvisioningState. */ + /** + * Static value Deleting for WorkloadNetworkVMGroupProvisioningState. + */ public static final WorkloadNetworkVMGroupProvisioningState DELETING = fromString("Deleting"); - /** Static value Updating for WorkloadNetworkVMGroupProvisioningState. */ + /** + * Static value Updating for WorkloadNetworkVMGroupProvisioningState. + */ public static final WorkloadNetworkVMGroupProvisioningState UPDATING = fromString("Updating"); - /** Static value Canceled for WorkloadNetworkVMGroupProvisioningState. */ - public static final WorkloadNetworkVMGroupProvisioningState CANCELED = fromString("Canceled"); - /** * Creates a new instance of WorkloadNetworkVMGroupProvisioningState value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -40,7 +54,7 @@ public WorkloadNetworkVMGroupProvisioningState() { /** * Creates or finds a WorkloadNetworkVMGroupProvisioningState from its string representation. - * + * * @param name a name to look for. * @return the corresponding WorkloadNetworkVMGroupProvisioningState. */ @@ -51,7 +65,7 @@ public static WorkloadNetworkVMGroupProvisioningState fromString(String name) { /** * Gets known WorkloadNetworkVMGroupProvisioningState values. - * + * * @return known WorkloadNetworkVMGroupProvisioningState values. */ public static Collection values() { diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkVMGroupUpdate.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkVMGroupUpdate.java new file mode 100644 index 0000000000000..c93ae75980f32 --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkVMGroupUpdate.java @@ -0,0 +1,135 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.avs.models; + +import com.azure.core.annotation.Fluent; +import com.azure.resourcemanager.avs.fluent.models.WorkloadNetworkVMGroupProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** + * NSX VM Group update. + */ +@Fluent +public final class WorkloadNetworkVMGroupUpdate { + /* + * The updatable properties of a VM Group update + */ + @JsonProperty(value = "properties") + private WorkloadNetworkVMGroupProperties innerProperties; + + /** + * Creates an instance of WorkloadNetworkVMGroupUpdate class. + */ + public WorkloadNetworkVMGroupUpdate() { + } + + /** + * Get the innerProperties property: The updatable properties of a VM Group update. + * + * @return the innerProperties value. + */ + private WorkloadNetworkVMGroupProperties innerProperties() { + return this.innerProperties; + } + + /** + * Get the displayName property: Display name of the VM group. + * + * @return the displayName value. + */ + public String displayName() { + return this.innerProperties() == null ? null : this.innerProperties().displayName(); + } + + /** + * Set the displayName property: Display name of the VM group. + * + * @param displayName the displayName value to set. + * @return the WorkloadNetworkVMGroupUpdate object itself. + */ + public WorkloadNetworkVMGroupUpdate withDisplayName(String displayName) { + if (this.innerProperties() == null) { + this.innerProperties = new WorkloadNetworkVMGroupProperties(); + } + this.innerProperties().withDisplayName(displayName); + return this; + } + + /** + * Get the members property: Virtual machine members of this group. + * + * @return the members value. + */ + public List members() { + return this.innerProperties() == null ? null : this.innerProperties().members(); + } + + /** + * Set the members property: Virtual machine members of this group. + * + * @param members the members value to set. + * @return the WorkloadNetworkVMGroupUpdate object itself. + */ + public WorkloadNetworkVMGroupUpdate withMembers(List members) { + if (this.innerProperties() == null) { + this.innerProperties = new WorkloadNetworkVMGroupProperties(); + } + this.innerProperties().withMembers(members); + return this; + } + + /** + * Get the status property: VM Group status. + * + * @return the status value. + */ + public VMGroupStatusEnum status() { + return this.innerProperties() == null ? null : this.innerProperties().status(); + } + + /** + * Get the provisioningState property: The provisioning state. + * + * @return the provisioningState value. + */ + public WorkloadNetworkVMGroupProvisioningState provisioningState() { + return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); + } + + /** + * Get the revision property: NSX revision number. + * + * @return the revision value. + */ + public Long revision() { + return this.innerProperties() == null ? null : this.innerProperties().revision(); + } + + /** + * Set the revision property: NSX revision number. + * + * @param revision the revision value to set. + * @return the WorkloadNetworkVMGroupUpdate object itself. + */ + public WorkloadNetworkVMGroupUpdate withRevision(Long revision) { + if (this.innerProperties() == null) { + this.innerProperties = new WorkloadNetworkVMGroupProperties(); + } + this.innerProperties().withRevision(revision); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (innerProperties() != null) { + innerProperties().validate(); + } + } +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkVMGroupsList.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkVMGroupsList.java deleted file mode 100644 index fa7180149e1ff..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkVMGroupsList.java +++ /dev/null @@ -1,59 +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.avs.models; - -import com.azure.core.annotation.Immutable; -import com.azure.resourcemanager.avs.fluent.models.WorkloadNetworkVMGroupInner; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** A list of NSX VM Groups. */ -@Immutable -public final class WorkloadNetworkVMGroupsList { - /* - * The items on the page - */ - @JsonProperty(value = "value", access = JsonProperty.Access.WRITE_ONLY) - private List value; - - /* - * URL to get the next page if any - */ - @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) - private String nextLink; - - /** Creates an instance of WorkloadNetworkVMGroupsList class. */ - public WorkloadNetworkVMGroupsList() { - } - - /** - * Get the value property: The items on the page. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Get the nextLink property: URL to get the next page if 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/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkVirtualMachine.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkVirtualMachine.java index f55adc8d68fc3..fa22a3fccf0e3 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkVirtualMachine.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkVirtualMachine.java @@ -4,48 +4,65 @@ package com.azure.resourcemanager.avs.models; +import com.azure.core.management.SystemData; import com.azure.resourcemanager.avs.fluent.models.WorkloadNetworkVirtualMachineInner; -/** An immutable client-side representation of WorkloadNetworkVirtualMachine. */ +/** + * An immutable client-side representation of WorkloadNetworkVirtualMachine. + */ public interface WorkloadNetworkVirtualMachine { /** * Gets the id property: Fully qualified resource Id for the resource. - * + * * @return the id value. */ String id(); /** * Gets the name property: The name of the resource. - * + * * @return the name value. */ String name(); /** * Gets the type property: The type of the resource. - * + * * @return the type value. */ String type(); + /** + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + SystemData systemData(); + + /** + * Gets the provisioningState property: The provisioning state of the resource. + * + * @return the provisioningState value. + */ + WorkloadNetworkProvisioningState provisioningState(); + /** * Gets the displayName property: Display name of the VM. - * + * * @return the displayName value. */ String displayName(); /** * Gets the vmType property: Virtual machine type. - * + * * @return the vmType value. */ VMTypeEnum vmType(); /** * Gets the inner com.azure.resourcemanager.avs.fluent.models.WorkloadNetworkVirtualMachineInner object. - * + * * @return the inner object. */ WorkloadNetworkVirtualMachineInner innerModel(); diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkVirtualMachineListResult.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkVirtualMachineListResult.java new file mode 100644 index 0000000000000..92159bbd80d8e --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkVirtualMachineListResult.java @@ -0,0 +1,80 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.avs.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.avs.fluent.models.WorkloadNetworkVirtualMachineInner; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** + * The response of a WorkloadNetworkVirtualMachine list operation. + */ +@Fluent +public final class WorkloadNetworkVirtualMachineListResult { + /* + * The WorkloadNetworkVirtualMachine items on this page + */ + @JsonProperty(value = "value", required = true) + private List value; + + /* + * The link to the next page of items + */ + @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) + private String nextLink; + + /** + * Creates an instance of WorkloadNetworkVirtualMachineListResult class. + */ + public WorkloadNetworkVirtualMachineListResult() { + } + + /** + * Get the value property: The WorkloadNetworkVirtualMachine items on this page. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Set the value property: The WorkloadNetworkVirtualMachine items on this page. + * + * @param value the value value to set. + * @return the WorkloadNetworkVirtualMachineListResult object itself. + */ + public WorkloadNetworkVirtualMachineListResult withValue(List value) { + this.value = value; + return this; + } + + /** + * Get the nextLink property: The link to the next page of items. + * + * @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) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + "Missing required property value in model WorkloadNetworkVirtualMachineListResult")); + } else { + value().forEach(e -> e.validate()); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(WorkloadNetworkVirtualMachineListResult.class); +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkVirtualMachinesList.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkVirtualMachinesList.java deleted file mode 100644 index ca30f36c8ea6b..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworkVirtualMachinesList.java +++ /dev/null @@ -1,59 +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.avs.models; - -import com.azure.core.annotation.Immutable; -import com.azure.resourcemanager.avs.fluent.models.WorkloadNetworkVirtualMachineInner; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** A list of NSX Virtual Machines. */ -@Immutable -public final class WorkloadNetworkVirtualMachinesList { - /* - * The items on the page - */ - @JsonProperty(value = "value", access = JsonProperty.Access.WRITE_ONLY) - private List value; - - /* - * URL to get the next page if any - */ - @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) - private String nextLink; - - /** Creates an instance of WorkloadNetworkVirtualMachinesList class. */ - public WorkloadNetworkVirtualMachinesList() { - } - - /** - * Get the value property: The items on the page. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Get the nextLink property: URL to get the next page if 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/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworks.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworks.java index 5e8841fc6d2a8..e0b2c8394d125 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworks.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/WorkloadNetworks.java @@ -8,1067 +8,1050 @@ import com.azure.core.http.rest.Response; import com.azure.core.util.Context; -/** Resource collection API of WorkloadNetworks. */ +/** + * Resource collection API of WorkloadNetworks. + */ public interface WorkloadNetworks { /** - * Get a private cloud workload network. - * + * List WorkloadNetwork resources by PrivateCloud. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param workloadNetworkName Name for the workload network in the private cloud. - * @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 a private cloud workload network along with {@link Response}. + * @return the response of a WorkloadNetwork list operation as paginated response with {@link PagedIterable}. */ - Response getWithResponse( - String resourceGroupName, String privateCloudName, WorkloadNetworkName workloadNetworkName, Context context); + PagedIterable list(String resourceGroupName, String privateCloudName); /** - * Get a private cloud workload network. - * + * List WorkloadNetwork resources by PrivateCloud. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param workloadNetworkName Name for the workload network in the private cloud. + * @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 a private cloud workload network. + * @return the response of a WorkloadNetwork list operation as paginated response with {@link PagedIterable}. */ - WorkloadNetwork get(String resourceGroupName, String privateCloudName, WorkloadNetworkName workloadNetworkName); + PagedIterable list(String resourceGroupName, String privateCloudName, Context context); /** - * List of workload networks in a private cloud. - * + * Get a WorkloadNetwork. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @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 a list of workload networks as paginated response with {@link PagedIterable}. + * @return a WorkloadNetwork along with {@link Response}. */ - PagedIterable list(String resourceGroupName, String privateCloudName); + Response getWithResponse(String resourceGroupName, String privateCloudName, Context context); /** - * List of workload networks in a private cloud. - * + * Get a WorkloadNetwork. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @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 a list of workload networks as paginated response with {@link PagedIterable}. + * @return a WorkloadNetwork. */ - PagedIterable list(String resourceGroupName, String privateCloudName, Context context); + WorkloadNetwork get(String resourceGroupName, String privateCloudName); /** - * List of segments in a private cloud workload network. - * + * List WorkloadNetworkDhcp resources by WorkloadNetwork. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. * @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 a list of NSX Segments as paginated response with {@link PagedIterable}. + * @return the response of a WorkloadNetworkDhcp list operation as paginated response with {@link PagedIterable}. */ - PagedIterable listSegments(String resourceGroupName, String privateCloudName); + PagedIterable listDhcp(String resourceGroupName, String privateCloudName); /** - * List of segments in a private cloud workload network. - * + * List WorkloadNetworkDhcp resources by WorkloadNetwork. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. * @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 a list of NSX Segments as paginated response with {@link PagedIterable}. + * @return the response of a WorkloadNetworkDhcp list operation as paginated response with {@link PagedIterable}. */ - PagedIterable listSegments( - String resourceGroupName, String privateCloudName, Context context); + PagedIterable listDhcp(String resourceGroupName, String privateCloudName, Context context); /** - * Get a segment by id in a private cloud workload network. - * + * Get a WorkloadNetworkDhcp. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dhcpId The ID of the DHCP configuration. * @param privateCloudName Name of the private cloud. - * @param segmentId NSX Segment identifier. Generally the same as the Segment's display name. * @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 a segment by id in a private cloud workload network along with {@link Response}. + * @return a WorkloadNetworkDhcp along with {@link Response}. */ - Response getSegmentWithResponse( - String resourceGroupName, String privateCloudName, String segmentId, Context context); + Response getDhcpWithResponse(String resourceGroupName, String dhcpId, String privateCloudName, + Context context); /** - * Get a segment by id in a private cloud workload network. - * + * Get a WorkloadNetworkDhcp. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dhcpId The ID of the DHCP configuration. * @param privateCloudName Name of the private cloud. - * @param segmentId NSX Segment identifier. Generally the same as the Segment's display name. * @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 a segment by id in a private cloud workload network. + * @return a WorkloadNetworkDhcp. */ - WorkloadNetworkSegment getSegment(String resourceGroupName, String privateCloudName, String segmentId); + WorkloadNetworkDhcp getDhcp(String resourceGroupName, String dhcpId, String privateCloudName); /** - * Delete a segment by id in a private cloud workload network. - * + * Delete a WorkloadNetworkDhcp. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param segmentId NSX Segment identifier. Generally the same as the Segment's display name. + * @param dhcpId The ID of the DHCP configuration. * @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. */ - void deleteSegment(String resourceGroupName, String privateCloudName, String segmentId); + void deleteDhcp(String resourceGroupName, String privateCloudName, String dhcpId); /** - * Delete a segment by id in a private cloud workload network. - * + * Delete a WorkloadNetworkDhcp. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param segmentId NSX Segment identifier. Generally the same as the Segment's display name. + * @param dhcpId The ID of the DHCP configuration. * @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. */ - void deleteSegment(String resourceGroupName, String privateCloudName, String segmentId, Context context); + void deleteDhcp(String resourceGroupName, String privateCloudName, String dhcpId, Context context); /** - * List dhcp in a private cloud workload network. - * + * List WorkloadNetworkDnsService resources by WorkloadNetwork. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. * @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 a list of NSX dhcp entities as paginated response with {@link PagedIterable}. + * @return the response of a WorkloadNetworkDnsService list operation as paginated response with + * {@link PagedIterable}. */ - PagedIterable listDhcp(String resourceGroupName, String privateCloudName); + PagedIterable listDnsServices(String resourceGroupName, String privateCloudName); /** - * List dhcp in a private cloud workload network. - * + * List WorkloadNetworkDnsService resources by WorkloadNetwork. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. * @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 a list of NSX dhcp entities as paginated response with {@link PagedIterable}. + * @return the response of a WorkloadNetworkDnsService list operation as paginated response with + * {@link PagedIterable}. */ - PagedIterable listDhcp(String resourceGroupName, String privateCloudName, Context context); + PagedIterable listDnsServices(String resourceGroupName, String privateCloudName, + Context context); /** - * Get dhcp by id in a private cloud workload network. - * + * Get a WorkloadNetworkDnsService. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dhcpId NSX DHCP identifier. Generally the same as the DHCP display name. * @param privateCloudName Name of the private cloud. + * @param dnsServiceId ID of the DNS service. * @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 dhcp by id in a private cloud workload network along with {@link Response}. + * @return a WorkloadNetworkDnsService along with {@link Response}. */ - Response getDhcpWithResponse( - String resourceGroupName, String dhcpId, String privateCloudName, Context context); + Response getDnsServiceWithResponse(String resourceGroupName, String privateCloudName, + String dnsServiceId, Context context); /** - * Get dhcp by id in a private cloud workload network. - * + * Get a WorkloadNetworkDnsService. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dhcpId NSX DHCP identifier. Generally the same as the DHCP display name. * @param privateCloudName Name of the private cloud. + * @param dnsServiceId ID of the DNS service. * @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 dhcp by id in a private cloud workload network. + * @return a WorkloadNetworkDnsService. */ - WorkloadNetworkDhcp getDhcp(String resourceGroupName, String dhcpId, String privateCloudName); + WorkloadNetworkDnsService getDnsService(String resourceGroupName, String privateCloudName, String dnsServiceId); /** - * Delete dhcp by id in a private cloud workload network. - * + * Delete a WorkloadNetworkDnsService. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dnsServiceId ID of the DNS service. * @param privateCloudName Name of the private cloud. - * @param dhcpId NSX DHCP identifier. Generally the same as the DHCP display name. * @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. */ - void deleteDhcp(String resourceGroupName, String privateCloudName, String dhcpId); + void deleteDnsService(String resourceGroupName, String dnsServiceId, String privateCloudName); /** - * Delete dhcp by id in a private cloud workload network. - * + * Delete a WorkloadNetworkDnsService. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dnsServiceId ID of the DNS service. * @param privateCloudName Name of the private cloud. - * @param dhcpId NSX DHCP identifier. Generally the same as the DHCP display name. * @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. */ - void deleteDhcp(String resourceGroupName, String privateCloudName, String dhcpId, Context context); + void deleteDnsService(String resourceGroupName, String dnsServiceId, String privateCloudName, Context context); /** - * List of gateways in a private cloud workload network. - * + * List WorkloadNetworkDnsZone resources by WorkloadNetwork. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. * @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 a list of NSX Gateways as paginated response with {@link PagedIterable}. + * @return the response of a WorkloadNetworkDnsZone list operation as paginated response with {@link PagedIterable}. */ - PagedIterable listGateways(String resourceGroupName, String privateCloudName); + PagedIterable listDnsZones(String resourceGroupName, String privateCloudName); /** - * List of gateways in a private cloud workload network. - * + * List WorkloadNetworkDnsZone resources by WorkloadNetwork. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. * @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 a list of NSX Gateways as paginated response with {@link PagedIterable}. + * @return the response of a WorkloadNetworkDnsZone list operation as paginated response with {@link PagedIterable}. */ - PagedIterable listGateways( - String resourceGroupName, String privateCloudName, Context context); + PagedIterable listDnsZones(String resourceGroupName, String privateCloudName, + Context context); /** - * Get a gateway by id in a private cloud workload network. - * + * Get a WorkloadNetworkDnsZone. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param gatewayId NSX Gateway identifier. Generally the same as the Gateway's display name. + * @param dnsZoneId ID of the DNS zone. * @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 a gateway by id in a private cloud workload network along with {@link Response}. + * @return a WorkloadNetworkDnsZone along with {@link Response}. */ - Response getGatewayWithResponse( - String resourceGroupName, String privateCloudName, String gatewayId, Context context); + Response getDnsZoneWithResponse(String resourceGroupName, String privateCloudName, + String dnsZoneId, Context context); /** - * Get a gateway by id in a private cloud workload network. - * + * Get a WorkloadNetworkDnsZone. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param gatewayId NSX Gateway identifier. Generally the same as the Gateway's display name. + * @param dnsZoneId ID of the DNS zone. * @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 a gateway by id in a private cloud workload network. + * @return a WorkloadNetworkDnsZone. */ - WorkloadNetworkGateway getGateway(String resourceGroupName, String privateCloudName, String gatewayId); + WorkloadNetworkDnsZone getDnsZone(String resourceGroupName, String privateCloudName, String dnsZoneId); /** - * List of port mirroring profiles in a private cloud workload network. - * + * Delete a WorkloadNetworkDnsZone. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dnsZoneId ID of the DNS zone. * @param privateCloudName Name of the private cloud. * @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 a list of NSX Port Mirroring as paginated response with {@link PagedIterable}. */ - PagedIterable listPortMirroring(String resourceGroupName, String privateCloudName); + void deleteDnsZone(String resourceGroupName, String dnsZoneId, String privateCloudName); /** - * List of port mirroring profiles in a private cloud workload network. - * + * Delete a WorkloadNetworkDnsZone. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param dnsZoneId ID of the DNS zone. * @param privateCloudName Name of the private cloud. * @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 a list of NSX Port Mirroring as paginated response with {@link PagedIterable}. */ - PagedIterable listPortMirroring( - String resourceGroupName, String privateCloudName, Context context); + void deleteDnsZone(String resourceGroupName, String dnsZoneId, String privateCloudName, Context context); /** - * Get a port mirroring profile by id in a private cloud workload network. - * + * List WorkloadNetworkGateway resources by WorkloadNetwork. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param portMirroringId NSX Port Mirroring identifier. Generally the same as the Port Mirroring display name. - * @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 a port mirroring profile by id in a private cloud workload network along with {@link Response}. + * @return the response of a WorkloadNetworkGateway list operation as paginated response with {@link PagedIterable}. */ - Response getPortMirroringWithResponse( - String resourceGroupName, String privateCloudName, String portMirroringId, Context context); + PagedIterable listGateways(String resourceGroupName, String privateCloudName); /** - * Get a port mirroring profile by id in a private cloud workload network. - * + * List WorkloadNetworkGateway resources by WorkloadNetwork. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param portMirroringId NSX Port Mirroring identifier. Generally the same as the Port Mirroring display name. + * @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 a port mirroring profile by id in a private cloud workload network. + * @return the response of a WorkloadNetworkGateway list operation as paginated response with {@link PagedIterable}. */ - WorkloadNetworkPortMirroring getPortMirroring( - String resourceGroupName, String privateCloudName, String portMirroringId); + PagedIterable listGateways(String resourceGroupName, String privateCloudName, + Context context); /** - * Delete a port mirroring profile by id in a private cloud workload network. - * + * Get a WorkloadNetworkGateway. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param portMirroringId NSX Port Mirroring identifier. Generally the same as the Port Mirroring display name. * @param privateCloudName Name of the private cloud. + * @param gatewayId The ID of the NSX Gateway. + * @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 a WorkloadNetworkGateway along with {@link Response}. */ - void deletePortMirroring(String resourceGroupName, String portMirroringId, String privateCloudName); + Response getGatewayWithResponse(String resourceGroupName, String privateCloudName, + String gatewayId, Context context); /** - * Delete a port mirroring profile by id in a private cloud workload network. - * + * Get a WorkloadNetworkGateway. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param portMirroringId NSX Port Mirroring identifier. Generally the same as the Port Mirroring display name. * @param privateCloudName Name of the private cloud. - * @param context The context to associate with this operation. + * @param gatewayId The ID of the NSX Gateway. * @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 a WorkloadNetworkGateway. */ - void deletePortMirroring( - String resourceGroupName, String portMirroringId, String privateCloudName, Context context); + WorkloadNetworkGateway getGateway(String resourceGroupName, String privateCloudName, String gatewayId); /** - * List of vm groups in a private cloud workload network. - * + * List WorkloadNetworkPortMirroring resources by WorkloadNetwork. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. * @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 a list of NSX VM Groups as paginated response with {@link PagedIterable}. + * @return the response of a WorkloadNetworkPortMirroring list operation as paginated response with + * {@link PagedIterable}. */ - PagedIterable listVMGroups(String resourceGroupName, String privateCloudName); + PagedIterable listPortMirroring(String resourceGroupName, String privateCloudName); /** - * List of vm groups in a private cloud workload network. - * + * List WorkloadNetworkPortMirroring resources by WorkloadNetwork. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. * @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 a list of NSX VM Groups as paginated response with {@link PagedIterable}. + * @return the response of a WorkloadNetworkPortMirroring list operation as paginated response with + * {@link PagedIterable}. */ - PagedIterable listVMGroups( - String resourceGroupName, String privateCloudName, Context context); + PagedIterable listPortMirroring(String resourceGroupName, String privateCloudName, + Context context); /** - * Get a vm group by id in a private cloud workload network. - * + * Get a WorkloadNetworkPortMirroring. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param vmGroupId NSX VM Group identifier. Generally the same as the VM Group's display name. + * @param portMirroringId ID of the NSX port mirroring profile. * @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 a vm group by id in a private cloud workload network along with {@link Response}. + * @return a WorkloadNetworkPortMirroring along with {@link Response}. */ - Response getVMGroupWithResponse( - String resourceGroupName, String privateCloudName, String vmGroupId, Context context); + Response getPortMirroringWithResponse(String resourceGroupName, + String privateCloudName, String portMirroringId, Context context); /** - * Get a vm group by id in a private cloud workload network. - * + * Get a WorkloadNetworkPortMirroring. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param vmGroupId NSX VM Group identifier. Generally the same as the VM Group's display name. + * @param portMirroringId ID of the NSX port mirroring profile. * @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 a vm group by id in a private cloud workload network. + * @return a WorkloadNetworkPortMirroring. */ - WorkloadNetworkVMGroup getVMGroup(String resourceGroupName, String privateCloudName, String vmGroupId); + WorkloadNetworkPortMirroring getPortMirroring(String resourceGroupName, String privateCloudName, + String portMirroringId); /** - * Delete a vm group by id in a private cloud workload network. - * + * Delete a WorkloadNetworkPortMirroring. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param vmGroupId NSX VM Group identifier. Generally the same as the VM Group's display name. + * @param portMirroringId ID of the NSX port mirroring profile. * @param privateCloudName Name of the private cloud. * @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. */ - void deleteVMGroup(String resourceGroupName, String vmGroupId, String privateCloudName); + void deletePortMirroring(String resourceGroupName, String portMirroringId, String privateCloudName); /** - * Delete a vm group by id in a private cloud workload network. - * + * Delete a WorkloadNetworkPortMirroring. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param vmGroupId NSX VM Group identifier. Generally the same as the VM Group's display name. + * @param portMirroringId ID of the NSX port mirroring profile. * @param privateCloudName Name of the private cloud. * @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. */ - void deleteVMGroup(String resourceGroupName, String vmGroupId, String privateCloudName, Context context); + void deletePortMirroring(String resourceGroupName, String portMirroringId, String privateCloudName, + Context context); /** - * List of virtual machines in a private cloud workload network. - * + * List WorkloadNetworkPublicIP resources by WorkloadNetwork. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. * @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 a list of NSX Virtual Machines as paginated response with {@link PagedIterable}. + * @return the response of a WorkloadNetworkPublicIP list operation as paginated response with + * {@link PagedIterable}. */ - PagedIterable listVirtualMachines(String resourceGroupName, String privateCloudName); + PagedIterable listPublicIPs(String resourceGroupName, String privateCloudName); /** - * List of virtual machines in a private cloud workload network. - * + * List WorkloadNetworkPublicIP resources by WorkloadNetwork. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. * @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 a list of NSX Virtual Machines as paginated response with {@link PagedIterable}. + * @return the response of a WorkloadNetworkPublicIP list operation as paginated response with + * {@link PagedIterable}. */ - PagedIterable listVirtualMachines( - String resourceGroupName, String privateCloudName, Context context); + PagedIterable listPublicIPs(String resourceGroupName, String privateCloudName, + Context context); /** - * Get a virtual machine by id in a private cloud workload network. - * + * Get a WorkloadNetworkPublicIP. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param virtualMachineId Virtual Machine identifier. + * @param publicIpId ID of the DNS zone. * @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 a virtual machine by id in a private cloud workload network along with {@link Response}. + * @return a WorkloadNetworkPublicIP along with {@link Response}. */ - Response getVirtualMachineWithResponse( - String resourceGroupName, String privateCloudName, String virtualMachineId, Context context); + Response getPublicIpWithResponse(String resourceGroupName, String privateCloudName, + String publicIpId, Context context); /** - * Get a virtual machine by id in a private cloud workload network. - * + * Get a WorkloadNetworkPublicIP. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param virtualMachineId Virtual Machine identifier. + * @param publicIpId ID of the DNS zone. * @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 a virtual machine by id in a private cloud workload network. + * @return a WorkloadNetworkPublicIP. */ - WorkloadNetworkVirtualMachine getVirtualMachine( - String resourceGroupName, String privateCloudName, String virtualMachineId); + WorkloadNetworkPublicIp getPublicIp(String resourceGroupName, String privateCloudName, String publicIpId); /** - * List of DNS services in a private cloud workload network. - * + * Delete a WorkloadNetworkPublicIP. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param publicIpId ID of the DNS zone. * @param privateCloudName Name of the private cloud. * @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 a list of NSX DNS Services as paginated response with {@link PagedIterable}. */ - PagedIterable listDnsServices(String resourceGroupName, String privateCloudName); + void deletePublicIp(String resourceGroupName, String publicIpId, String privateCloudName); /** - * List of DNS services in a private cloud workload network. - * + * Delete a WorkloadNetworkPublicIP. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param publicIpId ID of the DNS zone. * @param privateCloudName Name of the private cloud. * @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 a list of NSX DNS Services as paginated response with {@link PagedIterable}. */ - PagedIterable listDnsServices( - String resourceGroupName, String privateCloudName, Context context); + void deletePublicIp(String resourceGroupName, String publicIpId, String privateCloudName, Context context); /** - * Get a DNS service by id in a private cloud workload network. - * + * List WorkloadNetworkSegment resources by WorkloadNetwork. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param dnsServiceId NSX DNS Service identifier. Generally the same as the DNS Service's display name. - * @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 a DNS service by id in a private cloud workload network along with {@link Response}. + * @return the response of a WorkloadNetworkSegment list operation as paginated response with {@link PagedIterable}. */ - Response getDnsServiceWithResponse( - String resourceGroupName, String privateCloudName, String dnsServiceId, Context context); + PagedIterable listSegments(String resourceGroupName, String privateCloudName); /** - * Get a DNS service by id in a private cloud workload network. - * + * List WorkloadNetworkSegment resources by WorkloadNetwork. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param dnsServiceId NSX DNS Service identifier. Generally the same as the DNS Service's display name. + * @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 a DNS service by id in a private cloud workload network. + * @return the response of a WorkloadNetworkSegment list operation as paginated response with {@link PagedIterable}. */ - WorkloadNetworkDnsService getDnsService(String resourceGroupName, String privateCloudName, String dnsServiceId); + PagedIterable listSegments(String resourceGroupName, String privateCloudName, + Context context); /** - * Delete a DNS service by id in a private cloud workload network. - * + * Get a WorkloadNetworkSegment. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dnsServiceId NSX DNS Service identifier. Generally the same as the DNS Service's display name. * @param privateCloudName Name of the private cloud. + * @param segmentId The ID of the NSX Segment. + * @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 a WorkloadNetworkSegment along with {@link Response}. */ - void deleteDnsService(String resourceGroupName, String dnsServiceId, String privateCloudName); + Response getSegmentWithResponse(String resourceGroupName, String privateCloudName, + String segmentId, Context context); /** - * Delete a DNS service by id in a private cloud workload network. - * + * Get a WorkloadNetworkSegment. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dnsServiceId NSX DNS Service identifier. Generally the same as the DNS Service's display name. * @param privateCloudName Name of the private cloud. - * @param context The context to associate with this operation. + * @param segmentId The ID of the NSX Segment. * @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 a WorkloadNetworkSegment. */ - void deleteDnsService(String resourceGroupName, String dnsServiceId, String privateCloudName, Context context); + WorkloadNetworkSegment getSegment(String resourceGroupName, String privateCloudName, String segmentId); /** - * List of DNS zones in a private cloud workload network. - * + * Delete a WorkloadNetworkSegment. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param segmentId The ID of the NSX Segment. * @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 a list of NSX DNS Zones as paginated response with {@link PagedIterable}. */ - PagedIterable listDnsZones(String resourceGroupName, String privateCloudName); + void deleteSegment(String resourceGroupName, String privateCloudName, String segmentId); /** - * List of DNS zones in a private cloud workload network. - * + * Delete a WorkloadNetworkSegment. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. + * @param segmentId The ID of the NSX Segment. * @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 a list of NSX DNS Zones as paginated response with {@link PagedIterable}. */ - PagedIterable listDnsZones( - String resourceGroupName, String privateCloudName, Context context); + void deleteSegment(String resourceGroupName, String privateCloudName, String segmentId, Context context); /** - * Get a DNS zone by id in a private cloud workload network. - * + * List WorkloadNetworkVirtualMachine resources by WorkloadNetwork. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param dnsZoneId NSX DNS Zone identifier. Generally the same as the DNS Zone's display name. - * @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 a DNS zone by id in a private cloud workload network along with {@link Response}. + * @return the response of a WorkloadNetworkVirtualMachine list operation as paginated response with + * {@link PagedIterable}. */ - Response getDnsZoneWithResponse( - String resourceGroupName, String privateCloudName, String dnsZoneId, Context context); + PagedIterable listVirtualMachines(String resourceGroupName, String privateCloudName); /** - * Get a DNS zone by id in a private cloud workload network. - * + * List WorkloadNetworkVirtualMachine resources by WorkloadNetwork. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param dnsZoneId NSX DNS Zone identifier. Generally the same as the DNS Zone's display name. + * @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 a DNS zone by id in a private cloud workload network. + * @return the response of a WorkloadNetworkVirtualMachine list operation as paginated response with + * {@link PagedIterable}. */ - WorkloadNetworkDnsZone getDnsZone(String resourceGroupName, String privateCloudName, String dnsZoneId); + PagedIterable listVirtualMachines(String resourceGroupName, String privateCloudName, + Context context); /** - * Delete a DNS zone by id in a private cloud workload network. - * + * Get a WorkloadNetworkVirtualMachine. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dnsZoneId NSX DNS Zone identifier. Generally the same as the DNS Zone's display name. * @param privateCloudName Name of the private cloud. + * @param virtualMachineId ID of the virtual machine. + * @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 a WorkloadNetworkVirtualMachine along with {@link Response}. */ - void deleteDnsZone(String resourceGroupName, String dnsZoneId, String privateCloudName); + Response getVirtualMachineWithResponse(String resourceGroupName, + String privateCloudName, String virtualMachineId, Context context); /** - * Delete a DNS zone by id in a private cloud workload network. - * + * Get a WorkloadNetworkVirtualMachine. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param dnsZoneId NSX DNS Zone identifier. Generally the same as the DNS Zone's display name. * @param privateCloudName Name of the private cloud. - * @param context The context to associate with this operation. + * @param virtualMachineId ID of the virtual machine. * @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 a WorkloadNetworkVirtualMachine. */ - void deleteDnsZone(String resourceGroupName, String dnsZoneId, String privateCloudName, Context context); + WorkloadNetworkVirtualMachine getVirtualMachine(String resourceGroupName, String privateCloudName, + String virtualMachineId); /** - * List of Public IP Blocks in a private cloud workload network. - * + * List WorkloadNetworkVMGroup resources by WorkloadNetwork. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. * @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 a list of NSX Public IP Blocks as paginated response with {@link PagedIterable}. + * @return the response of a WorkloadNetworkVMGroup list operation as paginated response with {@link PagedIterable}. */ - PagedIterable listPublicIPs(String resourceGroupName, String privateCloudName); + PagedIterable listVMGroups(String resourceGroupName, String privateCloudName); /** - * List of Public IP Blocks in a private cloud workload network. - * + * List WorkloadNetworkVMGroup resources by WorkloadNetwork. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. * @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 a list of NSX Public IP Blocks as paginated response with {@link PagedIterable}. + * @return the response of a WorkloadNetworkVMGroup list operation as paginated response with {@link PagedIterable}. */ - PagedIterable listPublicIPs( - String resourceGroupName, String privateCloudName, Context context); + PagedIterable listVMGroups(String resourceGroupName, String privateCloudName, + Context context); /** - * Get a Public IP Block by id in a private cloud workload network. - * + * Get a WorkloadNetworkVMGroup. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param publicIpId NSX Public IP Block identifier. Generally the same as the Public IP Block's display name. + * @param vmGroupId ID of the VM group. * @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 a Public IP Block by id in a private cloud workload network along with {@link Response}. + * @return a WorkloadNetworkVMGroup along with {@link Response}. */ - Response getPublicIpWithResponse( - String resourceGroupName, String privateCloudName, String publicIpId, Context context); + Response getVMGroupWithResponse(String resourceGroupName, String privateCloudName, + String vmGroupId, Context context); /** - * Get a Public IP Block by id in a private cloud workload network. - * + * Get a WorkloadNetworkVMGroup. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud. - * @param publicIpId NSX Public IP Block identifier. Generally the same as the Public IP Block's display name. + * @param vmGroupId ID of the VM group. * @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 a Public IP Block by id in a private cloud workload network. + * @return a WorkloadNetworkVMGroup. */ - WorkloadNetworkPublicIp getPublicIp(String resourceGroupName, String privateCloudName, String publicIpId); + WorkloadNetworkVMGroup getVMGroup(String resourceGroupName, String privateCloudName, String vmGroupId); /** - * Delete a Public IP Block by id in a private cloud workload network. - * + * Delete a WorkloadNetworkVMGroup. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param publicIpId NSX Public IP Block identifier. Generally the same as the Public IP Block's display name. + * @param vmGroupId ID of the VM group. * @param privateCloudName Name of the private cloud. * @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. */ - void deletePublicIp(String resourceGroupName, String publicIpId, String privateCloudName); + void deleteVMGroup(String resourceGroupName, String vmGroupId, String privateCloudName); /** - * Delete a Public IP Block by id in a private cloud workload network. - * + * Delete a WorkloadNetworkVMGroup. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param publicIpId NSX Public IP Block identifier. Generally the same as the Public IP Block's display name. + * @param vmGroupId ID of the VM group. * @param privateCloudName Name of the private cloud. * @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. */ - void deletePublicIp(String resourceGroupName, String publicIpId, String privateCloudName, Context context); + void deleteVMGroup(String resourceGroupName, String vmGroupId, String privateCloudName, Context context); /** - * Get a segment by id in a private cloud workload network. - * + * Get a WorkloadNetworkDhcp. + * * @param id the resource ID. * @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 a segment by id in a private cloud workload network along with {@link Response}. + * @return a WorkloadNetworkDhcp along with {@link Response}. */ - WorkloadNetworkSegment getSegmentById(String id); + WorkloadNetworkDhcp getDhcpById(String id); /** - * Get a segment by id in a private cloud workload network. - * + * Get a WorkloadNetworkDhcp. + * * @param id the resource ID. * @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 a segment by id in a private cloud workload network along with {@link Response}. + * @return a WorkloadNetworkDhcp along with {@link Response}. */ - Response getSegmentByIdWithResponse(String id, Context context); + Response getDhcpByIdWithResponse(String id, Context context); /** - * Get dhcp by id in a private cloud workload network. - * + * Get a WorkloadNetworkDnsService. + * * @param id the resource ID. * @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 dhcp by id in a private cloud workload network along with {@link Response}. + * @return a WorkloadNetworkDnsService along with {@link Response}. */ - WorkloadNetworkDhcp getDhcpById(String id); + WorkloadNetworkDnsService getDnsServiceById(String id); /** - * Get dhcp by id in a private cloud workload network. - * + * Get a WorkloadNetworkDnsService. + * * @param id the resource ID. * @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 dhcp by id in a private cloud workload network along with {@link Response}. + * @return a WorkloadNetworkDnsService along with {@link Response}. */ - Response getDhcpByIdWithResponse(String id, Context context); + Response getDnsServiceByIdWithResponse(String id, Context context); /** - * Get a port mirroring profile by id in a private cloud workload network. - * + * Get a WorkloadNetworkDnsZone. + * * @param id the resource ID. * @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 a port mirroring profile by id in a private cloud workload network along with {@link Response}. + * @return a WorkloadNetworkDnsZone along with {@link Response}. */ - WorkloadNetworkPortMirroring getPortMirroringById(String id); + WorkloadNetworkDnsZone getDnsZoneById(String id); /** - * Get a port mirroring profile by id in a private cloud workload network. - * + * Get a WorkloadNetworkDnsZone. + * * @param id the resource ID. * @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 a port mirroring profile by id in a private cloud workload network along with {@link Response}. + * @return a WorkloadNetworkDnsZone along with {@link Response}. */ - Response getPortMirroringByIdWithResponse(String id, Context context); + Response getDnsZoneByIdWithResponse(String id, Context context); /** - * Get a vm group by id in a private cloud workload network. - * + * Get a WorkloadNetworkPortMirroring. + * * @param id the resource ID. * @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 a vm group by id in a private cloud workload network along with {@link Response}. + * @return a WorkloadNetworkPortMirroring along with {@link Response}. */ - WorkloadNetworkVMGroup getVMGroupById(String id); + WorkloadNetworkPortMirroring getPortMirroringById(String id); /** - * Get a vm group by id in a private cloud workload network. - * + * Get a WorkloadNetworkPortMirroring. + * * @param id the resource ID. * @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 a vm group by id in a private cloud workload network along with {@link Response}. + * @return a WorkloadNetworkPortMirroring along with {@link Response}. */ - Response getVMGroupByIdWithResponse(String id, Context context); + Response getPortMirroringByIdWithResponse(String id, Context context); /** - * Get a DNS service by id in a private cloud workload network. - * + * Get a WorkloadNetworkPublicIP. + * * @param id the resource ID. * @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 a DNS service by id in a private cloud workload network along with {@link Response}. + * @return a WorkloadNetworkPublicIP along with {@link Response}. */ - WorkloadNetworkDnsService getDnsServiceById(String id); + WorkloadNetworkPublicIp getPublicIpById(String id); /** - * Get a DNS service by id in a private cloud workload network. - * + * Get a WorkloadNetworkPublicIP. + * * @param id the resource ID. * @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 a DNS service by id in a private cloud workload network along with {@link Response}. + * @return a WorkloadNetworkPublicIP along with {@link Response}. */ - Response getDnsServiceByIdWithResponse(String id, Context context); + Response getPublicIpByIdWithResponse(String id, Context context); /** - * Get a DNS zone by id in a private cloud workload network. - * + * Get a WorkloadNetworkSegment. + * * @param id the resource ID. * @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 a DNS zone by id in a private cloud workload network along with {@link Response}. + * @return a WorkloadNetworkSegment along with {@link Response}. */ - WorkloadNetworkDnsZone getDnsZoneById(String id); + WorkloadNetworkSegment getSegmentById(String id); /** - * Get a DNS zone by id in a private cloud workload network. - * + * Get a WorkloadNetworkSegment. + * * @param id the resource ID. * @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 a DNS zone by id in a private cloud workload network along with {@link Response}. + * @return a WorkloadNetworkSegment along with {@link Response}. */ - Response getDnsZoneByIdWithResponse(String id, Context context); + Response getSegmentByIdWithResponse(String id, Context context); /** - * Get a Public IP Block by id in a private cloud workload network. - * + * Get a WorkloadNetworkVMGroup. + * * @param id the resource ID. * @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 a Public IP Block by id in a private cloud workload network along with {@link Response}. + * @return a WorkloadNetworkVMGroup along with {@link Response}. */ - WorkloadNetworkPublicIp getPublicIpById(String id); + WorkloadNetworkVMGroup getVMGroupById(String id); /** - * Get a Public IP Block by id in a private cloud workload network. - * + * Get a WorkloadNetworkVMGroup. + * * @param id the resource ID. * @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 a Public IP Block by id in a private cloud workload network along with {@link Response}. + * @return a WorkloadNetworkVMGroup along with {@link Response}. */ - Response getPublicIpByIdWithResponse(String id, Context context); + Response getVMGroupByIdWithResponse(String id, Context context); /** - * Delete a segment by id in a private cloud workload network. - * + * Delete a WorkloadNetworkDhcp. + * * @param id the resource ID. * @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. */ - void deleteSegmentById(String id); + void deleteDhcpById(String id); /** - * Delete a segment by id in a private cloud workload network. - * + * Delete a WorkloadNetworkDhcp. + * * @param id the resource ID. * @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. */ - void deleteSegmentByIdWithResponse(String id, Context context); + void deleteDhcpByIdWithResponse(String id, Context context); /** - * Delete dhcp by id in a private cloud workload network. - * + * Delete a WorkloadNetworkDnsService. + * * @param id the resource ID. * @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. */ - void deleteDhcpById(String id); + void deleteDnsServiceById(String id); /** - * Delete dhcp by id in a private cloud workload network. - * + * Delete a WorkloadNetworkDnsService. + * * @param id the resource ID. * @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. */ - void deleteDhcpByIdWithResponse(String id, Context context); + void deleteDnsServiceByIdWithResponse(String id, Context context); /** - * Delete a port mirroring profile by id in a private cloud workload network. - * + * Delete a WorkloadNetworkDnsZone. + * * @param id the resource ID. * @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. */ - void deletePortMirroringById(String id); + void deleteDnsZoneById(String id); /** - * Delete a port mirroring profile by id in a private cloud workload network. - * + * Delete a WorkloadNetworkDnsZone. + * * @param id the resource ID. * @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. */ - void deletePortMirroringByIdWithResponse(String id, Context context); + void deleteDnsZoneByIdWithResponse(String id, Context context); /** - * Delete a vm group by id in a private cloud workload network. - * + * Delete a WorkloadNetworkPortMirroring. + * * @param id the resource ID. * @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. */ - void deleteVMGroupById(String id); + void deletePortMirroringById(String id); /** - * Delete a vm group by id in a private cloud workload network. - * + * Delete a WorkloadNetworkPortMirroring. + * * @param id the resource ID. * @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. */ - void deleteVMGroupByIdWithResponse(String id, Context context); + void deletePortMirroringByIdWithResponse(String id, Context context); /** - * Delete a DNS service by id in a private cloud workload network. - * + * Delete a WorkloadNetworkPublicIP. + * * @param id the resource ID. * @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. */ - void deleteDnsServiceById(String id); + void deletePublicIpById(String id); /** - * Delete a DNS service by id in a private cloud workload network. - * + * Delete a WorkloadNetworkPublicIP. + * * @param id the resource ID. * @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. */ - void deleteDnsServiceByIdWithResponse(String id, Context context); + void deletePublicIpByIdWithResponse(String id, Context context); /** - * Delete a DNS zone by id in a private cloud workload network. - * + * Delete a WorkloadNetworkSegment. + * * @param id the resource ID. * @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. */ - void deleteDnsZoneById(String id); + void deleteSegmentById(String id); /** - * Delete a DNS zone by id in a private cloud workload network. - * + * Delete a WorkloadNetworkSegment. + * * @param id the resource ID. * @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. */ - void deleteDnsZoneByIdWithResponse(String id, Context context); + void deleteSegmentByIdWithResponse(String id, Context context); /** - * Delete a Public IP Block by id in a private cloud workload network. - * + * Delete a WorkloadNetworkVMGroup. + * * @param id the resource ID. * @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. */ - void deletePublicIpById(String id); + void deleteVMGroupById(String id); /** - * Delete a Public IP Block by id in a private cloud workload network. - * + * Delete a WorkloadNetworkVMGroup. + * * @param id the resource ID. * @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. */ - void deletePublicIpByIdWithResponse(String id, Context context); - - /** - * Begins definition for a new WorkloadNetworkSegment resource. - * - * @param name resource name. - * @return the first stage of the new WorkloadNetworkSegment definition. - */ - WorkloadNetworkSegment.DefinitionStages.Blank defineSegments(String name); + void deleteVMGroupByIdWithResponse(String id, Context context); /** * Begins definition for a new WorkloadNetworkDhcp resource. - * + * * @param name resource name. * @return the first stage of the new WorkloadNetworkDhcp definition. */ WorkloadNetworkDhcp.DefinitionStages.Blank defineDhcp(String name); - /** - * Begins definition for a new WorkloadNetworkPortMirroring resource. - * - * @param name resource name. - * @return the first stage of the new WorkloadNetworkPortMirroring definition. - */ - WorkloadNetworkPortMirroring.DefinitionStages.Blank definePortMirroring(String name); - - /** - * Begins definition for a new WorkloadNetworkVMGroup resource. - * - * @param name resource name. - * @return the first stage of the new WorkloadNetworkVMGroup definition. - */ - WorkloadNetworkVMGroup.DefinitionStages.Blank defineVMGroup(String name); - /** * Begins definition for a new WorkloadNetworkDnsService resource. - * + * * @param name resource name. * @return the first stage of the new WorkloadNetworkDnsService definition. */ @@ -1076,17 +1059,41 @@ Response getPublicIpWithResponse( /** * Begins definition for a new WorkloadNetworkDnsZone resource. - * + * * @param name resource name. * @return the first stage of the new WorkloadNetworkDnsZone definition. */ WorkloadNetworkDnsZone.DefinitionStages.Blank defineDnsZone(String name); + /** + * Begins definition for a new WorkloadNetworkPortMirroring resource. + * + * @param name resource name. + * @return the first stage of the new WorkloadNetworkPortMirroring definition. + */ + WorkloadNetworkPortMirroring.DefinitionStages.Blank definePortMirroring(String name); + /** * Begins definition for a new WorkloadNetworkPublicIp resource. - * + * * @param name resource name. * @return the first stage of the new WorkloadNetworkPublicIp definition. */ WorkloadNetworkPublicIp.DefinitionStages.Blank definePublicIp(String name); + + /** + * Begins definition for a new WorkloadNetworkSegment resource. + * + * @param name resource name. + * @return the first stage of the new WorkloadNetworkSegment definition. + */ + WorkloadNetworkSegment.DefinitionStages.Blank defineSegments(String name); + + /** + * Begins definition for a new WorkloadNetworkVMGroup resource. + * + * @param name resource name. + * @return the first stage of the new WorkloadNetworkVMGroup definition. + */ + WorkloadNetworkVMGroup.DefinitionStages.Blank defineVMGroup(String name); } diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/package-info.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/package-info.java index a1dcabeca8f46..6324b6c91578f 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/package-info.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/package-info.java @@ -2,5 +2,8 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -/** Package containing the data models for AvsClient. Azure VMware Solution API. */ +/** + * Package containing the data models for AvsClient. + * Azure VMware Solution API. + */ package com.azure.resourcemanager.avs.models; diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/package-info.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/package-info.java index 33dfd5e58c76b..5c45a9ed54e5c 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/package-info.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/package-info.java @@ -2,5 +2,8 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -/** Package containing the classes for AvsClient. Azure VMware Solution API. */ +/** + * Package containing the classes for AvsClient. + * Azure VMware Solution API. + */ package com.azure.resourcemanager.avs; diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/module-info.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/module-info.java index 57505781a0ae6..4346a2044e3fd 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/main/java/module-info.java +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/module-info.java @@ -4,16 +4,10 @@ module com.azure.resourcemanager.avs { requires transitive com.azure.core.management; - exports com.azure.resourcemanager.avs; exports com.azure.resourcemanager.avs.fluent; exports com.azure.resourcemanager.avs.fluent.models; exports com.azure.resourcemanager.avs.models; - - opens com.azure.resourcemanager.avs.fluent.models to - com.azure.core, - com.fasterxml.jackson.databind; - opens com.azure.resourcemanager.avs.models to - com.azure.core, - com.fasterxml.jackson.databind; + opens com.azure.resourcemanager.avs.fluent.models to com.azure.core, com.fasterxml.jackson.databind; + opens com.azure.resourcemanager.avs.models to com.azure.core, com.fasterxml.jackson.databind; } diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-avs/proxy-config.json b/sdk/avs/azure-resourcemanager-avs/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-avs/proxy-config.json new file mode 100644 index 0000000000000..aa3c1c161bf67 --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-avs/proxy-config.json @@ -0,0 +1 @@ +[ [ "com.azure.resourcemanager.avs.implementation.OperationsClientImpl$OperationsService" ], [ "com.azure.resourcemanager.avs.implementation.LocationsClientImpl$LocationsService" ], [ "com.azure.resourcemanager.avs.implementation.PrivateCloudsClientImpl$PrivateCloudsService" ], [ "com.azure.resourcemanager.avs.implementation.AddonsClientImpl$AddonsService" ], [ "com.azure.resourcemanager.avs.implementation.AuthorizationsClientImpl$AuthorizationsService" ], [ "com.azure.resourcemanager.avs.implementation.CloudLinksClientImpl$CloudLinksService" ], [ "com.azure.resourcemanager.avs.implementation.ClustersClientImpl$ClustersService" ], [ "com.azure.resourcemanager.avs.implementation.DatastoresClientImpl$DatastoresService" ], [ "com.azure.resourcemanager.avs.implementation.PlacementPoliciesClientImpl$PlacementPoliciesService" ], [ "com.azure.resourcemanager.avs.implementation.VirtualMachinesClientImpl$VirtualMachinesService" ], [ "com.azure.resourcemanager.avs.implementation.GlobalReachConnectionsClientImpl$GlobalReachConnectionsService" ], [ "com.azure.resourcemanager.avs.implementation.HcxEnterpriseSitesClientImpl$HcxEnterpriseSitesService" ], [ "com.azure.resourcemanager.avs.implementation.IscsiPathsClientImpl$IscsiPathsService" ], [ "com.azure.resourcemanager.avs.implementation.ScriptExecutionsClientImpl$ScriptExecutionsService" ], [ "com.azure.resourcemanager.avs.implementation.ScriptPackagesClientImpl$ScriptPackagesService" ], [ "com.azure.resourcemanager.avs.implementation.ScriptCmdletsClientImpl$ScriptCmdletsService" ], [ "com.azure.resourcemanager.avs.implementation.WorkloadNetworksClientImpl$WorkloadNetworksService" ] ] \ No newline at end of file diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-avs/reflect-config.json b/sdk/avs/azure-resourcemanager-avs/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-avs/reflect-config.json new file mode 100644 index 0000000000000..b3de310d93ae4 --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-avs/reflect-config.json @@ -0,0 +1,926 @@ +[ { + "name" : "com.azure.resourcemanager.avs.models.OperationListResult", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.avs.fluent.models.OperationInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.avs.models.OperationDisplay", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.avs.fluent.models.QuotaInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.avs.models.Sku", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.avs.fluent.models.TrialInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.avs.models.PrivateCloudListResult", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.avs.fluent.models.PrivateCloudInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.avs.fluent.models.PrivateCloudProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.avs.models.ManagementCluster", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.avs.models.IdentitySource", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.avs.models.AvailabilityProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.avs.models.Encryption", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.avs.models.EncryptionKeyVaultProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.avs.models.Circuit", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.avs.models.Endpoints", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.avs.models.SystemAssignedServiceIdentity", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.avs.models.PrivateCloudUpdate", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.avs.fluent.models.PrivateCloudUpdateProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.avs.models.AddonListResult", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.avs.fluent.models.AddonInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.avs.models.AddonProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.avs.models.ExpressRouteAuthorizationListResult", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.avs.fluent.models.ExpressRouteAuthorizationInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.avs.fluent.models.ExpressRouteAuthorizationProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.avs.models.CloudLinkListResult", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.avs.fluent.models.CloudLinkInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.avs.fluent.models.CloudLinkProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.avs.models.ClusterListResult", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.avs.fluent.models.ClusterInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.avs.fluent.models.ClusterProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.avs.models.ClusterUpdate", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.avs.fluent.models.ClusterUpdateProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.avs.models.DatastoreListResult", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.avs.fluent.models.DatastoreInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.avs.fluent.models.DatastoreProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.avs.models.NetAppVolume", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.avs.models.DiskPoolVolume", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.avs.models.ElasticSanVolume", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.avs.fluent.models.ClusterZoneListInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.avs.models.ClusterZone", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.avs.models.PlacementPolicyListResult", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.avs.fluent.models.PlacementPolicyInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.avs.models.PlacementPolicyProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.avs.models.PlacementPolicyUpdate", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.avs.fluent.models.PlacementPolicyUpdateProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.avs.models.VirtualMachineListResult", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.avs.fluent.models.VirtualMachineInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.avs.fluent.models.VirtualMachineProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.avs.models.VirtualMachineRestrictMovement", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.avs.models.GlobalReachConnectionListResult", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.avs.fluent.models.GlobalReachConnectionInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.avs.fluent.models.GlobalReachConnectionProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.avs.models.HcxEnterpriseSiteListResult", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.avs.fluent.models.HcxEnterpriseSiteInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.avs.fluent.models.HcxEnterpriseSiteProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.avs.models.IscsiPathListResult", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.avs.fluent.models.IscsiPathInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.avs.fluent.models.IscsiPathProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.avs.fluent.models.AdminCredentialsInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.avs.models.ScriptExecutionListResult", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.avs.fluent.models.ScriptExecutionInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.avs.fluent.models.ScriptExecutionProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.avs.models.ScriptExecutionParameter", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.avs.models.ScriptPackageListResult", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.avs.fluent.models.ScriptPackageInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.avs.fluent.models.ScriptPackageProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.avs.models.ScriptCmdletListResult", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.avs.fluent.models.ScriptCmdletInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.avs.fluent.models.ScriptCmdletProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.avs.models.ScriptParameter", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.avs.models.WorkloadNetworkListResult", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.avs.fluent.models.WorkloadNetworkInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.avs.fluent.models.WorkloadNetworkProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.avs.models.WorkloadNetworkDhcpListResult", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.avs.fluent.models.WorkloadNetworkDhcpInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.avs.models.WorkloadNetworkDhcpEntity", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.avs.models.WorkloadNetworkDhcpUpdate", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.avs.models.WorkloadNetworkDhcpEntityUpdate", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.avs.models.WorkloadNetworkDnsServiceListResult", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.avs.fluent.models.WorkloadNetworkDnsServiceInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.avs.fluent.models.WorkloadNetworkDnsServiceProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.avs.models.WorkloadNetworkDnsServiceUpdate", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.avs.models.WorkloadNetworkDnsZoneListResult", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.avs.fluent.models.WorkloadNetworkDnsZoneInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.avs.fluent.models.WorkloadNetworkDnsZoneProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.avs.models.WorkloadNetworkDnsZoneUpdate", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.avs.models.WorkloadNetworkGatewayListResult", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.avs.fluent.models.WorkloadNetworkGatewayInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.avs.fluent.models.WorkloadNetworkGatewayProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.avs.models.WorkloadNetworkPortMirroringListResult", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.avs.fluent.models.WorkloadNetworkPortMirroringInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.avs.fluent.models.WorkloadNetworkPortMirroringProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.avs.models.WorkloadNetworkPortMirroringUpdate", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.avs.models.WorkloadNetworkPublicIpListResult", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.avs.fluent.models.WorkloadNetworkPublicIpInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.avs.fluent.models.WorkloadNetworkPublicIpProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.avs.models.WorkloadNetworkSegmentListResult", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.avs.fluent.models.WorkloadNetworkSegmentInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.avs.fluent.models.WorkloadNetworkSegmentProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.avs.models.WorkloadNetworkSegmentSubnet", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.avs.models.WorkloadNetworkSegmentPortVif", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.avs.models.WorkloadNetworkSegmentUpdate", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.avs.models.WorkloadNetworkVirtualMachineListResult", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.avs.fluent.models.WorkloadNetworkVirtualMachineInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.avs.fluent.models.WorkloadNetworkVirtualMachineProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.avs.models.WorkloadNetworkVMGroupListResult", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.avs.fluent.models.WorkloadNetworkVMGroupInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.avs.fluent.models.WorkloadNetworkVMGroupProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.avs.models.WorkloadNetworkVMGroupUpdate", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.avs.models.AddonArcProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.avs.models.AddonHcxProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.avs.models.AddonSrmProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.avs.models.AddonVrProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.avs.models.PSCredentialExecutionParameter", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.avs.models.ScriptSecureStringExecutionParameter", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.avs.models.ScriptStringExecutionParameter", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.avs.models.VmHostPlacementPolicyProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.avs.models.VmPlacementPolicyProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.avs.models.WorkloadNetworkDhcpRelay", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.avs.models.WorkloadNetworkDhcpRelayUpdate", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.avs.models.WorkloadNetworkDhcpServer", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.avs.models.WorkloadNetworkDhcpServerUpdate", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.avs.models.Origin", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.avs.models.ActionType", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.avs.models.QuotaEnabled", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.avs.models.TrialStatus", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.avs.models.ClusterProvisioningState", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.avs.models.InternetEnum", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.avs.models.SslEnum", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.avs.models.AvailabilityStrategy", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.avs.models.EncryptionState", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.avs.models.EncryptionKeyStatus", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.avs.models.EncryptionVersionType", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.avs.models.PrivateCloudProvisioningState", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.avs.models.NsxPublicIpQuotaRaisedEnum", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.avs.models.DnsZoneType", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.avs.models.SystemAssignedServiceIdentityType", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.avs.models.AddonType", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.avs.models.AddonProvisioningState", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.avs.models.ExpressRouteAuthorizationProvisioningState", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.avs.models.CloudLinkProvisioningState", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.avs.models.CloudLinkStatus", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.avs.models.DatastoreProvisioningState", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.avs.models.MountOptionEnum", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.avs.models.DatastoreStatus", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.avs.models.PlacementPolicyType", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.avs.models.PlacementPolicyState", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.avs.models.PlacementPolicyProvisioningState", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.avs.models.AffinityStrength", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.avs.models.AzureHybridBenefitType", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.avs.models.VirtualMachineProvisioningState", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.avs.models.VirtualMachineRestrictMovementState", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.avs.models.GlobalReachConnectionProvisioningState", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.avs.models.GlobalReachConnectionStatus", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.avs.models.HcxEnterpriseSiteProvisioningState", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.avs.models.HcxEnterpriseSiteStatus", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.avs.models.IscsiPathProvisioningState", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.avs.models.ScriptExecutionParameterType", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.avs.models.ScriptExecutionProvisioningState", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.avs.models.ScriptOutputStreamType", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.avs.models.ScriptPackageProvisioningState", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.avs.models.ScriptCmdletProvisioningState", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.avs.models.ScriptCmdletAudience", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.avs.models.ScriptParameterTypes", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.avs.models.VisibilityParameterEnum", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.avs.models.OptionalParamEnum", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.avs.models.WorkloadNetworkProvisioningState", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.avs.models.DhcpTypeEnum", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.avs.models.WorkloadNetworkDhcpProvisioningState", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.avs.models.DnsServiceLogLevelEnum", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.avs.models.DnsServiceStatusEnum", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.avs.models.WorkloadNetworkDnsServiceProvisioningState", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.avs.models.WorkloadNetworkDnsZoneProvisioningState", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.avs.models.PortMirroringDirectionEnum", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.avs.models.PortMirroringStatusEnum", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.avs.models.WorkloadNetworkPortMirroringProvisioningState", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.avs.models.WorkloadNetworkPublicIpProvisioningState", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.avs.models.SegmentStatusEnum", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.avs.models.WorkloadNetworkSegmentProvisioningState", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.avs.models.VMTypeEnum", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.avs.models.VMGroupStatusEnum", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.avs.models.WorkloadNetworkVMGroupProvisioningState", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.avs.models.AffinityType", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.avs.models.SkuTier", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +} ] \ No newline at end of file diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/AddonsCreateOrUpdateSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/AddonsCreateOrUpdateSamples.java index cd8e91e2663f5..3341b141bc404 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/AddonsCreateOrUpdateSamples.java +++ b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/AddonsCreateOrUpdateSamples.java @@ -9,76 +9,65 @@ import com.azure.resourcemanager.avs.models.AddonSrmProperties; import com.azure.resourcemanager.avs.models.AddonVrProperties; -/** Samples for Addons CreateOrUpdate. */ +/** + * Samples for Addons CreateOrUpdate. + */ public final class AddonsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/Addons_CreateOrUpdate_HCX.json + * x-ms-original-file: + * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/Addons_CreateOrUpdate_HCX.json */ /** * Sample code: Addons_CreateOrUpdate_HCX. - * + * * @param manager Entry point to AvsManager. */ public static void addonsCreateOrUpdateHCX(com.azure.resourcemanager.avs.AvsManager manager) { - manager - .addons() - .define("hcx") - .withExistingPrivateCloud("group1", "cloud1") - .withProperties(new AddonHcxProperties().withOffer("VMware MaaS Cloud Provider (Enterprise)")) - .create(); + manager.addons().define("hcx").withExistingPrivateCloud("group1", "cloud1") + .withProperties(new AddonHcxProperties().withOffer("VMware MaaS Cloud Provider (Enterprise)")).create(); } /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/Addons_CreateOrUpdate_SRM.json + * x-ms-original-file: + * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/Addons_CreateOrUpdate_SRM.json */ /** * Sample code: Addons_CreateOrUpdate_SRM. - * + * * @param manager Entry point to AvsManager. */ public static void addonsCreateOrUpdateSRM(com.azure.resourcemanager.avs.AvsManager manager) { - manager - .addons() - .define("srm") - .withExistingPrivateCloud("group1", "cloud1") - .withProperties(new AddonSrmProperties().withLicenseKey("fakeTokenPlaceholder")) - .create(); + manager.addons().define("srm").withExistingPrivateCloud("group1", "cloud1") + .withProperties(new AddonSrmProperties().withLicenseKey("fakeTokenPlaceholder")).create(); } /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/Addons_CreateOrUpdate_ArcReg.json + * x-ms-original-file: + * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/Addons_CreateOrUpdate_ArcReg.json */ /** - * Sample code: Addons_CreateOrUpdate_Arc. - * + * Sample code: Addons_CreateOrUpdate_ArcReg. + * * @param manager Entry point to AvsManager. */ - public static void addonsCreateOrUpdateArc(com.azure.resourcemanager.avs.AvsManager manager) { - manager - .addons() - .define("arc") - .withExistingPrivateCloud("group1", "cloud1") - .withProperties( - new AddonArcProperties() - .withVCenter( - "subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg_test/providers/Microsoft.ConnectedVMwarevSphere/VCenters/test-vcenter")) + public static void addonsCreateOrUpdateArcReg(com.azure.resourcemanager.avs.AvsManager manager) { + manager.addons().define("arc").withExistingPrivateCloud("group1", "cloud1") + .withProperties(new AddonArcProperties().withVCenter( + "subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg_test/providers/Microsoft.ConnectedVMwarevSphere/VCenters/test-vcenter")) .create(); } /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/Addons_CreateOrUpdate_VR.json + * x-ms-original-file: + * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/Addons_CreateOrUpdate_VR.json */ /** * Sample code: Addons_CreateOrUpdate_VR. - * + * * @param manager Entry point to AvsManager. */ public static void addonsCreateOrUpdateVR(com.azure.resourcemanager.avs.AvsManager manager) { - manager - .addons() - .define("vr") - .withExistingPrivateCloud("group1", "cloud1") - .withProperties(new AddonVrProperties().withVrsCount(1)) - .create(); + manager.addons().define("vr").withExistingPrivateCloud("group1", "cloud1") + .withProperties(new AddonVrProperties().withVrsCount(1)).create(); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/AddonsDeleteSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/AddonsDeleteSamples.java index 9f4b870caad05..f349917d9e7f6 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/AddonsDeleteSamples.java +++ b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/AddonsDeleteSamples.java @@ -4,14 +4,17 @@ package com.azure.resourcemanager.avs.generated; -/** Samples for Addons Delete. */ +/** + * Samples for Addons Delete. + */ public final class AddonsDeleteSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/Addons_Delete.json + * x-ms-original-file: + * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/Addons_Delete.json */ /** * Sample code: Addons_Delete. - * + * * @param manager Entry point to AvsManager. */ public static void addonsDelete(com.azure.resourcemanager.avs.AvsManager manager) { diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/AddonsGetSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/AddonsGetSamples.java index 2f8415aaaf110..56796ee7a6ac6 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/AddonsGetSamples.java +++ b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/AddonsGetSamples.java @@ -4,14 +4,17 @@ package com.azure.resourcemanager.avs.generated; -/** Samples for Addons Get. */ +/** + * Samples for Addons Get. + */ public final class AddonsGetSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/Addons_Get_SRM.json + * x-ms-original-file: + * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/Addons_Get_SRM.json */ /** * Sample code: Addons_Get_SRM. - * + * * @param manager Entry point to AvsManager. */ public static void addonsGetSRM(com.azure.resourcemanager.avs.AvsManager manager) { @@ -19,11 +22,12 @@ public static void addonsGetSRM(com.azure.resourcemanager.avs.AvsManager manager } /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/Addons_Get_VR.json + * x-ms-original-file: + * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/Addons_Get_VR.json */ /** * Sample code: Addons_Get_VR. - * + * * @param manager Entry point to AvsManager. */ public static void addonsGetVR(com.azure.resourcemanager.avs.AvsManager manager) { @@ -31,11 +35,12 @@ public static void addonsGetVR(com.azure.resourcemanager.avs.AvsManager manager) } /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/Addons_Get_HCX.json + * x-ms-original-file: + * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/Addons_Get_HCX.json */ /** * Sample code: Addons_Get_HCX. - * + * * @param manager Entry point to AvsManager. */ public static void addonsGetHCX(com.azure.resourcemanager.avs.AvsManager manager) { @@ -43,11 +48,12 @@ public static void addonsGetHCX(com.azure.resourcemanager.avs.AvsManager manager } /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/Addons_Get_ArcReg.json + * x-ms-original-file: + * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/Addons_Get_ArcReg.json */ /** * Sample code: Addons_Get_ArcReg. - * + * * @param manager Entry point to AvsManager. */ public static void addonsGetArcReg(com.azure.resourcemanager.avs.AvsManager manager) { diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/AddonsListSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/AddonsListSamples.java index a4ff18f33b802..7a0ae9b4749f2 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/AddonsListSamples.java +++ b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/AddonsListSamples.java @@ -4,14 +4,17 @@ package com.azure.resourcemanager.avs.generated; -/** Samples for Addons List. */ +/** + * Samples for Addons List. + */ public final class AddonsListSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/Addons_List.json + * x-ms-original-file: + * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/Addons_List.json */ /** * Sample code: Addons_List. - * + * * @param manager Entry point to AvsManager. */ public static void addonsList(com.azure.resourcemanager.avs.AvsManager manager) { diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/AuthorizationsCreateOrUpdateSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/AuthorizationsCreateOrUpdateSamples.java index 177ed6d865b81..63126d910ffd1 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/AuthorizationsCreateOrUpdateSamples.java +++ b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/AuthorizationsCreateOrUpdateSamples.java @@ -4,14 +4,17 @@ package com.azure.resourcemanager.avs.generated; -/** Samples for Authorizations CreateOrUpdate. */ +/** + * Samples for Authorizations CreateOrUpdate. + */ public final class AuthorizationsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/Authorizations_CreateOrUpdate.json + * x-ms-original-file: + * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/Authorizations_CreateOrUpdate.json */ /** * Sample code: Authorizations_CreateOrUpdate. - * + * * @param manager Entry point to AvsManager. */ public static void authorizationsCreateOrUpdate(com.azure.resourcemanager.avs.AvsManager manager) { diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/AuthorizationsDeleteSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/AuthorizationsDeleteSamples.java index 0fe566511f34e..f8bbe20e72a24 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/AuthorizationsDeleteSamples.java +++ b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/AuthorizationsDeleteSamples.java @@ -4,14 +4,17 @@ package com.azure.resourcemanager.avs.generated; -/** Samples for Authorizations Delete. */ +/** + * Samples for Authorizations Delete. + */ public final class AuthorizationsDeleteSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/Authorizations_Delete.json + * x-ms-original-file: + * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/Authorizations_Delete.json */ /** * Sample code: Authorizations_Delete. - * + * * @param manager Entry point to AvsManager. */ public static void authorizationsDelete(com.azure.resourcemanager.avs.AvsManager manager) { diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/AuthorizationsGetSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/AuthorizationsGetSamples.java index 424d753165df2..0afd26a686a1f 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/AuthorizationsGetSamples.java +++ b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/AuthorizationsGetSamples.java @@ -4,19 +4,21 @@ package com.azure.resourcemanager.avs.generated; -/** Samples for Authorizations Get. */ +/** + * Samples for Authorizations Get. + */ public final class AuthorizationsGetSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/Authorizations_Get.json + * x-ms-original-file: + * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/Authorizations_Get.json */ /** * Sample code: Authorizations_Get. - * + * * @param manager Entry point to AvsManager. */ public static void authorizationsGet(com.azure.resourcemanager.avs.AvsManager manager) { - manager - .authorizations() - .getWithResponse("group1", "cloud1", "authorization1", com.azure.core.util.Context.NONE); + manager.authorizations().getWithResponse("group1", "cloud1", "authorization1", + com.azure.core.util.Context.NONE); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/AuthorizationsListSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/AuthorizationsListSamples.java index bbd525d1c66d5..755f8e2f56280 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/AuthorizationsListSamples.java +++ b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/AuthorizationsListSamples.java @@ -4,14 +4,17 @@ package com.azure.resourcemanager.avs.generated; -/** Samples for Authorizations List. */ +/** + * Samples for Authorizations List. + */ public final class AuthorizationsListSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/Authorizations_List.json + * x-ms-original-file: + * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/Authorizations_List.json */ /** * Sample code: Authorizations_List. - * + * * @param manager Entry point to AvsManager. */ public static void authorizationsList(com.azure.resourcemanager.avs.AvsManager manager) { diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/CloudLinksCreateOrUpdateSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/CloudLinksCreateOrUpdateSamples.java index be3c0538550f9..a4d4c32541ee0 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/CloudLinksCreateOrUpdateSamples.java +++ b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/CloudLinksCreateOrUpdateSamples.java @@ -4,23 +4,22 @@ package com.azure.resourcemanager.avs.generated; -/** Samples for CloudLinks CreateOrUpdate. */ +/** + * Samples for CloudLinks CreateOrUpdate. + */ public final class CloudLinksCreateOrUpdateSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/CloudLinks_CreateOrUpdate.json + * x-ms-original-file: + * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/CloudLinks_CreateOrUpdate.json */ /** * Sample code: CloudLinks_CreateOrUpdate. - * + * * @param manager Entry point to AvsManager. */ public static void cloudLinksCreateOrUpdate(com.azure.resourcemanager.avs.AvsManager manager) { - manager - .cloudLinks() - .define("cloudLink1") - .withExistingPrivateCloud("group1", "cloud1") - .withLinkedCloud( - "/subscriptions/12341234-1234-1234-1234-123412341234/resourceGroups/mygroup/providers/Microsoft.AVS/privateClouds/cloud2") + manager.cloudLinks().define("cloudLink1").withExistingPrivateCloud("group1", "cloud1").withLinkedCloud( + "/subscriptions/12341234-1234-1234-1234-123412341234/resourceGroups/mygroup/providers/Microsoft.AVS/privateClouds/cloud2") .create(); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/CloudLinksDeleteSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/CloudLinksDeleteSamples.java index 0ee6a66e6f137..31bf24f15c4a5 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/CloudLinksDeleteSamples.java +++ b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/CloudLinksDeleteSamples.java @@ -4,14 +4,17 @@ package com.azure.resourcemanager.avs.generated; -/** Samples for CloudLinks Delete. */ +/** + * Samples for CloudLinks Delete. + */ public final class CloudLinksDeleteSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/CloudLinks_Delete.json + * x-ms-original-file: + * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/CloudLinks_Delete.json */ /** * Sample code: CloudLinks_Delete. - * + * * @param manager Entry point to AvsManager. */ public static void cloudLinksDelete(com.azure.resourcemanager.avs.AvsManager manager) { diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/CloudLinksGetSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/CloudLinksGetSamples.java index 442220d19a858..177850fb751ef 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/CloudLinksGetSamples.java +++ b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/CloudLinksGetSamples.java @@ -4,14 +4,17 @@ package com.azure.resourcemanager.avs.generated; -/** Samples for CloudLinks Get. */ +/** + * Samples for CloudLinks Get. + */ public final class CloudLinksGetSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/CloudLinks_Get.json + * x-ms-original-file: + * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/CloudLinks_Get.json */ /** * Sample code: CloudLinks_Get. - * + * * @param manager Entry point to AvsManager. */ public static void cloudLinksGet(com.azure.resourcemanager.avs.AvsManager manager) { diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/CloudLinksListSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/CloudLinksListSamples.java index e374f96679899..d913adaf9ca0d 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/CloudLinksListSamples.java +++ b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/CloudLinksListSamples.java @@ -4,14 +4,17 @@ package com.azure.resourcemanager.avs.generated; -/** Samples for CloudLinks List. */ +/** + * Samples for CloudLinks List. + */ public final class CloudLinksListSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/CloudLinks_List.json + * x-ms-original-file: + * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/CloudLinks_List.json */ /** * Sample code: CloudLinks_List. - * + * * @param manager Entry point to AvsManager. */ public static void cloudLinksList(com.azure.resourcemanager.avs.AvsManager manager) { diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/ClustersCreateOrUpdateSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/ClustersCreateOrUpdateSamples.java index 472902db04ec0..15d40eec3d814 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/ClustersCreateOrUpdateSamples.java +++ b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/ClustersCreateOrUpdateSamples.java @@ -6,23 +6,21 @@ import com.azure.resourcemanager.avs.models.Sku; -/** Samples for Clusters CreateOrUpdate. */ +/** + * Samples for Clusters CreateOrUpdate. + */ public final class ClustersCreateOrUpdateSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/Clusters_CreateOrUpdate.json + * x-ms-original-file: + * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/Clusters_CreateOrUpdate.json */ /** * Sample code: Clusters_CreateOrUpdate. - * + * * @param manager Entry point to AvsManager. */ public static void clustersCreateOrUpdate(com.azure.resourcemanager.avs.AvsManager manager) { - manager - .clusters() - .define("cluster1") - .withExistingPrivateCloud("group1", "cloud1") - .withSku(new Sku().withName("AV20")) - .withClusterSize(3) - .create(); + manager.clusters().define("cluster1").withExistingPrivateCloud("group1", "cloud1") + .withSku(new Sku().withName("AV20")).withClusterSize(3).create(); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/ClustersDeleteSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/ClustersDeleteSamples.java index 89ef4d8d98f13..0b557c7795d37 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/ClustersDeleteSamples.java +++ b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/ClustersDeleteSamples.java @@ -4,14 +4,17 @@ package com.azure.resourcemanager.avs.generated; -/** Samples for Clusters Delete. */ +/** + * Samples for Clusters Delete. + */ public final class ClustersDeleteSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/Clusters_Delete.json + * x-ms-original-file: + * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/Clusters_Delete.json */ /** * Sample code: Clusters_Delete. - * + * * @param manager Entry point to AvsManager. */ public static void clustersDelete(com.azure.resourcemanager.avs.AvsManager manager) { diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/ClustersGetSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/ClustersGetSamples.java index 4e8515191b7e1..de560b3c5f447 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/ClustersGetSamples.java +++ b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/ClustersGetSamples.java @@ -4,14 +4,17 @@ package com.azure.resourcemanager.avs.generated; -/** Samples for Clusters Get. */ +/** + * Samples for Clusters Get. + */ public final class ClustersGetSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/Clusters_Get.json + * x-ms-original-file: + * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/Clusters_Get.json */ /** * Sample code: Clusters_Get. - * + * * @param manager Entry point to AvsManager. */ public static void clustersGet(com.azure.resourcemanager.avs.AvsManager manager) { diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/ClustersListSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/ClustersListSamples.java index ab4a22c7003b5..0e49756877633 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/ClustersListSamples.java +++ b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/ClustersListSamples.java @@ -4,14 +4,17 @@ package com.azure.resourcemanager.avs.generated; -/** Samples for Clusters List. */ +/** + * Samples for Clusters List. + */ public final class ClustersListSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/Clusters_List.json + * x-ms-original-file: + * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/Clusters_List.json */ /** * Sample code: Clusters_List. - * + * * @param manager Entry point to AvsManager. */ public static void clustersList(com.azure.resourcemanager.avs.AvsManager manager) { diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/ClustersListZonesSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/ClustersListZonesSamples.java index 8c3b199a6f843..5b57800e6215d 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/ClustersListZonesSamples.java +++ b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/ClustersListZonesSamples.java @@ -4,29 +4,33 @@ package com.azure.resourcemanager.avs.generated; -/** Samples for Clusters ListZones. */ +/** + * Samples for Clusters ListZones. + */ public final class ClustersListZonesSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/Clusters_ListZones_Stretched.json + * x-ms-original-file: + * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/Clusters_ListZones.json */ /** - * Sample code: Clusters_ListZoneData_Stretched. - * + * Sample code: Clusters_ListZones. + * * @param manager Entry point to AvsManager. */ - public static void clustersListZoneDataStretched(com.azure.resourcemanager.avs.AvsManager manager) { + public static void clustersListZones(com.azure.resourcemanager.avs.AvsManager manager) { manager.clusters().listZonesWithResponse("group1", "cloud1", "cluster1", com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/Clusters_ListZones.json + * x-ms-original-file: + * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/Clusters_ListZones_Stretched.json */ /** - * Sample code: Clusters_ListZoneData. - * + * Sample code: Clusters_ListZones_Stretched. + * * @param manager Entry point to AvsManager. */ - public static void clustersListZoneData(com.azure.resourcemanager.avs.AvsManager manager) { + public static void clustersListZonesStretched(com.azure.resourcemanager.avs.AvsManager manager) { manager.clusters().listZonesWithResponse("group1", "cloud1", "cluster1", com.azure.core.util.Context.NONE); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/ClustersUpdateSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/ClustersUpdateSamples.java index 031941d01a5e1..2a6adecdee0d3 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/ClustersUpdateSamples.java +++ b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/ClustersUpdateSamples.java @@ -6,22 +6,22 @@ import com.azure.resourcemanager.avs.models.Cluster; -/** Samples for Clusters Update. */ +/** + * Samples for Clusters Update. + */ public final class ClustersUpdateSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/Clusters_Update.json + * x-ms-original-file: + * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/Clusters_Update.json */ /** * Sample code: Clusters_Update. - * + * * @param manager Entry point to AvsManager. */ public static void clustersUpdate(com.azure.resourcemanager.avs.AvsManager manager) { - Cluster resource = - manager - .clusters() - .getWithResponse("group1", "cloud1", "cluster1", com.azure.core.util.Context.NONE) - .getValue(); + Cluster resource = manager.clusters() + .getWithResponse("group1", "cloud1", "cluster1", com.azure.core.util.Context.NONE).getValue(); resource.update().withClusterSize(4).apply(); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/DatastoresCreateOrUpdateSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/DatastoresCreateOrUpdateSamples.java index 3a4fb133745a2..f77c7d68d63e6 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/DatastoresCreateOrUpdateSamples.java +++ b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/DatastoresCreateOrUpdateSamples.java @@ -6,25 +6,23 @@ import com.azure.resourcemanager.avs.models.NetAppVolume; -/** Samples for Datastores CreateOrUpdate. */ +/** + * Samples for Datastores CreateOrUpdate. + */ public final class DatastoresCreateOrUpdateSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/Datastores_CreateOrUpdate.json + * x-ms-original-file: + * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/Datastores_CreateOrUpdate.json */ /** * Sample code: Datastores_CreateOrUpdate. - * + * * @param manager Entry point to AvsManager. */ public static void datastoresCreateOrUpdate(com.azure.resourcemanager.avs.AvsManager manager) { - manager - .datastores() - .define("datastore1") - .withExistingCluster("group1", "cloud1", "cluster1") - .withNetAppVolume( - new NetAppVolume() - .withId( - "/subscriptions/11111111-1111-1111-1111-111111111111/resourceGroups/ResourceGroup1/providers/Microsoft.NetApp/netAppAccounts/NetAppAccount1/capacityPools/CapacityPool1/volumes/NFSVol1")) + manager.datastores().define("datastore1").withExistingCluster("group1", "cloud1", "cluster1") + .withNetAppVolume(new NetAppVolume().withId( + "/subscriptions/11111111-1111-1111-1111-111111111111/resourceGroups/ResourceGroup1/providers/Microsoft.NetApp/netAppAccounts/NetAppAccount1/capacityPools/CapacityPool1/volumes/NFSVol1")) .create(); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/DatastoresDeleteSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/DatastoresDeleteSamples.java index 4f57874e9cae1..c22c6754286e4 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/DatastoresDeleteSamples.java +++ b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/DatastoresDeleteSamples.java @@ -4,14 +4,17 @@ package com.azure.resourcemanager.avs.generated; -/** Samples for Datastores Delete. */ +/** + * Samples for Datastores Delete. + */ public final class DatastoresDeleteSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/Datastores_Delete.json + * x-ms-original-file: + * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/Datastores_Delete.json */ /** * Sample code: Datastores_Delete. - * + * * @param manager Entry point to AvsManager. */ public static void datastoresDelete(com.azure.resourcemanager.avs.AvsManager manager) { diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/DatastoresGetSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/DatastoresGetSamples.java index 526721afa18f7..d12feaaf8d6de 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/DatastoresGetSamples.java +++ b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/DatastoresGetSamples.java @@ -4,19 +4,21 @@ package com.azure.resourcemanager.avs.generated; -/** Samples for Datastores Get. */ +/** + * Samples for Datastores Get. + */ public final class DatastoresGetSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/Datastores_Get.json + * x-ms-original-file: + * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/Datastores_Get.json */ /** * Sample code: Datastores_Get. - * + * * @param manager Entry point to AvsManager. */ public static void datastoresGet(com.azure.resourcemanager.avs.AvsManager manager) { - manager - .datastores() - .getWithResponse("group1", "cloud1", "cluster1", "datastore1", com.azure.core.util.Context.NONE); + manager.datastores().getWithResponse("group1", "cloud1", "cluster1", "datastore1", + com.azure.core.util.Context.NONE); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/DatastoresListSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/DatastoresListSamples.java index fa8d50667dc1f..441a855fe0620 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/DatastoresListSamples.java +++ b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/DatastoresListSamples.java @@ -4,14 +4,17 @@ package com.azure.resourcemanager.avs.generated; -/** Samples for Datastores List. */ +/** + * Samples for Datastores List. + */ public final class DatastoresListSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/Datastores_List.json + * x-ms-original-file: + * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/Datastores_List.json */ /** * Sample code: Datastores_List. - * + * * @param manager Entry point to AvsManager. */ public static void datastoresList(com.azure.resourcemanager.avs.AvsManager manager) { diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/GlobalReachConnectionsCreateOrUpdateSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/GlobalReachConnectionsCreateOrUpdateSamples.java index d0cc1a0860a41..5a17e17659371 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/GlobalReachConnectionsCreateOrUpdateSamples.java +++ b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/GlobalReachConnectionsCreateOrUpdateSamples.java @@ -4,21 +4,21 @@ package com.azure.resourcemanager.avs.generated; -/** Samples for GlobalReachConnections CreateOrUpdate. */ +/** + * Samples for GlobalReachConnections CreateOrUpdate. + */ public final class GlobalReachConnectionsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/GlobalReachConnections_CreateOrUpdate.json + * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/ + * GlobalReachConnections_CreateOrUpdate.json */ /** * Sample code: GlobalReachConnections_CreateOrUpdate. - * + * * @param manager Entry point to AvsManager. */ public static void globalReachConnectionsCreateOrUpdate(com.azure.resourcemanager.avs.AvsManager manager) { - manager - .globalReachConnections() - .define("connection1") - .withExistingPrivateCloud("group1", "cloud1") + manager.globalReachConnections().define("connection1").withExistingPrivateCloud("group1", "cloud1") .withAuthorizationKey("01010101-0101-0101-0101-010101010101") .withPeerExpressRouteCircuit( "/subscriptions/12341234-1234-1234-1234-123412341234/resourceGroups/mygroup/providers/Microsoft.Network/expressRouteCircuits/mypeer") diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/GlobalReachConnectionsDeleteSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/GlobalReachConnectionsDeleteSamples.java index c21f2b8fee24b..599f2ffaf2a2b 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/GlobalReachConnectionsDeleteSamples.java +++ b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/GlobalReachConnectionsDeleteSamples.java @@ -4,14 +4,17 @@ package com.azure.resourcemanager.avs.generated; -/** Samples for GlobalReachConnections Delete. */ +/** + * Samples for GlobalReachConnections Delete. + */ public final class GlobalReachConnectionsDeleteSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/GlobalReachConnections_Delete.json + * x-ms-original-file: + * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/GlobalReachConnections_Delete.json */ /** * Sample code: GlobalReachConnections_Delete. - * + * * @param manager Entry point to AvsManager. */ public static void globalReachConnectionsDelete(com.azure.resourcemanager.avs.AvsManager manager) { diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/GlobalReachConnectionsGetSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/GlobalReachConnectionsGetSamples.java index 9b562c9fe3ebb..cd0982c5a4c73 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/GlobalReachConnectionsGetSamples.java +++ b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/GlobalReachConnectionsGetSamples.java @@ -4,19 +4,21 @@ package com.azure.resourcemanager.avs.generated; -/** Samples for GlobalReachConnections Get. */ +/** + * Samples for GlobalReachConnections Get. + */ public final class GlobalReachConnectionsGetSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/GlobalReachConnections_Get.json + * x-ms-original-file: + * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/GlobalReachConnections_Get.json */ /** * Sample code: GlobalReachConnections_Get. - * + * * @param manager Entry point to AvsManager. */ public static void globalReachConnectionsGet(com.azure.resourcemanager.avs.AvsManager manager) { - manager - .globalReachConnections() - .getWithResponse("group1", "cloud1", "connection1", com.azure.core.util.Context.NONE); + manager.globalReachConnections().getWithResponse("group1", "cloud1", "connection1", + com.azure.core.util.Context.NONE); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/GlobalReachConnectionsListSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/GlobalReachConnectionsListSamples.java index 663bf721595dd..3cb609a06eaad 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/GlobalReachConnectionsListSamples.java +++ b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/GlobalReachConnectionsListSamples.java @@ -4,14 +4,17 @@ package com.azure.resourcemanager.avs.generated; -/** Samples for GlobalReachConnections List. */ +/** + * Samples for GlobalReachConnections List. + */ public final class GlobalReachConnectionsListSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/GlobalReachConnections_List.json + * x-ms-original-file: + * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/GlobalReachConnections_List.json */ /** * Sample code: GlobalReachConnections_List. - * + * * @param manager Entry point to AvsManager. */ public static void globalReachConnectionsList(com.azure.resourcemanager.avs.AvsManager manager) { diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/HcxEnterpriseSitesCreateOrUpdateSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/HcxEnterpriseSitesCreateOrUpdateSamples.java index 49ffbeacf4c7f..376bfde12df7b 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/HcxEnterpriseSitesCreateOrUpdateSamples.java +++ b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/HcxEnterpriseSitesCreateOrUpdateSamples.java @@ -4,14 +4,18 @@ package com.azure.resourcemanager.avs.generated; -/** Samples for HcxEnterpriseSites CreateOrUpdate. */ +/** + * Samples for HcxEnterpriseSites CreateOrUpdate. + */ public final class HcxEnterpriseSitesCreateOrUpdateSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/HcxEnterpriseSites_CreateOrUpdate.json + * x-ms-original-file: + * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/HcxEnterpriseSites_CreateOrUpdate. + * json */ /** * Sample code: HcxEnterpriseSites_CreateOrUpdate. - * + * * @param manager Entry point to AvsManager. */ public static void hcxEnterpriseSitesCreateOrUpdate(com.azure.resourcemanager.avs.AvsManager manager) { diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/HcxEnterpriseSitesDeleteSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/HcxEnterpriseSitesDeleteSamples.java index c6d26c8d353d0..2e2bf093711bd 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/HcxEnterpriseSitesDeleteSamples.java +++ b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/HcxEnterpriseSitesDeleteSamples.java @@ -4,14 +4,17 @@ package com.azure.resourcemanager.avs.generated; -/** Samples for HcxEnterpriseSites Delete. */ +/** + * Samples for HcxEnterpriseSites Delete. + */ public final class HcxEnterpriseSitesDeleteSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/HcxEnterpriseSites_Delete.json + * x-ms-original-file: + * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/HcxEnterpriseSites_Delete.json */ /** * Sample code: HcxEnterpriseSites_Delete. - * + * * @param manager Entry point to AvsManager. */ public static void hcxEnterpriseSitesDelete(com.azure.resourcemanager.avs.AvsManager manager) { diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/HcxEnterpriseSitesGetSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/HcxEnterpriseSitesGetSamples.java index 0f7e4b6eb51cf..eaa84e987a75a 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/HcxEnterpriseSitesGetSamples.java +++ b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/HcxEnterpriseSitesGetSamples.java @@ -4,14 +4,17 @@ package com.azure.resourcemanager.avs.generated; -/** Samples for HcxEnterpriseSites Get. */ +/** + * Samples for HcxEnterpriseSites Get. + */ public final class HcxEnterpriseSitesGetSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/HcxEnterpriseSites_Get.json + * x-ms-original-file: + * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/HcxEnterpriseSites_Get.json */ /** * Sample code: HcxEnterpriseSites_Get. - * + * * @param manager Entry point to AvsManager. */ public static void hcxEnterpriseSitesGet(com.azure.resourcemanager.avs.AvsManager manager) { diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/HcxEnterpriseSitesListSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/HcxEnterpriseSitesListSamples.java index 15722a61b938f..d5144b06bc094 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/HcxEnterpriseSitesListSamples.java +++ b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/HcxEnterpriseSitesListSamples.java @@ -4,14 +4,17 @@ package com.azure.resourcemanager.avs.generated; -/** Samples for HcxEnterpriseSites List. */ +/** + * Samples for HcxEnterpriseSites List. + */ public final class HcxEnterpriseSitesListSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/HcxEnterpriseSites_List.json + * x-ms-original-file: + * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/HcxEnterpriseSites_List.json */ /** * Sample code: HcxEnterpriseSites_List. - * + * * @param manager Entry point to AvsManager. */ public static void hcxEnterpriseSitesList(com.azure.resourcemanager.avs.AvsManager manager) { diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/IscsiPathsCreateOrUpdateSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/IscsiPathsCreateOrUpdateSamples.java new file mode 100644 index 0000000000000..02adee0a8890a --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/IscsiPathsCreateOrUpdateSamples.java @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.avs.generated; + +import com.azure.resourcemanager.avs.fluent.models.IscsiPathInner; + +/** + * Samples for IscsiPaths CreateOrUpdate. + */ +public final class IscsiPathsCreateOrUpdateSamples { + /* + * x-ms-original-file: + * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/IscsiPaths_CreateOrUpdate.json + */ + /** + * Sample code: IscsiPaths_CreateOrUpdate. + * + * @param manager Entry point to AvsManager. + */ + public static void iscsiPathsCreateOrUpdate(com.azure.resourcemanager.avs.AvsManager manager) { + manager.iscsiPaths().createOrUpdate("group1", "cloud1", new IscsiPathInner().withNetworkBlock("192.168.0.0/24"), + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/IscsiPathsDeleteSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/IscsiPathsDeleteSamples.java new file mode 100644 index 0000000000000..8fbfd8f8ec0e5 --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/IscsiPathsDeleteSamples.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.avs.generated; + +/** + * Samples for IscsiPaths Delete. + */ +public final class IscsiPathsDeleteSamples { + /* + * x-ms-original-file: + * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/IscsiPaths_Delete.json + */ + /** + * Sample code: IscsiPaths_Delete. + * + * @param manager Entry point to AvsManager. + */ + public static void iscsiPathsDelete(com.azure.resourcemanager.avs.AvsManager manager) { + manager.iscsiPaths().delete("group1", "cloud1", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/IscsiPathsGetSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/IscsiPathsGetSamples.java new file mode 100644 index 0000000000000..b29e1a44475e9 --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/IscsiPathsGetSamples.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.avs.generated; + +/** + * Samples for IscsiPaths Get. + */ +public final class IscsiPathsGetSamples { + /* + * x-ms-original-file: + * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/IscsiPaths_Get.json + */ + /** + * Sample code: IscsiPaths_Get. + * + * @param manager Entry point to AvsManager. + */ + public static void iscsiPathsGet(com.azure.resourcemanager.avs.AvsManager manager) { + manager.iscsiPaths().getWithResponse("group1", "cloud1", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/IscsiPathsListByPrivateCloudSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/IscsiPathsListByPrivateCloudSamples.java new file mode 100644 index 0000000000000..0d70ce515a6dc --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/IscsiPathsListByPrivateCloudSamples.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.avs.generated; + +/** + * Samples for IscsiPaths ListByPrivateCloud. + */ +public final class IscsiPathsListByPrivateCloudSamples { + /* + * x-ms-original-file: + * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/IscsiPaths_List.json + */ + /** + * Sample code: IscsiPaths_ListByPrivateCloud. + * + * @param manager Entry point to AvsManager. + */ + public static void iscsiPathsListByPrivateCloud(com.azure.resourcemanager.avs.AvsManager manager) { + manager.iscsiPaths().listByPrivateCloud("group1", "cloud1", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/LocationsCheckQuotaAvailabilitySamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/LocationsCheckQuotaAvailabilitySamples.java index 960d85f9f8fa9..9333ca14d8f00 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/LocationsCheckQuotaAvailabilitySamples.java +++ b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/LocationsCheckQuotaAvailabilitySamples.java @@ -4,14 +4,18 @@ package com.azure.resourcemanager.avs.generated; -/** Samples for Locations CheckQuotaAvailability. */ +/** + * Samples for Locations CheckQuotaAvailability. + */ public final class LocationsCheckQuotaAvailabilitySamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/Locations_CheckQuotaAvailability.json + * x-ms-original-file: + * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/Locations_CheckQuotaAvailability. + * json */ /** * Sample code: Locations_CheckQuotaAvailability. - * + * * @param manager Entry point to AvsManager. */ public static void locationsCheckQuotaAvailability(com.azure.resourcemanager.avs.AvsManager manager) { diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/LocationsCheckTrialAvailabilitySamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/LocationsCheckTrialAvailabilitySamples.java index c5ee045ecd03e..741aedce91f1d 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/LocationsCheckTrialAvailabilitySamples.java +++ b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/LocationsCheckTrialAvailabilitySamples.java @@ -6,14 +6,18 @@ import com.azure.resourcemanager.avs.models.Sku; -/** Samples for Locations CheckTrialAvailability. */ +/** + * Samples for Locations CheckTrialAvailability. + */ public final class LocationsCheckTrialAvailabilitySamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/Locations_CheckTrialAvailability.json + * x-ms-original-file: + * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/Locations_CheckTrialAvailability. + * json */ /** * Sample code: Locations_CheckTrialAvailability. - * + * * @param manager Entry point to AvsManager. */ public static void locationsCheckTrialAvailability(com.azure.resourcemanager.avs.AvsManager manager) { @@ -21,17 +25,16 @@ public static void locationsCheckTrialAvailability(com.azure.resourcemanager.avs } /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/Locations_CheckTrialAvailabilityWithSku.json + * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/ + * Locations_CheckTrialAvailabilityWithSku.json */ /** * Sample code: Locations_CheckTrialAvailabilityWithSku. - * + * * @param manager Entry point to AvsManager. */ public static void locationsCheckTrialAvailabilityWithSku(com.azure.resourcemanager.avs.AvsManager manager) { - manager - .locations() - .checkTrialAvailabilityWithResponse( - "eastus", new Sku().withName("avs52t"), com.azure.core.util.Context.NONE); + manager.locations().checkTrialAvailabilityWithResponse("eastus", new Sku().withName("avs52t"), + com.azure.core.util.Context.NONE); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/OperationsListSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/OperationsListSamples.java index 9b99e71c0240b..62dcbfe849ea2 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/OperationsListSamples.java +++ b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/OperationsListSamples.java @@ -4,14 +4,17 @@ package com.azure.resourcemanager.avs.generated; -/** Samples for Operations List. */ +/** + * Samples for Operations List. + */ public final class OperationsListSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/Operations_List.json + * x-ms-original-file: + * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/Operations_List.json */ /** * Sample code: Operations_List. - * + * * @param manager Entry point to AvsManager. */ public static void operationsList(com.azure.resourcemanager.avs.AvsManager manager) { diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/PlacementPoliciesCreateOrUpdateSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/PlacementPoliciesCreateOrUpdateSamples.java index 426c471c3f682..058ac9da8b95d 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/PlacementPoliciesCreateOrUpdateSamples.java +++ b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/PlacementPoliciesCreateOrUpdateSamples.java @@ -10,37 +10,29 @@ import com.azure.resourcemanager.avs.models.VmHostPlacementPolicyProperties; import java.util.Arrays; -/** Samples for PlacementPolicies CreateOrUpdate. */ +/** + * Samples for PlacementPolicies CreateOrUpdate. + */ public final class PlacementPoliciesCreateOrUpdateSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/PlacementPolicies_CreateOrUpdate.json + * x-ms-original-file: + * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/PlacementPolicies_CreateOrUpdate. + * json */ /** * Sample code: PlacementPolicies_CreateOrUpdate. - * + * * @param manager Entry point to AvsManager. */ public static void placementPoliciesCreateOrUpdate(com.azure.resourcemanager.avs.AvsManager manager) { - manager - .placementPolicies() - .define("policy1") - .withExistingCluster("group1", "cloud1", "cluster1") - .withProperties( - new VmHostPlacementPolicyProperties() - .withVmMembers( - Arrays - .asList( - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.AVS/privateClouds/cloud1/clusters/cluster1/virtualMachines/vm-128", - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.AVS/privateClouds/cloud1/clusters/cluster1/virtualMachines/vm-256")) - .withHostMembers( - Arrays - .asList( - "fakehost22.nyc1.kubernetes.center", - "fakehost23.nyc1.kubernetes.center", - "fakehost24.nyc1.kubernetes.center")) - .withAffinityType(AffinityType.ANTI_AFFINITY) - .withAffinityStrength(AffinityStrength.MUST) - .withAzureHybridBenefitType(AzureHybridBenefitType.SQL_HOST)) + manager.placementPolicies().define("policy1").withExistingCluster("group1", "cloud1", "cluster1") + .withProperties(new VmHostPlacementPolicyProperties().withVmMembers(Arrays.asList( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.AVS/privateClouds/cloud1/clusters/cluster1/virtualMachines/vm-128", + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.AVS/privateClouds/cloud1/clusters/cluster1/virtualMachines/vm-256")) + .withHostMembers(Arrays.asList("fakehost22.nyc1.kubernetes.center", "fakehost23.nyc1.kubernetes.center", + "fakehost24.nyc1.kubernetes.center")) + .withAffinityType(AffinityType.ANTI_AFFINITY).withAffinityStrength(AffinityStrength.MUST) + .withAzureHybridBenefitType(AzureHybridBenefitType.SQL_HOST)) .create(); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/PlacementPoliciesDeleteSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/PlacementPoliciesDeleteSamples.java index 3c59eb32a60b6..d4f1a53e00cec 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/PlacementPoliciesDeleteSamples.java +++ b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/PlacementPoliciesDeleteSamples.java @@ -4,14 +4,17 @@ package com.azure.resourcemanager.avs.generated; -/** Samples for PlacementPolicies Delete. */ +/** + * Samples for PlacementPolicies Delete. + */ public final class PlacementPoliciesDeleteSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/PlacementPolicies_Delete.json + * x-ms-original-file: + * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/PlacementPolicies_Delete.json */ /** * Sample code: PlacementPolicies_Delete. - * + * * @param manager Entry point to AvsManager. */ public static void placementPoliciesDelete(com.azure.resourcemanager.avs.AvsManager manager) { diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/PlacementPoliciesGetSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/PlacementPoliciesGetSamples.java index e53235de950bd..aafc22510607e 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/PlacementPoliciesGetSamples.java +++ b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/PlacementPoliciesGetSamples.java @@ -4,19 +4,21 @@ package com.azure.resourcemanager.avs.generated; -/** Samples for PlacementPolicies Get. */ +/** + * Samples for PlacementPolicies Get. + */ public final class PlacementPoliciesGetSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/PlacementPolicies_Get.json + * x-ms-original-file: + * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/PlacementPolicies_Get.json */ /** * Sample code: PlacementPolicies_Get. - * + * * @param manager Entry point to AvsManager. */ public static void placementPoliciesGet(com.azure.resourcemanager.avs.AvsManager manager) { - manager - .placementPolicies() - .getWithResponse("group1", "cloud1", "cluster1", "policy1", com.azure.core.util.Context.NONE); + manager.placementPolicies().getWithResponse("group1", "cloud1", "cluster1", "policy1", + com.azure.core.util.Context.NONE); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/PlacementPoliciesListSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/PlacementPoliciesListSamples.java index cab472a9b79fb..16419e4519217 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/PlacementPoliciesListSamples.java +++ b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/PlacementPoliciesListSamples.java @@ -4,14 +4,17 @@ package com.azure.resourcemanager.avs.generated; -/** Samples for PlacementPolicies List. */ +/** + * Samples for PlacementPolicies List. + */ public final class PlacementPoliciesListSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/PlacementPolicies_List.json + * x-ms-original-file: + * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/PlacementPolicies_List.json */ /** * Sample code: PlacementPolicies_List. - * + * * @param manager Entry point to AvsManager. */ public static void placementPoliciesList(com.azure.resourcemanager.avs.AvsManager manager) { diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/PlacementPoliciesUpdateSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/PlacementPoliciesUpdateSamples.java index 817c8d0247ade..3c55d994d0dd7 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/PlacementPoliciesUpdateSamples.java +++ b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/PlacementPoliciesUpdateSamples.java @@ -10,38 +10,28 @@ import com.azure.resourcemanager.avs.models.PlacementPolicyState; import java.util.Arrays; -/** Samples for PlacementPolicies Update. */ +/** + * Samples for PlacementPolicies Update. + */ public final class PlacementPoliciesUpdateSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/PlacementPolicies_Update.json + * x-ms-original-file: + * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/PlacementPolicies_Update.json */ /** * Sample code: PlacementPolicies_Update. - * + * * @param manager Entry point to AvsManager. */ public static void placementPoliciesUpdate(com.azure.resourcemanager.avs.AvsManager manager) { - PlacementPolicy resource = - manager - .placementPolicies() - .getWithResponse("group1", "cloud1", "cluster1", "policy1", com.azure.core.util.Context.NONE) - .getValue(); - resource - .update() - .withState(PlacementPolicyState.DISABLED) - .withVmMembers( - Arrays - .asList( - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.AVS/privateClouds/cloud1/clusters/cluster1/virtualMachines/vm-128", - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.AVS/privateClouds/cloud1/clusters/cluster1/virtualMachines/vm-256")) - .withHostMembers( - Arrays - .asList( - "fakehost22.nyc1.kubernetes.center", - "fakehost23.nyc1.kubernetes.center", - "fakehost24.nyc1.kubernetes.center")) - .withAffinityStrength(AffinityStrength.MUST) - .withAzureHybridBenefitType(AzureHybridBenefitType.SQL_HOST) + PlacementPolicy resource = manager.placementPolicies() + .getWithResponse("group1", "cloud1", "cluster1", "policy1", com.azure.core.util.Context.NONE).getValue(); + resource.update().withState(PlacementPolicyState.DISABLED).withVmMembers(Arrays.asList( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.AVS/privateClouds/cloud1/clusters/cluster1/virtualMachines/vm-128", + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.AVS/privateClouds/cloud1/clusters/cluster1/virtualMachines/vm-256")) + .withHostMembers(Arrays.asList("fakehost22.nyc1.kubernetes.center", "fakehost23.nyc1.kubernetes.center", + "fakehost24.nyc1.kubernetes.center")) + .withAffinityStrength(AffinityStrength.MUST).withAzureHybridBenefitType(AzureHybridBenefitType.SQL_HOST) .apply(); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/PrivateCloudsCreateOrUpdateSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/PrivateCloudsCreateOrUpdateSamples.java index dd75c09bcf9f0..1d03b905fd22b 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/PrivateCloudsCreateOrUpdateSamples.java +++ b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/PrivateCloudsCreateOrUpdateSamples.java @@ -7,60 +7,50 @@ import com.azure.resourcemanager.avs.models.AvailabilityProperties; import com.azure.resourcemanager.avs.models.AvailabilityStrategy; import com.azure.resourcemanager.avs.models.ManagementCluster; -import com.azure.resourcemanager.avs.models.PrivateCloudIdentity; -import com.azure.resourcemanager.avs.models.ResourceIdentityType; import com.azure.resourcemanager.avs.models.Sku; +import com.azure.resourcemanager.avs.models.SystemAssignedServiceIdentity; +import com.azure.resourcemanager.avs.models.SystemAssignedServiceIdentityType; import java.util.HashMap; import java.util.Map; -/** Samples for PrivateClouds CreateOrUpdate. */ +/** + * Samples for PrivateClouds CreateOrUpdate. + */ public final class PrivateCloudsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/PrivateClouds_CreateOrUpdate.json + * x-ms-original-file: + * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/PrivateClouds_CreateOrUpdate.json */ /** * Sample code: PrivateClouds_CreateOrUpdate. - * + * * @param manager Entry point to AvsManager. */ public static void privateCloudsCreateOrUpdate(com.azure.resourcemanager.avs.AvsManager manager) { - manager - .privateClouds() - .define("cloud1") - .withRegion("eastus2") - .withExistingResourceGroup("group1") - .withSku(new Sku().withName("AV36")) - .withTags(mapOf()) - .withIdentity(new PrivateCloudIdentity().withType(ResourceIdentityType.SYSTEM_ASSIGNED)) - .withNetworkBlock("192.168.48.0/22") - .withManagementCluster(new ManagementCluster().withClusterSize(4)) + manager.privateClouds().define("cloud1").withRegion("eastus2").withExistingResourceGroup("group1") + .withSku(new Sku().withName("AV36")).withTags(mapOf()) + .withIdentity( + new SystemAssignedServiceIdentity().withType(SystemAssignedServiceIdentityType.SYSTEM_ASSIGNED)) + .withManagementCluster(new ManagementCluster().withClusterSize(4)).withNetworkBlock("192.168.48.0/22") .create(); } /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/PrivateClouds_CreateOrUpdate_Stretched.json + * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/ + * PrivateClouds_CreateOrUpdate_Stretched.json */ /** * Sample code: PrivateClouds_CreateOrUpdate_Stretched. - * + * * @param manager Entry point to AvsManager. */ public static void privateCloudsCreateOrUpdateStretched(com.azure.resourcemanager.avs.AvsManager manager) { - manager - .privateClouds() - .define("cloud1") - .withRegion("eastus2") - .withExistingResourceGroup("group1") - .withSku(new Sku().withName("AV36")) - .withTags(mapOf()) - .withNetworkBlock("192.168.48.0/22") + manager.privateClouds().define("cloud1").withRegion("eastus2").withExistingResourceGroup("group1") + .withSku(new Sku().withName("AV36")).withTags(mapOf()) .withManagementCluster(new ManagementCluster().withClusterSize(4)) - .withAvailability( - new AvailabilityProperties() - .withStrategy(AvailabilityStrategy.DUAL_ZONE) - .withZone(1) - .withSecondaryZone(2)) - .create(); + .withAvailability(new AvailabilityProperties().withStrategy(AvailabilityStrategy.DUAL_ZONE).withZone(1) + .withSecondaryZone(2)) + .withNetworkBlock("192.168.48.0/22").create(); } // Use "Map.of" if available diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/PrivateCloudsDeleteSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/PrivateCloudsDeleteSamples.java index 98c46377ad5d7..c868ab66c3ded 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/PrivateCloudsDeleteSamples.java +++ b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/PrivateCloudsDeleteSamples.java @@ -4,14 +4,17 @@ package com.azure.resourcemanager.avs.generated; -/** Samples for PrivateClouds Delete. */ +/** + * Samples for PrivateClouds Delete. + */ public final class PrivateCloudsDeleteSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/PrivateClouds_Delete.json + * x-ms-original-file: + * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/PrivateClouds_Delete.json */ /** * Sample code: PrivateClouds_Delete. - * + * * @param manager Entry point to AvsManager. */ public static void privateCloudsDelete(com.azure.resourcemanager.avs.AvsManager manager) { diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/PrivateCloudsGetByResourceGroupSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/PrivateCloudsGetByResourceGroupSamples.java index dcb4cea94c561..202da6f22009c 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/PrivateCloudsGetByResourceGroupSamples.java +++ b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/PrivateCloudsGetByResourceGroupSamples.java @@ -4,14 +4,17 @@ package com.azure.resourcemanager.avs.generated; -/** Samples for PrivateClouds GetByResourceGroup. */ +/** + * Samples for PrivateClouds GetByResourceGroup. + */ public final class PrivateCloudsGetByResourceGroupSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/PrivateClouds_Get.json + * x-ms-original-file: + * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/PrivateClouds_Get.json */ /** * Sample code: PrivateClouds_Get. - * + * * @param manager Entry point to AvsManager. */ public static void privateCloudsGet(com.azure.resourcemanager.avs.AvsManager manager) { @@ -19,11 +22,12 @@ public static void privateCloudsGet(com.azure.resourcemanager.avs.AvsManager man } /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/PrivateClouds_Get_Stretched.json + * x-ms-original-file: + * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/PrivateClouds_Get_Stretched.json */ /** * Sample code: PrivateClouds_Get_Stretched. - * + * * @param manager Entry point to AvsManager. */ public static void privateCloudsGetStretched(com.azure.resourcemanager.avs.AvsManager manager) { diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/PrivateCloudsListAdminCredentialsSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/PrivateCloudsListAdminCredentialsSamples.java index 9bf66b966312b..7270369f7aaad 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/PrivateCloudsListAdminCredentialsSamples.java +++ b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/PrivateCloudsListAdminCredentialsSamples.java @@ -4,14 +4,18 @@ package com.azure.resourcemanager.avs.generated; -/** Samples for PrivateClouds ListAdminCredentials. */ +/** + * Samples for PrivateClouds ListAdminCredentials. + */ public final class PrivateCloudsListAdminCredentialsSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/PrivateClouds_ListAdminCredentials.json + * x-ms-original-file: + * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/PrivateClouds_ListAdminCredentials + * .json */ /** * Sample code: PrivateClouds_ListAdminCredentials. - * + * * @param manager Entry point to AvsManager. */ public static void privateCloudsListAdminCredentials(com.azure.resourcemanager.avs.AvsManager manager) { diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/PrivateCloudsListByResourceGroupSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/PrivateCloudsListByResourceGroupSamples.java index 8d2c8b60c44c9..fbc4172d4db3b 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/PrivateCloudsListByResourceGroupSamples.java +++ b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/PrivateCloudsListByResourceGroupSamples.java @@ -4,14 +4,17 @@ package com.azure.resourcemanager.avs.generated; -/** Samples for PrivateClouds ListByResourceGroup. */ +/** + * Samples for PrivateClouds ListByResourceGroup. + */ public final class PrivateCloudsListByResourceGroupSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/PrivateClouds_List.json + * x-ms-original-file: + * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/PrivateClouds_List.json */ /** * Sample code: PrivateClouds_List. - * + * * @param manager Entry point to AvsManager. */ public static void privateCloudsList(com.azure.resourcemanager.avs.AvsManager manager) { @@ -19,11 +22,12 @@ public static void privateCloudsList(com.azure.resourcemanager.avs.AvsManager ma } /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/PrivateClouds_List_Stretched.json + * x-ms-original-file: + * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/PrivateClouds_List_Stretched.json */ /** * Sample code: PrivateClouds_List_Stretched. - * + * * @param manager Entry point to AvsManager. */ public static void privateCloudsListStretched(com.azure.resourcemanager.avs.AvsManager manager) { diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/PrivateCloudsListSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/PrivateCloudsListSamples.java index 63fdec99ca39f..27e74043fc555 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/PrivateCloudsListSamples.java +++ b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/PrivateCloudsListSamples.java @@ -4,14 +4,18 @@ package com.azure.resourcemanager.avs.generated; -/** Samples for PrivateClouds List. */ +/** + * Samples for PrivateClouds List. + */ public final class PrivateCloudsListSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/PrivateClouds_ListInSubscription.json + * x-ms-original-file: + * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/PrivateClouds_ListInSubscription. + * json */ /** * Sample code: PrivateClouds_ListInSubscription. - * + * * @param manager Entry point to AvsManager. */ public static void privateCloudsListInSubscription(com.azure.resourcemanager.avs.AvsManager manager) { @@ -19,11 +23,12 @@ public static void privateCloudsListInSubscription(com.azure.resourcemanager.avs } /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/PrivateClouds_ListInSubscription_Stretched.json + * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/ + * PrivateClouds_ListInSubscription_Stretched.json */ /** * Sample code: PrivateClouds_ListInSubscription_Stretched. - * + * * @param manager Entry point to AvsManager. */ public static void privateCloudsListInSubscriptionStretched(com.azure.resourcemanager.avs.AvsManager manager) { diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/PrivateCloudsRotateNsxtPasswordSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/PrivateCloudsRotateNsxtPasswordSamples.java index c7a78dd98af54..2462a08fd927c 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/PrivateCloudsRotateNsxtPasswordSamples.java +++ b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/PrivateCloudsRotateNsxtPasswordSamples.java @@ -4,14 +4,18 @@ package com.azure.resourcemanager.avs.generated; -/** Samples for PrivateClouds RotateNsxtPassword. */ +/** + * Samples for PrivateClouds RotateNsxtPassword. + */ public final class PrivateCloudsRotateNsxtPasswordSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/PrivateClouds_RotateNsxtPassword.json + * x-ms-original-file: + * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/PrivateClouds_RotateNsxtPassword. + * json */ /** * Sample code: PrivateClouds_RotateNsxtPassword. - * + * * @param manager Entry point to AvsManager. */ public static void privateCloudsRotateNsxtPassword(com.azure.resourcemanager.avs.AvsManager manager) { diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/PrivateCloudsRotateVcenterPasswordSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/PrivateCloudsRotateVcenterPasswordSamples.java index 7e54fab3feeb2..cbefff7a29239 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/PrivateCloudsRotateVcenterPasswordSamples.java +++ b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/PrivateCloudsRotateVcenterPasswordSamples.java @@ -4,14 +4,17 @@ package com.azure.resourcemanager.avs.generated; -/** Samples for PrivateClouds RotateVcenterPassword. */ +/** + * Samples for PrivateClouds RotateVcenterPassword. + */ public final class PrivateCloudsRotateVcenterPasswordSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/PrivateClouds_RotateVcenterPassword.json + * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/ + * PrivateClouds_RotateVcenterPassword.json */ /** * Sample code: PrivateClouds_RotateVcenterPassword. - * + * * @param manager Entry point to AvsManager. */ public static void privateCloudsRotateVcenterPassword(com.azure.resourcemanager.avs.AvsManager manager) { diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/PrivateCloudsUpdateSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/PrivateCloudsUpdateSamples.java index 735a3aa17dafe..7a24fc08cb548 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/PrivateCloudsUpdateSamples.java +++ b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/PrivateCloudsUpdateSamples.java @@ -9,54 +9,47 @@ import com.azure.resourcemanager.avs.models.EncryptionState; import com.azure.resourcemanager.avs.models.ManagementCluster; import com.azure.resourcemanager.avs.models.PrivateCloud; -import com.azure.resourcemanager.avs.models.PrivateCloudIdentity; -import com.azure.resourcemanager.avs.models.ResourceIdentityType; +import com.azure.resourcemanager.avs.models.SystemAssignedServiceIdentity; +import com.azure.resourcemanager.avs.models.SystemAssignedServiceIdentityType; -/** Samples for PrivateClouds Update. */ +/** + * Samples for PrivateClouds Update. + */ public final class PrivateCloudsUpdateSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/PrivateClouds_Update.json + * x-ms-original-file: + * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/PrivateClouds_Update.json */ /** * Sample code: PrivateClouds_Update. - * + * * @param manager Entry point to AvsManager. */ public static void privateCloudsUpdate(com.azure.resourcemanager.avs.AvsManager manager) { - PrivateCloud resource = - manager - .privateClouds() - .getByResourceGroupWithResponse("group1", "cloud1", com.azure.core.util.Context.NONE) - .getValue(); - resource - .update() - .withIdentity(new PrivateCloudIdentity().withType(ResourceIdentityType.NONE)) + PrivateCloud resource = manager.privateClouds() + .getByResourceGroupWithResponse("group1", "cloud1", com.azure.core.util.Context.NONE).getValue(); + resource.update() + .withIdentity(new SystemAssignedServiceIdentity().withType(SystemAssignedServiceIdentityType.NONE)) .withManagementCluster(new ManagementCluster().withClusterSize(4)) - .withEncryption( - new Encryption() - .withStatus(EncryptionState.ENABLED) - .withKeyVaultProperties( - new EncryptionKeyVaultProperties() - .withKeyName("fakeTokenPlaceholder") - .withKeyVersion("fakeTokenPlaceholder") - .withKeyVaultUrl("fakeTokenPlaceholder"))) + .withEncryption(new Encryption().withStatus(EncryptionState.ENABLED) + .withKeyVaultProperties(new EncryptionKeyVaultProperties().withKeyName("fakeTokenPlaceholder") + .withKeyVersion("fakeTokenPlaceholder").withKeyVaultUrl("fakeTokenPlaceholder"))) .apply(); } /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/PrivateClouds_Update_Stretched.json + * x-ms-original-file: + * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/PrivateClouds_Update_Stretched. + * json */ /** * Sample code: PrivateClouds_Update_Stretched. - * + * * @param manager Entry point to AvsManager. */ public static void privateCloudsUpdateStretched(com.azure.resourcemanager.avs.AvsManager manager) { - PrivateCloud resource = - manager - .privateClouds() - .getByResourceGroupWithResponse("group1", "cloud1", com.azure.core.util.Context.NONE) - .getValue(); + PrivateCloud resource = manager.privateClouds() + .getByResourceGroupWithResponse("group1", "cloud1", com.azure.core.util.Context.NONE).getValue(); resource.update().withManagementCluster(new ManagementCluster().withClusterSize(4)).apply(); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/ScriptCmdletsGetSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/ScriptCmdletsGetSamples.java index 5e950ce73e64a..da17ee688004d 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/ScriptCmdletsGetSamples.java +++ b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/ScriptCmdletsGetSamples.java @@ -4,20 +4,21 @@ package com.azure.resourcemanager.avs.generated; -/** Samples for ScriptCmdlets Get. */ +/** + * Samples for ScriptCmdlets Get. + */ public final class ScriptCmdletsGetSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/ScriptCmdlets_Get.json + * x-ms-original-file: + * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/ScriptCmdlets_Get.json */ /** * Sample code: ScriptCmdlets_Get. - * + * * @param manager Entry point to AvsManager. */ public static void scriptCmdletsGet(com.azure.resourcemanager.avs.AvsManager manager) { - manager - .scriptCmdlets() - .getWithResponse( - "group1", "cloud1", "package@1.0.2", "New-ExternalSsoDomain", com.azure.core.util.Context.NONE); + manager.scriptCmdlets().getWithResponse("group1", "cloud1", "package@1.0.2", "New-ExternalSsoDomain", + com.azure.core.util.Context.NONE); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/ScriptCmdletsListSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/ScriptCmdletsListSamples.java index 38642594f02e2..957a11dc21382 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/ScriptCmdletsListSamples.java +++ b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/ScriptCmdletsListSamples.java @@ -4,14 +4,17 @@ package com.azure.resourcemanager.avs.generated; -/** Samples for ScriptCmdlets List. */ +/** + * Samples for ScriptCmdlets List. + */ public final class ScriptCmdletsListSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/ScriptCmdlets_List.json + * x-ms-original-file: + * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/ScriptCmdlets_List.json */ /** * Sample code: ScriptCmdlets_List. - * + * * @param manager Entry point to AvsManager. */ public static void scriptCmdletsList(com.azure.resourcemanager.avs.AvsManager manager) { diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/ScriptExecutionsCreateOrUpdateSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/ScriptExecutionsCreateOrUpdateSamples.java index 5501891d33f6d..88bb689547f3a 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/ScriptExecutionsCreateOrUpdateSamples.java +++ b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/ScriptExecutionsCreateOrUpdateSamples.java @@ -8,40 +8,30 @@ import com.azure.resourcemanager.avs.models.ScriptStringExecutionParameter; import java.util.Arrays; -/** Samples for ScriptExecutions CreateOrUpdate. */ +/** + * Samples for ScriptExecutions CreateOrUpdate. + */ public final class ScriptExecutionsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/ScriptExecutions_CreateOrUpdate.json + * x-ms-original-file: + * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/ScriptExecutions_CreateOrUpdate. + * json */ /** * Sample code: ScriptExecutions_CreateOrUpdate. - * + * * @param manager Entry point to AvsManager. */ public static void scriptExecutionsCreateOrUpdate(com.azure.resourcemanager.avs.AvsManager manager) { - manager - .scriptExecutions() - .define("addSsoServer") - .withExistingPrivateCloud("group1", "cloud1") + manager.scriptExecutions().define("addSsoServer").withExistingPrivateCloud("group1", "cloud1") .withScriptCmdletId( "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.AVS/privateClouds/cloud1/scriptPackages/AVS.PowerCommands@1.0.0/scriptCmdlets/New-SsoExternalIdentitySource") - .withParameters( - Arrays - .asList( - new ScriptStringExecutionParameter() - .withName("DomainName") - .withValue("placeholderDomain.local"), - new ScriptStringExecutionParameter() - .withName("BaseUserDN") - .withValue("DC=placeholder, DC=placeholder"))) - .withHiddenParameters( - Arrays - .asList( - new ScriptSecureStringExecutionParameter() - .withName("Password") - .withSecureValue("PlaceholderPassword"))) - .withTimeout("P0Y0M0DT0H60M60S") - .withRetention("P0Y0M60DT0H60M60S") - .create(); + .withParameters(Arrays.asList( + new ScriptStringExecutionParameter().withName("DomainName").withValue("placeholderDomain.local"), + new ScriptStringExecutionParameter().withName("BaseUserDN") + .withValue("DC=placeholder, DC=placeholder"))) + .withHiddenParameters(Arrays.asList( + new ScriptSecureStringExecutionParameter().withName("Password").withSecureValue("PlaceholderPassword"))) + .withTimeout("P0Y0M0DT0H60M60S").withRetention("P0Y0M60DT0H60M60S").create(); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/ScriptExecutionsDeleteSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/ScriptExecutionsDeleteSamples.java index fddb8f90543cc..e263d2c4fe399 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/ScriptExecutionsDeleteSamples.java +++ b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/ScriptExecutionsDeleteSamples.java @@ -4,14 +4,17 @@ package com.azure.resourcemanager.avs.generated; -/** Samples for ScriptExecutions Delete. */ +/** + * Samples for ScriptExecutions Delete. + */ public final class ScriptExecutionsDeleteSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/ScriptExecutions_Delete.json + * x-ms-original-file: + * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/ScriptExecutions_Delete.json */ /** * Sample code: ScriptExecutions_Delete. - * + * * @param manager Entry point to AvsManager. */ public static void scriptExecutionsDelete(com.azure.resourcemanager.avs.AvsManager manager) { diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/ScriptExecutionsGetExecutionLogsSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/ScriptExecutionsGetExecutionLogsSamples.java index 9429565d6f693..a9554eb5b3a3f 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/ScriptExecutionsGetExecutionLogsSamples.java +++ b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/ScriptExecutionsGetExecutionLogsSamples.java @@ -7,29 +7,24 @@ import com.azure.resourcemanager.avs.models.ScriptOutputStreamType; import java.util.Arrays; -/** Samples for ScriptExecutions GetExecutionLogs. */ +/** + * Samples for ScriptExecutions GetExecutionLogs. + */ public final class ScriptExecutionsGetExecutionLogsSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/ScriptExecutions_GetExecutionLogs.json + * x-ms-original-file: + * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/ScriptExecutions_GetExecutionLogs. + * json */ /** * Sample code: ScriptExecutions_GetExecutionLogs. - * + * * @param manager Entry point to AvsManager. */ public static void scriptExecutionsGetExecutionLogs(com.azure.resourcemanager.avs.AvsManager manager) { - manager - .scriptExecutions() - .getExecutionLogsWithResponse( - "group1", - "cloud1", - "addSsoServer", - Arrays - .asList( - ScriptOutputStreamType.INFORMATION, - ScriptOutputStreamType.fromString("Warnings"), - ScriptOutputStreamType.fromString("Errors"), - ScriptOutputStreamType.OUTPUT), - com.azure.core.util.Context.NONE); + manager.scriptExecutions().getExecutionLogsWithResponse("group1", "cloud1", "addSsoServer", + Arrays.asList(ScriptOutputStreamType.INFORMATION, ScriptOutputStreamType.fromString("Warnings"), + ScriptOutputStreamType.fromString("Errors"), ScriptOutputStreamType.OUTPUT), + com.azure.core.util.Context.NONE); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/ScriptExecutionsGetSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/ScriptExecutionsGetSamples.java index e2e1df25b138a..48fc9ddb506f8 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/ScriptExecutionsGetSamples.java +++ b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/ScriptExecutionsGetSamples.java @@ -4,19 +4,21 @@ package com.azure.resourcemanager.avs.generated; -/** Samples for ScriptExecutions Get. */ +/** + * Samples for ScriptExecutions Get. + */ public final class ScriptExecutionsGetSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/ScriptExecutions_Get.json + * x-ms-original-file: + * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/ScriptExecutions_Get.json */ /** * Sample code: ScriptExecutions_Get. - * + * * @param manager Entry point to AvsManager. */ public static void scriptExecutionsGet(com.azure.resourcemanager.avs.AvsManager manager) { - manager - .scriptExecutions() - .getWithResponse("group1", "cloud1", "addSsoServer", com.azure.core.util.Context.NONE); + manager.scriptExecutions().getWithResponse("group1", "cloud1", "addSsoServer", + com.azure.core.util.Context.NONE); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/ScriptExecutionsListSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/ScriptExecutionsListSamples.java index b45b841bb31b2..5a5942f947528 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/ScriptExecutionsListSamples.java +++ b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/ScriptExecutionsListSamples.java @@ -4,14 +4,17 @@ package com.azure.resourcemanager.avs.generated; -/** Samples for ScriptExecutions List. */ +/** + * Samples for ScriptExecutions List. + */ public final class ScriptExecutionsListSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/ScriptExecutions_List.json + * x-ms-original-file: + * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/ScriptExecutions_List.json */ /** * Sample code: ScriptExecutions_List. - * + * * @param manager Entry point to AvsManager. */ public static void scriptExecutionsList(com.azure.resourcemanager.avs.AvsManager manager) { diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/ScriptPackagesGetSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/ScriptPackagesGetSamples.java index 937e2bb156eab..ca536d5329b1f 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/ScriptPackagesGetSamples.java +++ b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/ScriptPackagesGetSamples.java @@ -4,19 +4,21 @@ package com.azure.resourcemanager.avs.generated; -/** Samples for ScriptPackages Get. */ +/** + * Samples for ScriptPackages Get. + */ public final class ScriptPackagesGetSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/ScriptPackages_Get.json + * x-ms-original-file: + * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/ScriptPackages_Get.json */ /** * Sample code: ScriptPackages_Get. - * + * * @param manager Entry point to AvsManager. */ public static void scriptPackagesGet(com.azure.resourcemanager.avs.AvsManager manager) { - manager - .scriptPackages() - .getWithResponse("group1", "cloud1", "Microsoft.AVS.Management@3.0.48", com.azure.core.util.Context.NONE); + manager.scriptPackages().getWithResponse("group1", "cloud1", "Microsoft.AVS.Management@3.0.48", + com.azure.core.util.Context.NONE); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/ScriptPackagesListSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/ScriptPackagesListSamples.java index f5d99d8f174aa..e2c896b5e958c 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/ScriptPackagesListSamples.java +++ b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/ScriptPackagesListSamples.java @@ -4,14 +4,17 @@ package com.azure.resourcemanager.avs.generated; -/** Samples for ScriptPackages List. */ +/** + * Samples for ScriptPackages List. + */ public final class ScriptPackagesListSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/ScriptPackages_List.json + * x-ms-original-file: + * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/ScriptPackages_List.json */ /** * Sample code: ScriptPackages_List. - * + * * @param manager Entry point to AvsManager. */ public static void scriptPackagesList(com.azure.resourcemanager.avs.AvsManager manager) { diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/VirtualMachinesGetSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/VirtualMachinesGetSamples.java index c100829a6a16a..ebe30a798bc91 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/VirtualMachinesGetSamples.java +++ b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/VirtualMachinesGetSamples.java @@ -4,19 +4,21 @@ package com.azure.resourcemanager.avs.generated; -/** Samples for VirtualMachines Get. */ +/** + * Samples for VirtualMachines Get. + */ public final class VirtualMachinesGetSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/VirtualMachines_Get.json + * x-ms-original-file: + * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/VirtualMachines_Get.json */ /** - * Sample code: GetVirtualMachine. - * + * Sample code: VirtualMachines_Get. + * * @param manager Entry point to AvsManager. */ - public static void getVirtualMachine(com.azure.resourcemanager.avs.AvsManager manager) { - manager - .virtualMachines() - .getWithResponse("group1", "cloud1", "cluster1", "vm-209", com.azure.core.util.Context.NONE); + public static void virtualMachinesGet(com.azure.resourcemanager.avs.AvsManager manager) { + manager.virtualMachines().getWithResponse("group1", "cloud1", "cluster1", "vm-209", + com.azure.core.util.Context.NONE); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/VirtualMachinesListSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/VirtualMachinesListSamples.java index 0605e3fa38da3..8150b0f0502b5 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/VirtualMachinesListSamples.java +++ b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/VirtualMachinesListSamples.java @@ -4,17 +4,20 @@ package com.azure.resourcemanager.avs.generated; -/** Samples for VirtualMachines List. */ +/** + * Samples for VirtualMachines List. + */ public final class VirtualMachinesListSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/VirtualMachines_List.json + * x-ms-original-file: + * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/VirtualMachines_List.json */ /** - * Sample code: ListClusterVirtualMachines. - * + * Sample code: VirtualMachines_List. + * * @param manager Entry point to AvsManager. */ - public static void listClusterVirtualMachines(com.azure.resourcemanager.avs.AvsManager manager) { + public static void virtualMachinesList(com.azure.resourcemanager.avs.AvsManager manager) { manager.virtualMachines().list("group1", "cloud1", "cluster1", com.azure.core.util.Context.NONE); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/VirtualMachinesRestrictMovementSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/VirtualMachinesRestrictMovementSamples.java index 33bcdbd5482e5..63c9acb2ad239 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/VirtualMachinesRestrictMovementSamples.java +++ b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/VirtualMachinesRestrictMovementSamples.java @@ -7,25 +7,23 @@ import com.azure.resourcemanager.avs.models.VirtualMachineRestrictMovement; import com.azure.resourcemanager.avs.models.VirtualMachineRestrictMovementState; -/** Samples for VirtualMachines RestrictMovement. */ +/** + * Samples for VirtualMachines RestrictMovement. + */ public final class VirtualMachinesRestrictMovementSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/VirtualMachines_RestrictMovement.json + * x-ms-original-file: + * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/VirtualMachines_RestrictMovement. + * json */ /** - * Sample code: VirtualMachine_RestrictMovement. - * + * Sample code: VirtualMachines_RestrictMovement. + * * @param manager Entry point to AvsManager. */ - public static void virtualMachineRestrictMovement(com.azure.resourcemanager.avs.AvsManager manager) { - manager - .virtualMachines() - .restrictMovement( - "group1", - "cloud1", - "cluster1", - "vm-209", - new VirtualMachineRestrictMovement().withRestrictMovement(VirtualMachineRestrictMovementState.ENABLED), - com.azure.core.util.Context.NONE); + public static void virtualMachinesRestrictMovement(com.azure.resourcemanager.avs.AvsManager manager) { + manager.virtualMachines().restrictMovement("group1", "cloud1", "cluster1", "vm-209", + new VirtualMachineRestrictMovement().withRestrictMovement(VirtualMachineRestrictMovementState.ENABLED), + com.azure.core.util.Context.NONE); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksCreateDhcpSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksCreateDhcpSamples.java index 9c2a619f24ae6..c8abd31fdad2f 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksCreateDhcpSamples.java +++ b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksCreateDhcpSamples.java @@ -6,27 +6,23 @@ import com.azure.resourcemanager.avs.models.WorkloadNetworkDhcpServer; -/** Samples for WorkloadNetworks CreateDhcp. */ +/** + * Samples for WorkloadNetworks CreateDhcp. + */ public final class WorkloadNetworksCreateDhcpSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/WorkloadNetworks_CreateDhcpConfigurations.json + * x-ms-original-file: + * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/WorkloadNetworks_CreateDhcp.json */ /** * Sample code: WorkloadNetworks_CreateDhcp. - * + * * @param manager Entry point to AvsManager. */ public static void workloadNetworksCreateDhcp(com.azure.resourcemanager.avs.AvsManager manager) { - manager - .workloadNetworks() - .defineDhcp("dhcp1") - .withExistingPrivateCloud("group1", "cloud1") - .withProperties( - new WorkloadNetworkDhcpServer() - .withDisplayName("dhcpConfigurations1") - .withRevision(1L) - .withServerAddress("40.1.5.1/24") - .withLeaseTime(86400L)) + manager.workloadNetworks().defineDhcp("dhcp1").withExistingPrivateCloud("group1", "cloud1") + .withProperties(new WorkloadNetworkDhcpServer().withDisplayName("dhcpConfigurations1").withRevision(1L) + .withServerAddress("40.1.5.1/24").withLeaseTime(86400)) .create(); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksCreateDnsServiceSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksCreateDnsServiceSamples.java index c4bb00e0d4eb4..fc74c6f7bb4f1 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksCreateDnsServiceSamples.java +++ b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksCreateDnsServiceSamples.java @@ -7,27 +7,24 @@ import com.azure.resourcemanager.avs.models.DnsServiceLogLevelEnum; import java.util.Arrays; -/** Samples for WorkloadNetworks CreateDnsService. */ +/** + * Samples for WorkloadNetworks CreateDnsService. + */ public final class WorkloadNetworksCreateDnsServiceSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/WorkloadNetworks_CreateDnsServices.json + * x-ms-original-file: + * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/WorkloadNetworks_CreateDnsService. + * json */ /** * Sample code: WorkloadNetworks_CreateDnsService. - * + * * @param manager Entry point to AvsManager. */ public static void workloadNetworksCreateDnsService(com.azure.resourcemanager.avs.AvsManager manager) { - manager - .workloadNetworks() - .defineDnsService("dnsService1") - .withExistingPrivateCloud("group1", "cloud1") - .withDisplayName("dnsService1") - .withDnsServiceIp("5.5.5.5") - .withDefaultDnsZone("defaultDnsZone1") - .withFqdnZones(Arrays.asList("fqdnZone1")) - .withLogLevel(DnsServiceLogLevelEnum.INFO) - .withRevision(1L) + manager.workloadNetworks().defineDnsService("dnsService1").withExistingPrivateCloud("group1", "cloud1") + .withDisplayName("dnsService1").withDnsServiceIp("5.5.5.5").withDefaultDnsZone("defaultDnsZone1") + .withFqdnZones(Arrays.asList("fqdnZone1")).withLogLevel(DnsServiceLogLevelEnum.INFO).withRevision(1L) .create(); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksCreateDnsZoneSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksCreateDnsZoneSamples.java index 8f00dd829bc66..ddd61664e49f9 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksCreateDnsZoneSamples.java +++ b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksCreateDnsZoneSamples.java @@ -6,26 +6,23 @@ import java.util.Arrays; -/** Samples for WorkloadNetworks CreateDnsZone. */ +/** + * Samples for WorkloadNetworks CreateDnsZone. + */ public final class WorkloadNetworksCreateDnsZoneSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/WorkloadNetworks_CreateDnsZones.json + * x-ms-original-file: + * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/WorkloadNetworks_CreateDnsZone. + * json */ /** * Sample code: WorkloadNetworks_CreateDnsZone. - * + * * @param manager Entry point to AvsManager. */ public static void workloadNetworksCreateDnsZone(com.azure.resourcemanager.avs.AvsManager manager) { - manager - .workloadNetworks() - .defineDnsZone("dnsZone1") - .withExistingPrivateCloud("group1", "cloud1") - .withDisplayName("dnsZone1") - .withDomain(Arrays.asList()) - .withDnsServerIps(Arrays.asList("1.1.1.1")) - .withSourceIp("8.8.8.8") - .withRevision(1L) - .create(); + manager.workloadNetworks().defineDnsZone("dnsZone1").withExistingPrivateCloud("group1", "cloud1") + .withDisplayName("dnsZone1").withDomain(Arrays.asList()).withDnsServerIps(Arrays.asList("1.1.1.1")) + .withSourceIp("8.8.8.8").withRevision(1L).create(); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksCreatePortMirroringSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksCreatePortMirroringSamples.java index c09ab8e71f583..18a365c72d9ae 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksCreatePortMirroringSamples.java +++ b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksCreatePortMirroringSamples.java @@ -6,26 +6,22 @@ import com.azure.resourcemanager.avs.models.PortMirroringDirectionEnum; -/** Samples for WorkloadNetworks CreatePortMirroring. */ +/** + * Samples for WorkloadNetworks CreatePortMirroring. + */ public final class WorkloadNetworksCreatePortMirroringSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/WorkloadNetworks_CreatePortMirroringProfiles.json + * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/ + * WorkloadNetworks_CreatePortMirroring.json */ /** * Sample code: WorkloadNetworks_CreatePortMirroring. - * + * * @param manager Entry point to AvsManager. */ public static void workloadNetworksCreatePortMirroring(com.azure.resourcemanager.avs.AvsManager manager) { - manager - .workloadNetworks() - .definePortMirroring("portMirroring1") - .withExistingPrivateCloud("group1", "cloud1") - .withDisplayName("portMirroring1") - .withDirection(PortMirroringDirectionEnum.BIDIRECTIONAL) - .withSource("vmGroup1") - .withDestination("vmGroup2") - .withRevision(1L) - .create(); + manager.workloadNetworks().definePortMirroring("portMirroring1").withExistingPrivateCloud("group1", "cloud1") + .withDisplayName("portMirroring1").withDirection(PortMirroringDirectionEnum.BIDIRECTIONAL) + .withSource("vmGroup1").withDestination("vmGroup2").withRevision(1L).create(); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksCreatePublicIpSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksCreatePublicIpSamples.java index 2f22b85d4e40a..bcfdc04aae170 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksCreatePublicIpSamples.java +++ b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksCreatePublicIpSamples.java @@ -4,23 +4,22 @@ package com.azure.resourcemanager.avs.generated; -/** Samples for WorkloadNetworks CreatePublicIp. */ +/** + * Samples for WorkloadNetworks CreatePublicIp. + */ public final class WorkloadNetworksCreatePublicIpSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/WorkloadNetworks_CreatePublicIPs.json + * x-ms-original-file: + * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/WorkloadNetworks_CreatePublicIP. + * json */ /** * Sample code: WorkloadNetworks_CreatePublicIP. - * + * * @param manager Entry point to AvsManager. */ public static void workloadNetworksCreatePublicIP(com.azure.resourcemanager.avs.AvsManager manager) { - manager - .workloadNetworks() - .definePublicIp("publicIP1") - .withExistingPrivateCloud("group1", "cloud1") - .withDisplayName("publicIP1") - .withNumberOfPublicIPs(32L) - .create(); + manager.workloadNetworks().definePublicIp("publicIP1").withExistingPrivateCloud("group1", "cloud1") + .withDisplayName("publicIP1").withNumberOfPublicIPs(32L).create(); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksCreateSegmentsSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksCreateSegmentsSamples.java index d5ec7816edd6a..3c8ecbf925d99 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksCreateSegmentsSamples.java +++ b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksCreateSegmentsSamples.java @@ -7,28 +7,25 @@ import com.azure.resourcemanager.avs.models.WorkloadNetworkSegmentSubnet; import java.util.Arrays; -/** Samples for WorkloadNetworks CreateSegments. */ +/** + * Samples for WorkloadNetworks CreateSegments. + */ public final class WorkloadNetworksCreateSegmentsSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/WorkloadNetworks_CreateSegments.json + * x-ms-original-file: + * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/WorkloadNetworks_CreateSegments. + * json */ /** * Sample code: WorkloadNetworks_CreateSegments. - * + * * @param manager Entry point to AvsManager. */ public static void workloadNetworksCreateSegments(com.azure.resourcemanager.avs.AvsManager manager) { - manager - .workloadNetworks() - .defineSegments("segment1") - .withExistingPrivateCloud("group1", "cloud1") - .withDisplayName("segment1") - .withConnectedGateway("/infra/tier-1s/gateway") - .withSubnet( - new WorkloadNetworkSegmentSubnet() - .withDhcpRanges(Arrays.asList("40.20.0.0-40.20.0.1")) - .withGatewayAddress("40.20.20.20/16")) - .withRevision(1L) - .create(); + manager.workloadNetworks().defineSegments("segment1").withExistingPrivateCloud("group1", "cloud1") + .withDisplayName("segment1").withConnectedGateway("/infra/tier-1s/gateway") + .withSubnet(new WorkloadNetworkSegmentSubnet().withDhcpRanges(Arrays.asList("40.20.0.0-40.20.0.1")) + .withGatewayAddress("40.20.20.20/16")) + .withRevision(1L).create(); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksCreateVMGroupSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksCreateVMGroupSamples.java index eab7a5bbc6c09..a3e32fc04ed94 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksCreateVMGroupSamples.java +++ b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksCreateVMGroupSamples.java @@ -6,24 +6,23 @@ import java.util.Arrays; -/** Samples for WorkloadNetworks CreateVMGroup. */ +/** + * Samples for WorkloadNetworks CreateVMGroup. + */ public final class WorkloadNetworksCreateVMGroupSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/WorkloadNetworks_CreateVMGroups.json + * x-ms-original-file: + * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/WorkloadNetworks_CreateVMGroup. + * json */ /** * Sample code: WorkloadNetworks_CreateVMGroup. - * + * * @param manager Entry point to AvsManager. */ public static void workloadNetworksCreateVMGroup(com.azure.resourcemanager.avs.AvsManager manager) { - manager - .workloadNetworks() - .defineVMGroup("vmGroup1") - .withExistingPrivateCloud("group1", "cloud1") - .withDisplayName("vmGroup1") - .withMembers(Arrays.asList("564d43da-fefc-2a3b-1d92-42855622fa50")) - .withRevision(1L) - .create(); + manager.workloadNetworks().defineVMGroup("vmGroup1").withExistingPrivateCloud("group1", "cloud1") + .withDisplayName("vmGroup1").withMembers(Arrays.asList("564d43da-fefc-2a3b-1d92-42855622fa50")) + .withRevision(1L).create(); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksDeleteDhcpSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksDeleteDhcpSamples.java index abf81d8aefe19..780de3a30f308 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksDeleteDhcpSamples.java +++ b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksDeleteDhcpSamples.java @@ -4,14 +4,17 @@ package com.azure.resourcemanager.avs.generated; -/** Samples for WorkloadNetworks DeleteDhcp. */ +/** + * Samples for WorkloadNetworks DeleteDhcp. + */ public final class WorkloadNetworksDeleteDhcpSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/WorkloadNetworks_DeleteDhcpConfigurations.json + * x-ms-original-file: + * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/WorkloadNetworks_DeleteDhcp.json */ /** * Sample code: WorkloadNetworks_DeleteDhcp. - * + * * @param manager Entry point to AvsManager. */ public static void workloadNetworksDeleteDhcp(com.azure.resourcemanager.avs.AvsManager manager) { diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksDeleteDnsServiceSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksDeleteDnsServiceSamples.java index 904ba45e2d30e..f8a59d5744a3f 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksDeleteDnsServiceSamples.java +++ b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksDeleteDnsServiceSamples.java @@ -4,19 +4,22 @@ package com.azure.resourcemanager.avs.generated; -/** Samples for WorkloadNetworks DeleteDnsService. */ +/** + * Samples for WorkloadNetworks DeleteDnsService. + */ public final class WorkloadNetworksDeleteDnsServiceSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/WorkloadNetworks_DeleteDnsServices.json + * x-ms-original-file: + * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/WorkloadNetworks_DeleteDnsService. + * json */ /** * Sample code: WorkloadNetworks_DeleteDnsService. - * + * * @param manager Entry point to AvsManager. */ public static void workloadNetworksDeleteDnsService(com.azure.resourcemanager.avs.AvsManager manager) { - manager - .workloadNetworks() - .deleteDnsService("group1", "dnsService1", "cloud1", com.azure.core.util.Context.NONE); + manager.workloadNetworks().deleteDnsService("group1", "dnsService1", "cloud1", + com.azure.core.util.Context.NONE); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksDeleteDnsZoneSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksDeleteDnsZoneSamples.java index 66281b23086f5..ce11038d50ab4 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksDeleteDnsZoneSamples.java +++ b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksDeleteDnsZoneSamples.java @@ -4,14 +4,18 @@ package com.azure.resourcemanager.avs.generated; -/** Samples for WorkloadNetworks DeleteDnsZone. */ +/** + * Samples for WorkloadNetworks DeleteDnsZone. + */ public final class WorkloadNetworksDeleteDnsZoneSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/WorkloadNetworks_DeleteDnsZones.json + * x-ms-original-file: + * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/WorkloadNetworks_DeleteDnsZone. + * json */ /** * Sample code: WorkloadNetworks_DeleteDnsZone. - * + * * @param manager Entry point to AvsManager. */ public static void workloadNetworksDeleteDnsZone(com.azure.resourcemanager.avs.AvsManager manager) { diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksDeletePortMirroringSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksDeletePortMirroringSamples.java index fefe13a2b7ed3..16930dc8a4c4c 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksDeletePortMirroringSamples.java +++ b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksDeletePortMirroringSamples.java @@ -4,19 +4,21 @@ package com.azure.resourcemanager.avs.generated; -/** Samples for WorkloadNetworks DeletePortMirroring. */ +/** + * Samples for WorkloadNetworks DeletePortMirroring. + */ public final class WorkloadNetworksDeletePortMirroringSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/WorkloadNetworks_DeletePortMirroringProfiles.json + * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/ + * WorkloadNetworks_DeletePortMirroring.json */ /** * Sample code: WorkloadNetworks_DeletePortMirroring. - * + * * @param manager Entry point to AvsManager. */ public static void workloadNetworksDeletePortMirroring(com.azure.resourcemanager.avs.AvsManager manager) { - manager - .workloadNetworks() - .deletePortMirroring("group1", "portMirroring1", "cloud1", com.azure.core.util.Context.NONE); + manager.workloadNetworks().deletePortMirroring("group1", "portMirroring1", "cloud1", + com.azure.core.util.Context.NONE); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksDeletePublicIpSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksDeletePublicIpSamples.java index 427d6728baa9e..4e06022c3d80b 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksDeletePublicIpSamples.java +++ b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksDeletePublicIpSamples.java @@ -4,14 +4,18 @@ package com.azure.resourcemanager.avs.generated; -/** Samples for WorkloadNetworks DeletePublicIp. */ +/** + * Samples for WorkloadNetworks DeletePublicIp. + */ public final class WorkloadNetworksDeletePublicIpSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/WorkloadNetworks_DeletePublicIPs.json + * x-ms-original-file: + * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/WorkloadNetworks_DeletePublicIP. + * json */ /** * Sample code: WorkloadNetworks_DeletePublicIP. - * + * * @param manager Entry point to AvsManager. */ public static void workloadNetworksDeletePublicIP(com.azure.resourcemanager.avs.AvsManager manager) { diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksDeleteSegmentSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksDeleteSegmentSamples.java index 38e57a5fbcc19..dfe14529d0143 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksDeleteSegmentSamples.java +++ b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksDeleteSegmentSamples.java @@ -4,14 +4,18 @@ package com.azure.resourcemanager.avs.generated; -/** Samples for WorkloadNetworks DeleteSegment. */ +/** + * Samples for WorkloadNetworks DeleteSegment. + */ public final class WorkloadNetworksDeleteSegmentSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/WorkloadNetworks_DeleteSegments.json + * x-ms-original-file: + * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/WorkloadNetworks_DeleteSegment. + * json */ /** * Sample code: WorkloadNetworks_DeleteSegment. - * + * * @param manager Entry point to AvsManager. */ public static void workloadNetworksDeleteSegment(com.azure.resourcemanager.avs.AvsManager manager) { diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksDeleteVMGroupSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksDeleteVMGroupSamples.java index 0c1571f66d46a..ae56319d52b7d 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksDeleteVMGroupSamples.java +++ b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksDeleteVMGroupSamples.java @@ -4,14 +4,18 @@ package com.azure.resourcemanager.avs.generated; -/** Samples for WorkloadNetworks DeleteVMGroup. */ +/** + * Samples for WorkloadNetworks DeleteVMGroup. + */ public final class WorkloadNetworksDeleteVMGroupSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/WorkloadNetworks_DeleteVMGroups.json + * x-ms-original-file: + * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/WorkloadNetworks_DeleteVMGroup. + * json */ /** * Sample code: WorkloadNetworks_DeleteVMGroup. - * + * * @param manager Entry point to AvsManager. */ public static void workloadNetworksDeleteVMGroup(com.azure.resourcemanager.avs.AvsManager manager) { diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksGetDhcpSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksGetDhcpSamples.java index 6e9950795300b..9de666b36391f 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksGetDhcpSamples.java +++ b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksGetDhcpSamples.java @@ -4,14 +4,17 @@ package com.azure.resourcemanager.avs.generated; -/** Samples for WorkloadNetworks GetDhcp. */ +/** + * Samples for WorkloadNetworks GetDhcp. + */ public final class WorkloadNetworksGetDhcpSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/WorkloadNetworks_GetDhcpConfigurations.json + * x-ms-original-file: + * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/WorkloadNetworks_GetDhcp.json */ /** * Sample code: WorkloadNetworks_GetDhcp. - * + * * @param manager Entry point to AvsManager. */ public static void workloadNetworksGetDhcp(com.azure.resourcemanager.avs.AvsManager manager) { diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksGetDnsServiceSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksGetDnsServiceSamples.java index e4af222817137..f3e5fa792d37b 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksGetDnsServiceSamples.java +++ b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksGetDnsServiceSamples.java @@ -4,19 +4,22 @@ package com.azure.resourcemanager.avs.generated; -/** Samples for WorkloadNetworks GetDnsService. */ +/** + * Samples for WorkloadNetworks GetDnsService. + */ public final class WorkloadNetworksGetDnsServiceSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/WorkloadNetworks_GetDnsServices.json + * x-ms-original-file: + * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/WorkloadNetworks_GetDnsService. + * json */ /** * Sample code: WorkloadNetworks_GetDnsService. - * + * * @param manager Entry point to AvsManager. */ public static void workloadNetworksGetDnsService(com.azure.resourcemanager.avs.AvsManager manager) { - manager - .workloadNetworks() - .getDnsServiceWithResponse("group1", "cloud1", "dnsService1", com.azure.core.util.Context.NONE); + manager.workloadNetworks().getDnsServiceWithResponse("group1", "cloud1", "dnsService1", + com.azure.core.util.Context.NONE); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksGetDnsZoneSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksGetDnsZoneSamples.java index 9ee15ef71655c..15880f55305f3 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksGetDnsZoneSamples.java +++ b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksGetDnsZoneSamples.java @@ -4,19 +4,21 @@ package com.azure.resourcemanager.avs.generated; -/** Samples for WorkloadNetworks GetDnsZone. */ +/** + * Samples for WorkloadNetworks GetDnsZone. + */ public final class WorkloadNetworksGetDnsZoneSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/WorkloadNetworks_GetDnsZones.json + * x-ms-original-file: + * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/WorkloadNetworks_GetDnsZone.json */ /** * Sample code: WorkloadNetworks_GetDnsZone. - * + * * @param manager Entry point to AvsManager. */ public static void workloadNetworksGetDnsZone(com.azure.resourcemanager.avs.AvsManager manager) { - manager - .workloadNetworks() - .getDnsZoneWithResponse("group1", "cloud1", "dnsZone1", com.azure.core.util.Context.NONE); + manager.workloadNetworks().getDnsZoneWithResponse("group1", "cloud1", "dnsZone1", + com.azure.core.util.Context.NONE); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksGetGatewaySamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksGetGatewaySamples.java index 853753c00cda3..68d3b2fbc3146 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksGetGatewaySamples.java +++ b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksGetGatewaySamples.java @@ -4,19 +4,21 @@ package com.azure.resourcemanager.avs.generated; -/** Samples for WorkloadNetworks GetGateway. */ +/** + * Samples for WorkloadNetworks GetGateway. + */ public final class WorkloadNetworksGetGatewaySamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/WorkloadNetworks_GetGateway.json + * x-ms-original-file: + * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/WorkloadNetworks_GetGateway.json */ /** * Sample code: WorkloadNetworks_GetGateway. - * + * * @param manager Entry point to AvsManager. */ public static void workloadNetworksGetGateway(com.azure.resourcemanager.avs.AvsManager manager) { - manager - .workloadNetworks() - .getGatewayWithResponse("group1", "cloud1", "gateway1", com.azure.core.util.Context.NONE); + manager.workloadNetworks().getGatewayWithResponse("group1", "cloud1", "gateway1", + com.azure.core.util.Context.NONE); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksGetPortMirroringSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksGetPortMirroringSamples.java index 7057a0a92109a..5846c001d0836 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksGetPortMirroringSamples.java +++ b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksGetPortMirroringSamples.java @@ -4,19 +4,22 @@ package com.azure.resourcemanager.avs.generated; -/** Samples for WorkloadNetworks GetPortMirroring. */ +/** + * Samples for WorkloadNetworks GetPortMirroring. + */ public final class WorkloadNetworksGetPortMirroringSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/WorkloadNetworks_GetPortMirroringProfiles.json + * x-ms-original-file: + * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/WorkloadNetworks_GetPortMirroring. + * json */ /** * Sample code: WorkloadNetworks_GetPortMirroring. - * + * * @param manager Entry point to AvsManager. */ public static void workloadNetworksGetPortMirroring(com.azure.resourcemanager.avs.AvsManager manager) { - manager - .workloadNetworks() - .getPortMirroringWithResponse("group1", "cloud1", "portMirroring1", com.azure.core.util.Context.NONE); + manager.workloadNetworks().getPortMirroringWithResponse("group1", "cloud1", "portMirroring1", + com.azure.core.util.Context.NONE); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksGetPublicIpSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksGetPublicIpSamples.java index de72d7f66f400..dcc54a5cd1635 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksGetPublicIpSamples.java +++ b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksGetPublicIpSamples.java @@ -4,19 +4,21 @@ package com.azure.resourcemanager.avs.generated; -/** Samples for WorkloadNetworks GetPublicIp. */ +/** + * Samples for WorkloadNetworks GetPublicIp. + */ public final class WorkloadNetworksGetPublicIpSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/WorkloadNetworks_GetPublicIPs.json + * x-ms-original-file: + * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/WorkloadNetworks_GetPublicIP.json */ /** * Sample code: WorkloadNetworks_GetPublicIP. - * + * * @param manager Entry point to AvsManager. */ public static void workloadNetworksGetPublicIP(com.azure.resourcemanager.avs.AvsManager manager) { - manager - .workloadNetworks() - .getPublicIpWithResponse("group1", "cloud1", "publicIP1", com.azure.core.util.Context.NONE); + manager.workloadNetworks().getPublicIpWithResponse("group1", "cloud1", "publicIP1", + com.azure.core.util.Context.NONE); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksGetSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksGetSamples.java index 8733479cb26b1..31a9a042420e3 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksGetSamples.java +++ b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksGetSamples.java @@ -4,21 +4,20 @@ package com.azure.resourcemanager.avs.generated; -import com.azure.resourcemanager.avs.models.WorkloadNetworkName; - -/** Samples for WorkloadNetworks Get. */ +/** + * Samples for WorkloadNetworks Get. + */ public final class WorkloadNetworksGetSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/WorkloadNetworks_Get.json + * x-ms-original-file: + * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/WorkloadNetworks_Get.json */ /** * Sample code: WorkloadNetworks_Get. - * + * * @param manager Entry point to AvsManager. */ public static void workloadNetworksGet(com.azure.resourcemanager.avs.AvsManager manager) { - manager - .workloadNetworks() - .getWithResponse("group1", "cloud1", WorkloadNetworkName.DEFAULT, com.azure.core.util.Context.NONE); + manager.workloadNetworks().getWithResponse("group1", "cloud1", com.azure.core.util.Context.NONE); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksGetSegmentSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksGetSegmentSamples.java index 2c41d9b11f542..cce3316cbc5ea 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksGetSegmentSamples.java +++ b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksGetSegmentSamples.java @@ -4,19 +4,21 @@ package com.azure.resourcemanager.avs.generated; -/** Samples for WorkloadNetworks GetSegment. */ +/** + * Samples for WorkloadNetworks GetSegment. + */ public final class WorkloadNetworksGetSegmentSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/WorkloadNetworks_GetSegments.json + * x-ms-original-file: + * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/WorkloadNetworks_GetSegment.json */ /** * Sample code: WorkloadNetworks_GetSegment. - * + * * @param manager Entry point to AvsManager. */ public static void workloadNetworksGetSegment(com.azure.resourcemanager.avs.AvsManager manager) { - manager - .workloadNetworks() - .getSegmentWithResponse("group1", "cloud1", "segment1", com.azure.core.util.Context.NONE); + manager.workloadNetworks().getSegmentWithResponse("group1", "cloud1", "segment1", + com.azure.core.util.Context.NONE); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksGetVMGroupSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksGetVMGroupSamples.java index b50fa36561e09..bfb26b8ef020d 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksGetVMGroupSamples.java +++ b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksGetVMGroupSamples.java @@ -4,19 +4,21 @@ package com.azure.resourcemanager.avs.generated; -/** Samples for WorkloadNetworks GetVMGroup. */ +/** + * Samples for WorkloadNetworks GetVMGroup. + */ public final class WorkloadNetworksGetVMGroupSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/WorkloadNetworks_GetVMGroups.json + * x-ms-original-file: + * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/WorkloadNetworks_GetVMGroup.json */ /** * Sample code: WorkloadNetworks_GetVMGroup. - * + * * @param manager Entry point to AvsManager. */ public static void workloadNetworksGetVMGroup(com.azure.resourcemanager.avs.AvsManager manager) { - manager - .workloadNetworks() - .getVMGroupWithResponse("group1", "cloud1", "vmGroup1", com.azure.core.util.Context.NONE); + manager.workloadNetworks().getVMGroupWithResponse("group1", "cloud1", "vmGroup1", + com.azure.core.util.Context.NONE); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksGetVirtualMachineSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksGetVirtualMachineSamples.java index a98f76ed7abe8..4294925f4bb89 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksGetVirtualMachineSamples.java +++ b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksGetVirtualMachineSamples.java @@ -4,19 +4,22 @@ package com.azure.resourcemanager.avs.generated; -/** Samples for WorkloadNetworks GetVirtualMachine. */ +/** + * Samples for WorkloadNetworks GetVirtualMachine. + */ public final class WorkloadNetworksGetVirtualMachineSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/WorkloadNetworks_GetVirtualMachine.json + * x-ms-original-file: + * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/WorkloadNetworks_GetVirtualMachine + * .json */ /** * Sample code: WorkloadNetworks_GetVirtualMachine. - * + * * @param manager Entry point to AvsManager. */ public static void workloadNetworksGetVirtualMachine(com.azure.resourcemanager.avs.AvsManager manager) { - manager - .workloadNetworks() - .getVirtualMachineWithResponse("group1", "cloud1", "vm1", com.azure.core.util.Context.NONE); + manager.workloadNetworks().getVirtualMachineWithResponse("group1", "cloud1", "vm1", + com.azure.core.util.Context.NONE); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksListDhcpSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksListDhcpSamples.java index 09638408d3afa..4c8a87521a6d7 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksListDhcpSamples.java +++ b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksListDhcpSamples.java @@ -4,14 +4,17 @@ package com.azure.resourcemanager.avs.generated; -/** Samples for WorkloadNetworks ListDhcp. */ +/** + * Samples for WorkloadNetworks ListDhcp. + */ public final class WorkloadNetworksListDhcpSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/WorkloadNetworks_ListDhcpConfigurations.json + * x-ms-original-file: + * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/WorkloadNetworks_ListDhcp.json */ /** * Sample code: WorkloadNetworks_ListDhcp. - * + * * @param manager Entry point to AvsManager. */ public static void workloadNetworksListDhcp(com.azure.resourcemanager.avs.AvsManager manager) { diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksListDnsServicesSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksListDnsServicesSamples.java index 0ca4075dd7589..60a4bc7373578 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksListDnsServicesSamples.java +++ b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksListDnsServicesSamples.java @@ -4,14 +4,18 @@ package com.azure.resourcemanager.avs.generated; -/** Samples for WorkloadNetworks ListDnsServices. */ +/** + * Samples for WorkloadNetworks ListDnsServices. + */ public final class WorkloadNetworksListDnsServicesSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/WorkloadNetworks_ListDnsServices.json + * x-ms-original-file: + * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/WorkloadNetworks_ListDnsServices. + * json */ /** * Sample code: WorkloadNetworks_ListDnsServices. - * + * * @param manager Entry point to AvsManager. */ public static void workloadNetworksListDnsServices(com.azure.resourcemanager.avs.AvsManager manager) { diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksListDnsZonesSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksListDnsZonesSamples.java index 56eacb363b20b..f9764ac62cc2c 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksListDnsZonesSamples.java +++ b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksListDnsZonesSamples.java @@ -4,14 +4,17 @@ package com.azure.resourcemanager.avs.generated; -/** Samples for WorkloadNetworks ListDnsZones. */ +/** + * Samples for WorkloadNetworks ListDnsZones. + */ public final class WorkloadNetworksListDnsZonesSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/WorkloadNetworks_ListDnsZones.json + * x-ms-original-file: + * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/WorkloadNetworks_ListDnsZones.json */ /** * Sample code: WorkloadNetworks_ListDnsZones. - * + * * @param manager Entry point to AvsManager. */ public static void workloadNetworksListDnsZones(com.azure.resourcemanager.avs.AvsManager manager) { diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksListGatewaysSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksListGatewaysSamples.java index e3f659863b029..c403f2db1160d 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksListGatewaysSamples.java +++ b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksListGatewaysSamples.java @@ -4,14 +4,17 @@ package com.azure.resourcemanager.avs.generated; -/** Samples for WorkloadNetworks ListGateways. */ +/** + * Samples for WorkloadNetworks ListGateways. + */ public final class WorkloadNetworksListGatewaysSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/WorkloadNetworks_ListGateways.json + * x-ms-original-file: + * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/WorkloadNetworks_ListGateways.json */ /** * Sample code: WorkloadNetworks_ListGateways. - * + * * @param manager Entry point to AvsManager. */ public static void workloadNetworksListGateways(com.azure.resourcemanager.avs.AvsManager manager) { diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksListPortMirroringSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksListPortMirroringSamples.java index 2c4c45eeba3df..e3f773675e002 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksListPortMirroringSamples.java +++ b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksListPortMirroringSamples.java @@ -4,14 +4,18 @@ package com.azure.resourcemanager.avs.generated; -/** Samples for WorkloadNetworks ListPortMirroring. */ +/** + * Samples for WorkloadNetworks ListPortMirroring. + */ public final class WorkloadNetworksListPortMirroringSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/WorkloadNetworks_ListPortMirroringProfiles.json + * x-ms-original-file: + * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/WorkloadNetworks_ListPortMirroring + * .json */ /** * Sample code: WorkloadNetworks_ListPortMirroring. - * + * * @param manager Entry point to AvsManager. */ public static void workloadNetworksListPortMirroring(com.azure.resourcemanager.avs.AvsManager manager) { diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksListPublicIPsSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksListPublicIPsSamples.java index 98881bc870c0b..e6e186c759ae1 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksListPublicIPsSamples.java +++ b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksListPublicIPsSamples.java @@ -4,14 +4,18 @@ package com.azure.resourcemanager.avs.generated; -/** Samples for WorkloadNetworks ListPublicIPs. */ +/** + * Samples for WorkloadNetworks ListPublicIPs. + */ public final class WorkloadNetworksListPublicIPsSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/WorkloadNetworks_ListPublicIPs.json + * x-ms-original-file: + * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/WorkloadNetworks_ListPublicIPs. + * json */ /** * Sample code: WorkloadNetworks_ListPublicIPs. - * + * * @param manager Entry point to AvsManager. */ public static void workloadNetworksListPublicIPs(com.azure.resourcemanager.avs.AvsManager manager) { diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksListSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksListSamples.java index 9dfe9ef9a52a8..d22de3e3f03eb 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksListSamples.java +++ b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksListSamples.java @@ -4,14 +4,17 @@ package com.azure.resourcemanager.avs.generated; -/** Samples for WorkloadNetworks List. */ +/** + * Samples for WorkloadNetworks List. + */ public final class WorkloadNetworksListSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/WorkloadNetworks_List.json + * x-ms-original-file: + * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/WorkloadNetworks_List.json */ /** * Sample code: WorkloadNetworks_List. - * + * * @param manager Entry point to AvsManager. */ public static void workloadNetworksList(com.azure.resourcemanager.avs.AvsManager manager) { diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksListSegmentsSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksListSegmentsSamples.java index abc4a380844f8..d7a18c67ed24b 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksListSegmentsSamples.java +++ b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksListSegmentsSamples.java @@ -4,14 +4,17 @@ package com.azure.resourcemanager.avs.generated; -/** Samples for WorkloadNetworks ListSegments. */ +/** + * Samples for WorkloadNetworks ListSegments. + */ public final class WorkloadNetworksListSegmentsSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/WorkloadNetworks_ListSegments.json + * x-ms-original-file: + * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/WorkloadNetworks_ListSegments.json */ /** * Sample code: WorkloadNetworks_ListSegments. - * + * * @param manager Entry point to AvsManager. */ public static void workloadNetworksListSegments(com.azure.resourcemanager.avs.AvsManager manager) { diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksListVMGroupsSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksListVMGroupsSamples.java index 59139f06bb4f1..4f2dfa22f5885 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksListVMGroupsSamples.java +++ b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksListVMGroupsSamples.java @@ -4,14 +4,17 @@ package com.azure.resourcemanager.avs.generated; -/** Samples for WorkloadNetworks ListVMGroups. */ +/** + * Samples for WorkloadNetworks ListVMGroups. + */ public final class WorkloadNetworksListVMGroupsSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/WorkloadNetworks_ListVMGroups.json + * x-ms-original-file: + * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/WorkloadNetworks_ListVMGroups.json */ /** * Sample code: WorkloadNetworks_ListVMGroups. - * + * * @param manager Entry point to AvsManager. */ public static void workloadNetworksListVMGroups(com.azure.resourcemanager.avs.AvsManager manager) { diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksListVirtualMachinesSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksListVirtualMachinesSamples.java index b1f949c196ba8..bc01084c6c1d6 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksListVirtualMachinesSamples.java +++ b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksListVirtualMachinesSamples.java @@ -4,14 +4,17 @@ package com.azure.resourcemanager.avs.generated; -/** Samples for WorkloadNetworks ListVirtualMachines. */ +/** + * Samples for WorkloadNetworks ListVirtualMachines. + */ public final class WorkloadNetworksListVirtualMachinesSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/WorkloadNetworks_ListVirtualMachines.json + * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/ + * WorkloadNetworks_ListVirtualMachines.json */ /** * Sample code: WorkloadNetworks_ListVirtualMachines. - * + * * @param manager Entry point to AvsManager. */ public static void workloadNetworksListVirtualMachines(com.azure.resourcemanager.avs.AvsManager manager) { diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksUpdateDhcpSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksUpdateDhcpSamples.java index 4bbac534bf2f8..8b85ef4894e1d 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksUpdateDhcpSamples.java +++ b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksUpdateDhcpSamples.java @@ -5,28 +5,25 @@ package com.azure.resourcemanager.avs.generated; import com.azure.resourcemanager.avs.models.WorkloadNetworkDhcp; -import com.azure.resourcemanager.avs.models.WorkloadNetworkDhcpServer; +import com.azure.resourcemanager.avs.models.WorkloadNetworkDhcpServerUpdate; -/** Samples for WorkloadNetworks UpdateDhcp. */ +/** + * Samples for WorkloadNetworks UpdateDhcp. + */ public final class WorkloadNetworksUpdateDhcpSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/WorkloadNetworks_UpdateDhcpConfigurations.json + * x-ms-original-file: + * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/WorkloadNetworks_UpdateDhcp.json */ /** * Sample code: WorkloadNetworks_UpdateDhcp. - * + * * @param manager Entry point to AvsManager. */ public static void workloadNetworksUpdateDhcp(com.azure.resourcemanager.avs.AvsManager manager) { - WorkloadNetworkDhcp resource = - manager - .workloadNetworks() - .getDhcpWithResponse("group1", "dhcp1", "cloud1", com.azure.core.util.Context.NONE) - .getValue(); - resource - .update() - .withProperties( - new WorkloadNetworkDhcpServer().withRevision(1L).withServerAddress("40.1.5.1/24").withLeaseTime(86400L)) - .apply(); + WorkloadNetworkDhcp resource = manager.workloadNetworks() + .getDhcpWithResponse("group1", "dhcp1", "cloud1", com.azure.core.util.Context.NONE).getValue(); + resource.update().withProperties(new WorkloadNetworkDhcpServerUpdate().withRevision(1L) + .withServerAddress("40.1.5.1/24").withLeaseTime(86400)).apply(); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksUpdateDnsServiceSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksUpdateDnsServiceSamples.java index 2ac55687a0d6d..938e541929e30 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksUpdateDnsServiceSamples.java +++ b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksUpdateDnsServiceSamples.java @@ -8,30 +8,25 @@ import com.azure.resourcemanager.avs.models.WorkloadNetworkDnsService; import java.util.Arrays; -/** Samples for WorkloadNetworks UpdateDnsService. */ +/** + * Samples for WorkloadNetworks UpdateDnsService. + */ public final class WorkloadNetworksUpdateDnsServiceSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/WorkloadNetworks_UpdateDnsServices.json + * x-ms-original-file: + * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/WorkloadNetworks_UpdateDnsService. + * json */ /** * Sample code: WorkloadNetworks_UpdateDnsService. - * + * * @param manager Entry point to AvsManager. */ public static void workloadNetworksUpdateDnsService(com.azure.resourcemanager.avs.AvsManager manager) { - WorkloadNetworkDnsService resource = - manager - .workloadNetworks() - .getDnsServiceWithResponse("group1", "cloud1", "dnsService1", com.azure.core.util.Context.NONE) - .getValue(); - resource - .update() - .withDisplayName("dnsService1") - .withDnsServiceIp("5.5.5.5") - .withDefaultDnsZone("defaultDnsZone1") - .withFqdnZones(Arrays.asList("fqdnZone1")) - .withLogLevel(DnsServiceLogLevelEnum.INFO) - .withRevision(1L) - .apply(); + WorkloadNetworkDnsService resource = manager.workloadNetworks() + .getDnsServiceWithResponse("group1", "cloud1", "dnsService1", com.azure.core.util.Context.NONE).getValue(); + resource.update().withDisplayName("dnsService1").withDnsServiceIp("5.5.5.5") + .withDefaultDnsZone("defaultDnsZone1").withFqdnZones(Arrays.asList("fqdnZone1")) + .withLogLevel(DnsServiceLogLevelEnum.INFO).withRevision(1L).apply(); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksUpdateDnsZoneSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksUpdateDnsZoneSamples.java index fd034fe53decc..ee634a869b0a1 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksUpdateDnsZoneSamples.java +++ b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksUpdateDnsZoneSamples.java @@ -7,29 +7,24 @@ import com.azure.resourcemanager.avs.models.WorkloadNetworkDnsZone; import java.util.Arrays; -/** Samples for WorkloadNetworks UpdateDnsZone. */ +/** + * Samples for WorkloadNetworks UpdateDnsZone. + */ public final class WorkloadNetworksUpdateDnsZoneSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/WorkloadNetworks_UpdateDnsZones.json + * x-ms-original-file: + * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/WorkloadNetworks_UpdateDnsZone. + * json */ /** * Sample code: WorkloadNetworks_UpdateDnsZone. - * + * * @param manager Entry point to AvsManager. */ public static void workloadNetworksUpdateDnsZone(com.azure.resourcemanager.avs.AvsManager manager) { - WorkloadNetworkDnsZone resource = - manager - .workloadNetworks() - .getDnsZoneWithResponse("group1", "cloud1", "dnsZone1", com.azure.core.util.Context.NONE) - .getValue(); - resource - .update() - .withDisplayName("dnsZone1") - .withDomain(Arrays.asList()) - .withDnsServerIps(Arrays.asList("1.1.1.1")) - .withSourceIp("8.8.8.8") - .withRevision(1L) - .apply(); + WorkloadNetworkDnsZone resource = manager.workloadNetworks() + .getDnsZoneWithResponse("group1", "cloud1", "dnsZone1", com.azure.core.util.Context.NONE).getValue(); + resource.update().withDisplayName("dnsZone1").withDomain(Arrays.asList()) + .withDnsServerIps(Arrays.asList("1.1.1.1")).withSourceIp("8.8.8.8").withRevision(1L).apply(); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksUpdatePortMirroringSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksUpdatePortMirroringSamples.java index 7ed8d3d07be62..130c1724843c1 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksUpdatePortMirroringSamples.java +++ b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksUpdatePortMirroringSamples.java @@ -7,28 +7,24 @@ import com.azure.resourcemanager.avs.models.PortMirroringDirectionEnum; import com.azure.resourcemanager.avs.models.WorkloadNetworkPortMirroring; -/** Samples for WorkloadNetworks UpdatePortMirroring. */ +/** + * Samples for WorkloadNetworks UpdatePortMirroring. + */ public final class WorkloadNetworksUpdatePortMirroringSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/WorkloadNetworks_UpdatePortMirroringProfiles.json + * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/ + * WorkloadNetworks_UpdatePortMirroring.json */ /** * Sample code: WorkloadNetworks_UpdatePortMirroring. - * + * * @param manager Entry point to AvsManager. */ public static void workloadNetworksUpdatePortMirroring(com.azure.resourcemanager.avs.AvsManager manager) { - WorkloadNetworkPortMirroring resource = - manager - .workloadNetworks() - .getPortMirroringWithResponse("group1", "cloud1", "portMirroring1", com.azure.core.util.Context.NONE) - .getValue(); - resource - .update() - .withDirection(PortMirroringDirectionEnum.BIDIRECTIONAL) - .withSource("vmGroup1") - .withDestination("vmGroup2") - .withRevision(1L) - .apply(); + WorkloadNetworkPortMirroring resource = manager.workloadNetworks() + .getPortMirroringWithResponse("group1", "cloud1", "portMirroring1", com.azure.core.util.Context.NONE) + .getValue(); + resource.update().withDirection(PortMirroringDirectionEnum.BIDIRECTIONAL).withSource("vmGroup1") + .withDestination("vmGroup2").withRevision(1L).apply(); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksUpdateSegmentsSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksUpdateSegmentsSamples.java index ad8d9759af2c2..9610e4c4720d0 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksUpdateSegmentsSamples.java +++ b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksUpdateSegmentsSamples.java @@ -8,30 +8,26 @@ import com.azure.resourcemanager.avs.models.WorkloadNetworkSegmentSubnet; import java.util.Arrays; -/** Samples for WorkloadNetworks UpdateSegments. */ +/** + * Samples for WorkloadNetworks UpdateSegments. + */ public final class WorkloadNetworksUpdateSegmentsSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/WorkloadNetworks_UpdateSegments.json + * x-ms-original-file: + * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/WorkloadNetworks_UpdateSegments. + * json */ /** * Sample code: WorkloadNetworks_UpdateSegments. - * + * * @param manager Entry point to AvsManager. */ public static void workloadNetworksUpdateSegments(com.azure.resourcemanager.avs.AvsManager manager) { - WorkloadNetworkSegment resource = - manager - .workloadNetworks() - .getSegmentWithResponse("group1", "cloud1", "segment1", com.azure.core.util.Context.NONE) - .getValue(); + WorkloadNetworkSegment resource = manager.workloadNetworks() + .getSegmentWithResponse("group1", "cloud1", "segment1", com.azure.core.util.Context.NONE).getValue(); resource - .update() - .withConnectedGateway("/infra/tier-1s/gateway") - .withSubnet( - new WorkloadNetworkSegmentSubnet() - .withDhcpRanges(Arrays.asList("40.20.0.0-40.20.0.1")) - .withGatewayAddress("40.20.20.20/16")) - .withRevision(1L) - .apply(); + .update().withConnectedGateway("/infra/tier-1s/gateway").withSubnet(new WorkloadNetworkSegmentSubnet() + .withDhcpRanges(Arrays.asList("40.20.0.0-40.20.0.1")).withGatewayAddress("40.20.20.20/16")) + .withRevision(1L).apply(); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksUpdateVMGroupSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksUpdateVMGroupSamples.java index d62d3f8912cc3..7e0486c28753f 100644 --- a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksUpdateVMGroupSamples.java +++ b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksUpdateVMGroupSamples.java @@ -7,22 +7,23 @@ import com.azure.resourcemanager.avs.models.WorkloadNetworkVMGroup; import java.util.Arrays; -/** Samples for WorkloadNetworks UpdateVMGroup. */ +/** + * Samples for WorkloadNetworks UpdateVMGroup. + */ public final class WorkloadNetworksUpdateVMGroupSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-03-01/examples/WorkloadNetworks_UpdateVMGroups.json + * x-ms-original-file: + * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/WorkloadNetworks_UpdateVMGroup. + * json */ /** * Sample code: WorkloadNetworks_UpdateVMGroup. - * + * * @param manager Entry point to AvsManager. */ public static void workloadNetworksUpdateVMGroup(com.azure.resourcemanager.avs.AvsManager manager) { - WorkloadNetworkVMGroup resource = - manager - .workloadNetworks() - .getVMGroupWithResponse("group1", "cloud1", "vmGroup1", com.azure.core.util.Context.NONE) - .getValue(); + WorkloadNetworkVMGroup resource = manager.workloadNetworks() + .getVMGroupWithResponse("group1", "cloud1", "vmGroup1", com.azure.core.util.Context.NONE).getValue(); resource.update().withMembers(Arrays.asList("564d43da-fefc-2a3b-1d92-42855622fa50")).withRevision(1L).apply(); } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/AddonArcPropertiesTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/AddonArcPropertiesTests.java deleted file mode 100644 index 2a499275c5757..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/AddonArcPropertiesTests.java +++ /dev/null @@ -1,27 +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.avs.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.avs.models.AddonArcProperties; -import org.junit.jupiter.api.Assertions; - -public final class AddonArcPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - AddonArcProperties model = - BinaryData - .fromString("{\"addonType\":\"Arc\",\"vCenter\":\"gtltdhlf\",\"provisioningState\":\"Deleting\"}") - .toObject(AddonArcProperties.class); - Assertions.assertEquals("gtltdhlf", model.vCenter()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AddonArcProperties model = new AddonArcProperties().withVCenter("gtltdhlf"); - model = BinaryData.fromObject(model).toObject(AddonArcProperties.class); - Assertions.assertEquals("gtltdhlf", model.vCenter()); - } -} diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/AddonHcxPropertiesTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/AddonHcxPropertiesTests.java deleted file mode 100644 index 979fc31d28896..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/AddonHcxPropertiesTests.java +++ /dev/null @@ -1,27 +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.avs.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.avs.models.AddonHcxProperties; -import org.junit.jupiter.api.Assertions; - -public final class AddonHcxPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - AddonHcxProperties model = - BinaryData - .fromString("{\"addonType\":\"HCX\",\"offer\":\"frbbc\",\"provisioningState\":\"Building\"}") - .toObject(AddonHcxProperties.class); - Assertions.assertEquals("frbbc", model.offer()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AddonHcxProperties model = new AddonHcxProperties().withOffer("frbbc"); - model = BinaryData.fromObject(model).toObject(AddonHcxProperties.class); - Assertions.assertEquals("frbbc", model.offer()); - } -} diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/AddonInnerTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/AddonInnerTests.java deleted file mode 100644 index 74547bd794f2b..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/AddonInnerTests.java +++ /dev/null @@ -1,26 +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.avs.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.avs.fluent.models.AddonInner; -import com.azure.resourcemanager.avs.models.AddonProperties; - -public final class AddonInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - AddonInner model = - BinaryData - .fromString( - "{\"properties\":{\"addonType\":\"AddonProperties\",\"provisioningState\":\"Deleting\"},\"id\":\"jjoqkagf\",\"name\":\"sxtta\",\"type\":\"gzxnfaazpxdtnk\"}") - .toObject(AddonInner.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AddonInner model = new AddonInner().withProperties(new AddonProperties()); - model = BinaryData.fromObject(model).toObject(AddonInner.class); - } -} diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/AddonListTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/AddonListTests.java deleted file mode 100644 index 8d426cc1a158e..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/AddonListTests.java +++ /dev/null @@ -1,25 +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.avs.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.avs.models.AddonList; - -public final class AddonListTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - AddonList model = - BinaryData - .fromString( - "{\"value\":[{\"properties\":{\"addonType\":\"AddonProperties\",\"provisioningState\":\"Succeeded\"},\"id\":\"gumhjglikkxws\",\"name\":\"olbq\",\"type\":\"vuzlm\"},{\"properties\":{\"addonType\":\"AddonProperties\",\"provisioningState\":\"Updating\"},\"id\":\"fktgplc\",\"name\":\"pwjxezn\",\"type\":\"igbrnjw\"}],\"nextLink\":\"kpnb\"}") - .toObject(AddonList.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AddonList model = new AddonList(); - model = BinaryData.fromObject(model).toObject(AddonList.class); - } -} diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/AddonPropertiesTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/AddonPropertiesTests.java deleted file mode 100644 index 2b27277b1f819..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/AddonPropertiesTests.java +++ /dev/null @@ -1,24 +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.avs.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.avs.models.AddonProperties; - -public final class AddonPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - AddonProperties model = - BinaryData - .fromString("{\"addonType\":\"AddonProperties\",\"provisioningState\":\"Canceled\"}") - .toObject(AddonProperties.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AddonProperties model = new AddonProperties(); - model = BinaryData.fromObject(model).toObject(AddonProperties.class); - } -} diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/AddonVrPropertiesTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/AddonVrPropertiesTests.java deleted file mode 100644 index 6a5e175dde034..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/AddonVrPropertiesTests.java +++ /dev/null @@ -1,27 +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.avs.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.avs.models.AddonVrProperties; -import org.junit.jupiter.api.Assertions; - -public final class AddonVrPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - AddonVrProperties model = - BinaryData - .fromString("{\"addonType\":\"VR\",\"vrsCount\":1931037183,\"provisioningState\":\"Cancelled\"}") - .toObject(AddonVrProperties.class); - Assertions.assertEquals(1931037183, model.vrsCount()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AddonVrProperties model = new AddonVrProperties().withVrsCount(1931037183); - model = BinaryData.fromObject(model).toObject(AddonVrProperties.class); - Assertions.assertEquals(1931037183, model.vrsCount()); - } -} diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/AddonsCreateOrUpdateMockTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/AddonsCreateOrUpdateMockTests.java deleted file mode 100644 index 676f8c0b44872..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/AddonsCreateOrUpdateMockTests.java +++ /dev/null @@ -1,70 +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.avs.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.avs.AvsManager; -import com.azure.resourcemanager.avs.models.Addon; -import com.azure.resourcemanager.avs.models.AddonProperties; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class AddonsCreateOrUpdateMockTests { - @Test - public void testCreateOrUpdate() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"properties\":{\"addonType\":\"AddonProperties\",\"provisioningState\":\"Succeeded\"},\"id\":\"iblkujr\",\"name\":\"lfojuidjp\",\"type\":\"uyjucejikzo\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - AvsManager manager = - AvsManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - Addon response = - manager - .addons() - .define("gbwidqlvh") - .withExistingPrivateCloud("vkyylizrzbjpsf", "sfuztlvtmv") - .withProperties(new AddonProperties()) - .create(); - } -} diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/AddonsDeleteMockTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/AddonsDeleteMockTests.java deleted file mode 100644 index de8ef2c0512e1..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/AddonsDeleteMockTests.java +++ /dev/null @@ -1,61 +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.avs.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.avs.AvsManager; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class AddonsDeleteMockTests { - @Test - public void testDelete() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = "{}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - AvsManager manager = - AvsManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager.addons().delete("iqsowsaaelc", "ttcjuhplrvkmjc", "mjvlgfgg", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/AddonsGetWithResponseMockTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/AddonsGetWithResponseMockTests.java deleted file mode 100644 index 19e9547845dcf..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/AddonsGetWithResponseMockTests.java +++ /dev/null @@ -1,64 +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.avs.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.avs.AvsManager; -import com.azure.resourcemanager.avs.models.Addon; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class AddonsGetWithResponseMockTests { - @Test - public void testGetWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"properties\":{\"addonType\":\"AddonProperties\",\"provisioningState\":\"Failed\"},\"id\":\"eb\",\"name\":\"fulbmoichdl\",\"type\":\"nfpubntnbatz\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - AvsManager manager = - AvsManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - Addon response = - manager.addons().getWithResponse("hcspo", "aqa", "sipi", com.azure.core.util.Context.NONE).getValue(); - } -} diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/AddonsListMockTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/AddonsListMockTests.java deleted file mode 100644 index bb8fdca716387..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/AddonsListMockTests.java +++ /dev/null @@ -1,64 +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.avs.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.avs.AvsManager; -import com.azure.resourcemanager.avs.models.Addon; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class AddonsListMockTests { - @Test - public void testList() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"value\":[{\"properties\":{\"addonType\":\"AddonProperties\",\"provisioningState\":\"Deleting\"},\"id\":\"oihiqak\",\"name\":\"diw\",\"type\":\"brkwpzdqt\"}]}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - AvsManager manager = - AvsManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = manager.addons().list("wlpxuzzjg", "refqy", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/AuthorizationsDeleteMockTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/AuthorizationsDeleteMockTests.java deleted file mode 100644 index 474e0b5190663..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/AuthorizationsDeleteMockTests.java +++ /dev/null @@ -1,61 +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.avs.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.avs.AvsManager; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class AuthorizationsDeleteMockTests { - @Test - public void testDelete() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = "{}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - AvsManager manager = - AvsManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager.authorizations().delete("nm", "gv", "irpghriypoqeyh", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/AvailabilityPropertiesTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/AvailabilityPropertiesTests.java deleted file mode 100644 index a1b26575fe184..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/AvailabilityPropertiesTests.java +++ /dev/null @@ -1,36 +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.avs.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.avs.models.AvailabilityProperties; -import com.azure.resourcemanager.avs.models.AvailabilityStrategy; -import org.junit.jupiter.api.Assertions; - -public final class AvailabilityPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - AvailabilityProperties model = - BinaryData - .fromString("{\"strategy\":\"SingleZone\",\"zone\":355088461,\"secondaryZone\":1152812045}") - .toObject(AvailabilityProperties.class); - Assertions.assertEquals(AvailabilityStrategy.SINGLE_ZONE, model.strategy()); - Assertions.assertEquals(355088461, model.zone()); - Assertions.assertEquals(1152812045, model.secondaryZone()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AvailabilityProperties model = - new AvailabilityProperties() - .withStrategy(AvailabilityStrategy.SINGLE_ZONE) - .withZone(355088461) - .withSecondaryZone(1152812045); - model = BinaryData.fromObject(model).toObject(AvailabilityProperties.class); - Assertions.assertEquals(AvailabilityStrategy.SINGLE_ZONE, model.strategy()); - Assertions.assertEquals(355088461, model.zone()); - Assertions.assertEquals(1152812045, model.secondaryZone()); - } -} diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/CircuitTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/CircuitTests.java deleted file mode 100644 index 834ab4eeaf911..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/CircuitTests.java +++ /dev/null @@ -1,25 +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.avs.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.avs.models.Circuit; - -public final class CircuitTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - Circuit model = - BinaryData - .fromString( - "{\"primarySubnet\":\"runmp\",\"secondarySubnet\":\"tdbhrbnla\",\"expressRouteID\":\"xmyskp\",\"expressRoutePrivatePeeringID\":\"enbtkcxywny\"}") - .toObject(Circuit.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - Circuit model = new Circuit(); - model = BinaryData.fromObject(model).toObject(Circuit.class); - } -} diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/CloudLinkInnerTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/CloudLinkInnerTests.java deleted file mode 100644 index 414fd1729744d..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/CloudLinkInnerTests.java +++ /dev/null @@ -1,28 +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.avs.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.avs.fluent.models.CloudLinkInner; -import org.junit.jupiter.api.Assertions; - -public final class CloudLinkInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - CloudLinkInner model = - BinaryData - .fromString( - "{\"properties\":{\"status\":\"Deleting\",\"linkedCloud\":\"qkghtpwijnhy\"},\"id\":\"svfycxzbfv\",\"name\":\"owvrvmtgjqppyos\",\"type\":\"ronzmyhgfip\"}") - .toObject(CloudLinkInner.class); - Assertions.assertEquals("qkghtpwijnhy", model.linkedCloud()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - CloudLinkInner model = new CloudLinkInner().withLinkedCloud("qkghtpwijnhy"); - model = BinaryData.fromObject(model).toObject(CloudLinkInner.class); - Assertions.assertEquals("qkghtpwijnhy", model.linkedCloud()); - } -} diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/CloudLinkListTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/CloudLinkListTests.java deleted file mode 100644 index 5725b81b69df7..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/CloudLinkListTests.java +++ /dev/null @@ -1,25 +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.avs.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.avs.models.CloudLinkList; - -public final class CloudLinkListTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - CloudLinkList model = - BinaryData - .fromString( - "{\"value\":[{\"properties\":{\"status\":\"Deleting\",\"linkedCloud\":\"ccsnjvcdwxlpq\"},\"id\":\"kftnkhtjsyin\",\"name\":\"wfqatmtd\",\"type\":\"tmdvypgikdgs\"},{\"properties\":{\"status\":\"Active\",\"linkedCloud\":\"irryuzhlh\"},\"id\":\"joqrvqqaatj\",\"name\":\"nrvgoupmfiibfgg\",\"type\":\"ioolvrwxkvtkkgll\"},{\"properties\":{\"status\":\"Deleting\",\"linkedCloud\":\"vjayvblmhvkzu\"},\"id\":\"bxvvyhg\",\"name\":\"opbyrqufegxu\",\"type\":\"wz\"},{\"properties\":{\"status\":\"Disconnected\",\"linkedCloud\":\"mctlpdngitv\"},\"id\":\"bmhrixkwmyijejv\",\"name\":\"grhbpn\",\"type\":\"ixexcc\"}],\"nextLink\":\"reaxhcexdr\"}") - .toObject(CloudLinkList.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - CloudLinkList model = new CloudLinkList(); - model = BinaryData.fromObject(model).toObject(CloudLinkList.class); - } -} diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/CloudLinkPropertiesTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/CloudLinkPropertiesTests.java deleted file mode 100644 index 7112db7915a1a..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/CloudLinkPropertiesTests.java +++ /dev/null @@ -1,27 +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.avs.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.avs.fluent.models.CloudLinkProperties; -import org.junit.jupiter.api.Assertions; - -public final class CloudLinkPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - CloudLinkProperties model = - BinaryData - .fromString("{\"status\":\"Deleting\",\"linkedCloud\":\"mcwaekrrjr\"}") - .toObject(CloudLinkProperties.class); - Assertions.assertEquals("mcwaekrrjr", model.linkedCloud()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - CloudLinkProperties model = new CloudLinkProperties().withLinkedCloud("mcwaekrrjr"); - model = BinaryData.fromObject(model).toObject(CloudLinkProperties.class); - Assertions.assertEquals("mcwaekrrjr", model.linkedCloud()); - } -} diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/CloudLinksCreateOrUpdateMockTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/CloudLinksCreateOrUpdateMockTests.java deleted file mode 100644 index 254fb5acc11e1..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/CloudLinksCreateOrUpdateMockTests.java +++ /dev/null @@ -1,72 +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.avs.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.avs.AvsManager; -import com.azure.resourcemanager.avs.models.CloudLink; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class CloudLinksCreateOrUpdateMockTests { - @Test - public void testCreateOrUpdate() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"properties\":{\"status\":\"Deleting\",\"linkedCloud\":\"glh\"},\"id\":\"rr\",\"name\":\"yejylmbkzudnigrf\",\"type\":\"hotj\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - AvsManager manager = - AvsManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - CloudLink response = - manager - .cloudLinks() - .define("ubhvj") - .withExistingPrivateCloud("uic", "hvtrrmhwrbfdpyf") - .withLinkedCloud("uyzlw") - .create(); - - Assertions.assertEquals("glh", response.linkedCloud()); - } -} diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/CloudLinksDeleteMockTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/CloudLinksDeleteMockTests.java deleted file mode 100644 index e7b232ad2f1a5..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/CloudLinksDeleteMockTests.java +++ /dev/null @@ -1,61 +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.avs.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.avs.AvsManager; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class CloudLinksDeleteMockTests { - @Test - public void testDelete() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = "{}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - AvsManager manager = - AvsManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager.cloudLinks().delete("lhikcyychunsj", "pjrtws", "hv", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/CloudLinksGetWithResponseMockTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/CloudLinksGetWithResponseMockTests.java deleted file mode 100644 index 32687f4d5b345..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/CloudLinksGetWithResponseMockTests.java +++ /dev/null @@ -1,70 +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.avs.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.avs.AvsManager; -import com.azure.resourcemanager.avs.models.CloudLink; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class CloudLinksGetWithResponseMockTests { - @Test - public void testGetWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"properties\":{\"status\":\"Disconnected\",\"linkedCloud\":\"ecb\"},\"id\":\"opwndyqleallk\",\"name\":\"mtkhlowkxxpvbr\",\"type\":\"fjmzsyzfho\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - AvsManager manager = - AvsManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - CloudLink response = - manager - .cloudLinks() - .getWithResponse("ycjimryvwgcwwpbm", "gwe", "ydsx", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("ecb", response.linkedCloud()); - } -} diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/CloudLinksListMockTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/CloudLinksListMockTests.java deleted file mode 100644 index 550ae0b084e4e..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/CloudLinksListMockTests.java +++ /dev/null @@ -1,68 +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.avs.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.avs.AvsManager; -import com.azure.resourcemanager.avs.models.CloudLink; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class CloudLinksListMockTests { - @Test - public void testList() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"value\":[{\"properties\":{\"status\":\"Building\",\"linkedCloud\":\"cudfbsfarfsiowl\"},\"id\":\"jxnqp\",\"name\":\"wgfstmhqykizm\",\"type\":\"ksaoafcluqvox\"}]}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - AvsManager manager = - AvsManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = - manager.cloudLinks().list("eolhbhlvbmx", "qi", com.azure.core.util.Context.NONE); - - Assertions.assertEquals("cudfbsfarfsiowl", response.iterator().next().linkedCloud()); - } -} diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ClusterInnerTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ClusterInnerTests.java deleted file mode 100644 index d344ae6761bc2..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ClusterInnerTests.java +++ /dev/null @@ -1,38 +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.avs.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.avs.fluent.models.ClusterInner; -import com.azure.resourcemanager.avs.models.Sku; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class ClusterInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ClusterInner model = - BinaryData - .fromString( - "{\"sku\":{\"name\":\"nmxiebwwaloayqc\"},\"properties\":{\"clusterSize\":1428727987,\"provisioningState\":\"Deleting\",\"clusterId\":442573185,\"hosts\":[\"yzm\",\"txon\",\"mtsavjcbpwxqp\"]},\"id\":\"rknftguvriuhprwm\",\"name\":\"yvxqtayriwwroy\",\"type\":\"bexrmcq\"}") - .toObject(ClusterInner.class); - Assertions.assertEquals("nmxiebwwaloayqc", model.sku().name()); - Assertions.assertEquals(1428727987, model.clusterSize()); - Assertions.assertEquals("yzm", model.hosts().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ClusterInner model = - new ClusterInner() - .withSku(new Sku().withName("nmxiebwwaloayqc")) - .withClusterSize(1428727987) - .withHosts(Arrays.asList("yzm", "txon", "mtsavjcbpwxqp")); - model = BinaryData.fromObject(model).toObject(ClusterInner.class); - Assertions.assertEquals("nmxiebwwaloayqc", model.sku().name()); - Assertions.assertEquals(1428727987, model.clusterSize()); - Assertions.assertEquals("yzm", model.hosts().get(0)); - } -} diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ClusterListTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ClusterListTests.java deleted file mode 100644 index 15d12990b24ca..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ClusterListTests.java +++ /dev/null @@ -1,25 +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.avs.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.avs.models.ClusterList; - -public final class ClusterListTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ClusterList model = - BinaryData - .fromString( - "{\"value\":[{\"sku\":{\"name\":\"ag\"},\"properties\":{\"clusterSize\":230289658,\"provisioningState\":\"Cancelled\",\"clusterId\":683816537,\"hosts\":[\"hahvljuahaq\",\"hcdhmdual\",\"exq\",\"vfadmws\"]},\"id\":\"crgvxpvgom\",\"name\":\"lf\",\"type\":\"isgwbnbbeldawkz\"},{\"sku\":{\"name\":\"ali\"},\"properties\":{\"clusterSize\":952194839,\"provisioningState\":\"Deleting\",\"clusterId\":391809232,\"hosts\":[\"ashsfwxos\",\"w\",\"xcug\"]},\"id\":\"cjooxdjebwpucwwf\",\"name\":\"ovbvmeueciv\",\"type\":\"hzceuojgjrwjue\"},{\"sku\":{\"name\":\"otwmcdyt\"},\"properties\":{\"clusterSize\":384724385,\"provisioningState\":\"Canceled\",\"clusterId\":1070997174,\"hosts\":[\"wgqwgxhn\",\"skxfbk\",\"y\"]},\"id\":\"gklwn\",\"name\":\"nhjdauw\",\"type\":\"vylwzbtdhxuj\"},{\"sku\":{\"name\":\"nbmpowuwprzq\"},\"properties\":{\"clusterSize\":97995700,\"provisioningState\":\"Cancelled\",\"clusterId\":683546621,\"hosts\":[\"khfxobbcswsrt\"]},\"id\":\"riplrbpbewtg\",\"name\":\"fgb\",\"type\":\"c\"}],\"nextLink\":\"xzvlvqhjkbegib\"}") - .toObject(ClusterList.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ClusterList model = new ClusterList(); - model = BinaryData.fromObject(model).toObject(ClusterList.class); - } -} diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ClusterPropertiesTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ClusterPropertiesTests.java deleted file mode 100644 index bbe8a08dba3fa..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ClusterPropertiesTests.java +++ /dev/null @@ -1,32 +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.avs.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.avs.fluent.models.ClusterProperties; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class ClusterPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ClusterProperties model = - BinaryData - .fromString( - "{\"clusterSize\":1430552166,\"provisioningState\":\"Succeeded\",\"clusterId\":934632065,\"hosts\":[\"nmefqsgzvahapj\"]}") - .toObject(ClusterProperties.class); - Assertions.assertEquals(1430552166, model.clusterSize()); - Assertions.assertEquals("nmefqsgzvahapj", model.hosts().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ClusterProperties model = - new ClusterProperties().withClusterSize(1430552166).withHosts(Arrays.asList("nmefqsgzvahapj")); - model = BinaryData.fromObject(model).toObject(ClusterProperties.class); - Assertions.assertEquals(1430552166, model.clusterSize()); - Assertions.assertEquals("nmefqsgzvahapj", model.hosts().get(0)); - } -} diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ClusterUpdatePropertiesTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ClusterUpdatePropertiesTests.java deleted file mode 100644 index 2be1f162a9abb..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ClusterUpdatePropertiesTests.java +++ /dev/null @@ -1,34 +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.avs.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.avs.fluent.models.ClusterUpdateProperties; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class ClusterUpdatePropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ClusterUpdateProperties model = - BinaryData - .fromString( - "{\"clusterSize\":977455104,\"hosts\":[\"zunlu\",\"hnnpr\",\"xipeilpjzuaejx\",\"ultskzbbtdz\"]}") - .toObject(ClusterUpdateProperties.class); - Assertions.assertEquals(977455104, model.clusterSize()); - Assertions.assertEquals("zunlu", model.hosts().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ClusterUpdateProperties model = - new ClusterUpdateProperties() - .withClusterSize(977455104) - .withHosts(Arrays.asList("zunlu", "hnnpr", "xipeilpjzuaejx", "ultskzbbtdz")); - model = BinaryData.fromObject(model).toObject(ClusterUpdateProperties.class); - Assertions.assertEquals(977455104, model.clusterSize()); - Assertions.assertEquals("zunlu", model.hosts().get(0)); - } -} diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ClusterUpdateTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ClusterUpdateTests.java deleted file mode 100644 index 682fd45a22ea9..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ClusterUpdateTests.java +++ /dev/null @@ -1,31 +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.avs.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.avs.models.ClusterUpdate; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class ClusterUpdateTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ClusterUpdate model = - BinaryData - .fromString("{\"properties\":{\"clusterSize\":1715507551,\"hosts\":[\"qzcjrvxdj\",\"lmwlxkvugfhzo\"]}}") - .toObject(ClusterUpdate.class); - Assertions.assertEquals(1715507551, model.clusterSize()); - Assertions.assertEquals("qzcjrvxdj", model.hosts().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ClusterUpdate model = - new ClusterUpdate().withClusterSize(1715507551).withHosts(Arrays.asList("qzcjrvxdj", "lmwlxkvugfhzo")); - model = BinaryData.fromObject(model).toObject(ClusterUpdate.class); - Assertions.assertEquals(1715507551, model.clusterSize()); - Assertions.assertEquals("qzcjrvxdj", model.hosts().get(0)); - } -} diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ClusterZoneListInnerTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ClusterZoneListInnerTests.java deleted file mode 100644 index c24f51b6108e9..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ClusterZoneListInnerTests.java +++ /dev/null @@ -1,29 +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.avs.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.avs.fluent.models.ClusterZoneListInner; -import com.azure.resourcemanager.avs.models.ClusterZone; -import java.util.Arrays; - -public final class ClusterZoneListInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ClusterZoneListInner model = - BinaryData - .fromString( - "{\"zones\":[{\"hosts\":[\"kgpwoz\"],\"zone\":\"kfpbs\"},{\"hosts\":[\"f\"],\"zone\":\"luu\"},{\"hosts\":[\"touwaboekqv\",\"elnsmvbxw\",\"jsflhhcaalnjix\",\"sxyawjoyaqcs\"],\"zone\":\"jpkiidzyexznelix\"},{\"hosts\":[\"ztfolhbnxk\"],\"zone\":\"laulppg\"}]}") - .toObject(ClusterZoneListInner.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ClusterZoneListInner model = - new ClusterZoneListInner() - .withZones(Arrays.asList(new ClusterZone(), new ClusterZone(), new ClusterZone(), new ClusterZone())); - model = BinaryData.fromObject(model).toObject(ClusterZoneListInner.class); - } -} diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ClusterZoneTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ClusterZoneTests.java deleted file mode 100644 index 14449e7841707..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ClusterZoneTests.java +++ /dev/null @@ -1,24 +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.avs.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.avs.models.ClusterZone; - -public final class ClusterZoneTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ClusterZone model = - BinaryData - .fromString("{\"hosts\":[\"pnapnyiropuh\",\"igvpgylg\",\"git\",\"medjvcslynqwwncw\"],\"zone\":\"hxg\"}") - .toObject(ClusterZone.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ClusterZone model = new ClusterZone(); - model = BinaryData.fromObject(model).toObject(ClusterZone.class); - } -} diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ClustersCreateOrUpdateMockTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ClustersCreateOrUpdateMockTests.java deleted file mode 100644 index a56d8cc0d13e6..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ClustersCreateOrUpdateMockTests.java +++ /dev/null @@ -1,78 +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.avs.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.avs.AvsManager; -import com.azure.resourcemanager.avs.models.Cluster; -import com.azure.resourcemanager.avs.models.Sku; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class ClustersCreateOrUpdateMockTests { - @Test - public void testCreateOrUpdate() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"sku\":{\"name\":\"thwtzol\"},\"properties\":{\"clusterSize\":1713502373,\"provisioningState\":\"Succeeded\",\"clusterId\":989403174,\"hosts\":[\"bwjscjpahlxveab\",\"qxnmwmqt\",\"bxyijddtvq\",\"ttadijae\"]},\"id\":\"kmr\",\"name\":\"ieekpndzaa\",\"type\":\"mudqmeq\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - AvsManager manager = - AvsManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - Cluster response = - manager - .clusters() - .define("bphbqzmizakakank") - .withExistingPrivateCloud("cwsldri", "etpwbralll") - .withSku(new Sku().withName("p")) - .withClusterSize(1316748102) - .withHosts(Arrays.asList("hjlmu", "y", "primr", "opteecj")) - .create(); - - Assertions.assertEquals("thwtzol", response.sku().name()); - Assertions.assertEquals(1713502373, response.clusterSize()); - Assertions.assertEquals("bwjscjpahlxveab", response.hosts().get(0)); - } -} diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ClustersDeleteMockTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ClustersDeleteMockTests.java deleted file mode 100644 index 0bc994e0d4ead..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ClustersDeleteMockTests.java +++ /dev/null @@ -1,61 +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.avs.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.avs.AvsManager; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class ClustersDeleteMockTests { - @Test - public void testDelete() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = "{}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - AvsManager manager = - AvsManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager.clusters().delete("xulcdisdos", "jbjsvgjrwh", "yvycytdclxgcckn", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ClustersGetWithResponseMockTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ClustersGetWithResponseMockTests.java deleted file mode 100644 index f0aaedead11af..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ClustersGetWithResponseMockTests.java +++ /dev/null @@ -1,72 +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.avs.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.avs.AvsManager; -import com.azure.resourcemanager.avs.models.Cluster; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class ClustersGetWithResponseMockTests { - @Test - public void testGetWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"sku\":{\"name\":\"nac\"},\"properties\":{\"clusterSize\":1670865281,\"provisioningState\":\"Succeeded\",\"clusterId\":1394471326,\"hosts\":[\"zvytnrzvuljraaer\"]},\"id\":\"nok\",\"name\":\"gukkjqnvbroy\",\"type\":\"a\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - AvsManager manager = - AvsManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - Cluster response = - manager - .clusters() - .getWithResponse("kdlpa", "zrcxfailcfxwmdbo", "dfgsftufqobrj", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("nac", response.sku().name()); - Assertions.assertEquals(1670865281, response.clusterSize()); - Assertions.assertEquals("zvytnrzvuljraaer", response.hosts().get(0)); - } -} diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ClustersListMockTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ClustersListMockTests.java deleted file mode 100644 index 36d895ebb5a46..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ClustersListMockTests.java +++ /dev/null @@ -1,70 +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.avs.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.avs.AvsManager; -import com.azure.resourcemanager.avs.models.Cluster; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class ClustersListMockTests { - @Test - public void testList() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"value\":[{\"sku\":{\"name\":\"dmdqb\"},\"properties\":{\"clusterSize\":181668941,\"provisioningState\":\"Updating\",\"clusterId\":543854908,\"hosts\":[\"acbslhhxu\",\"bxv\",\"d\",\"tnsi\"]},\"id\":\"ud\",\"name\":\"z\",\"type\":\"mes\"}]}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - AvsManager manager = - AvsManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = - manager.clusters().list("itvtzeexavo", "tfgle", com.azure.core.util.Context.NONE); - - Assertions.assertEquals("dmdqb", response.iterator().next().sku().name()); - Assertions.assertEquals(181668941, response.iterator().next().clusterSize()); - Assertions.assertEquals("acbslhhxu", response.iterator().next().hosts().get(0)); - } -} diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ClustersListZonesWithResponseMockTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ClustersListZonesWithResponseMockTests.java deleted file mode 100644 index e38569421bf41..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ClustersListZonesWithResponseMockTests.java +++ /dev/null @@ -1,67 +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.avs.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.avs.AvsManager; -import com.azure.resourcemanager.avs.models.ClusterZoneList; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class ClustersListZonesWithResponseMockTests { - @Test - public void testListZonesWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"zones\":[{\"hosts\":[\"ihchrphkmcrjdqn\"],\"zone\":\"fzpbgtgkyl\"},{\"hosts\":[\"hrjeuutlw\",\"ez\",\"zhokvbwnhh\"],\"zone\":\"lgehg\"},{\"hosts\":[\"pifhpfeoajvgcxtx\",\"csheafidltugsr\",\"smkss\",\"h\"],\"zone\":\"ftxfkf\"},{\"hosts\":[\"prhptillu\"],\"zone\":\"iqtgdqoh\"}]}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - AvsManager manager = - AvsManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - ClusterZoneList response = - manager - .clusters() - .listZonesWithResponse("nwm", "tmvpdvjdhtt", "a", com.azure.core.util.Context.NONE) - .getValue(); - } -} diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/CommonClusterPropertiesTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/CommonClusterPropertiesTests.java deleted file mode 100644 index 24ce082715715..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/CommonClusterPropertiesTests.java +++ /dev/null @@ -1,32 +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.avs.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.avs.models.CommonClusterProperties; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class CommonClusterPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - CommonClusterProperties model = - BinaryData - .fromString( - "{\"clusterSize\":1271650742,\"provisioningState\":\"Canceled\",\"clusterId\":1239569697,\"hosts\":[\"uosvmkfssxqukk\"]}") - .toObject(CommonClusterProperties.class); - Assertions.assertEquals(1271650742, model.clusterSize()); - Assertions.assertEquals("uosvmkfssxqukk", model.hosts().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - CommonClusterProperties model = - new CommonClusterProperties().withClusterSize(1271650742).withHosts(Arrays.asList("uosvmkfssxqukk")); - model = BinaryData.fromObject(model).toObject(CommonClusterProperties.class); - Assertions.assertEquals(1271650742, model.clusterSize()); - Assertions.assertEquals("uosvmkfssxqukk", model.hosts().get(0)); - } -} diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/DatastoreInnerTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/DatastoreInnerTests.java deleted file mode 100644 index 3e229725b262a..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/DatastoreInnerTests.java +++ /dev/null @@ -1,44 +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.avs.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.avs.fluent.models.DatastoreInner; -import com.azure.resourcemanager.avs.models.DiskPoolVolume; -import com.azure.resourcemanager.avs.models.MountOptionEnum; -import com.azure.resourcemanager.avs.models.NetAppVolume; -import org.junit.jupiter.api.Assertions; - -public final class DatastoreInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DatastoreInner model = - BinaryData - .fromString( - "{\"properties\":{\"provisioningState\":\"Pending\",\"netAppVolume\":{\"id\":\"slqb\"},\"diskPoolVolume\":{\"targetId\":\"fxoblytkb\",\"lunName\":\"mpew\",\"mountOption\":\"ATTACH\",\"path\":\"krvrns\"},\"status\":\"DeadOrError\"},\"id\":\"q\",\"name\":\"ohxcrsbfova\",\"type\":\"rruvwbhsq\"}") - .toObject(DatastoreInner.class); - Assertions.assertEquals("slqb", model.netAppVolume().id()); - Assertions.assertEquals("fxoblytkb", model.diskPoolVolume().targetId()); - Assertions.assertEquals("mpew", model.diskPoolVolume().lunName()); - Assertions.assertEquals(MountOptionEnum.ATTACH, model.diskPoolVolume().mountOption()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DatastoreInner model = - new DatastoreInner() - .withNetAppVolume(new NetAppVolume().withId("slqb")) - .withDiskPoolVolume( - new DiskPoolVolume() - .withTargetId("fxoblytkb") - .withLunName("mpew") - .withMountOption(MountOptionEnum.ATTACH)); - model = BinaryData.fromObject(model).toObject(DatastoreInner.class); - Assertions.assertEquals("slqb", model.netAppVolume().id()); - Assertions.assertEquals("fxoblytkb", model.diskPoolVolume().targetId()); - Assertions.assertEquals("mpew", model.diskPoolVolume().lunName()); - Assertions.assertEquals(MountOptionEnum.ATTACH, model.diskPoolVolume().mountOption()); - } -} diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/DatastoreListTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/DatastoreListTests.java deleted file mode 100644 index 2b7e07f70ebf5..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/DatastoreListTests.java +++ /dev/null @@ -1,25 +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.avs.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.avs.models.DatastoreList; - -public final class DatastoreListTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DatastoreList model = - BinaryData - .fromString( - "{\"value\":[{\"properties\":{\"provisioningState\":\"Deleting\",\"netAppVolume\":{\"id\":\"napkteoellw\"},\"diskPoolVolume\":{\"targetId\":\"fdygpfqbuaceopz\",\"lunName\":\"qrhhu\",\"mountOption\":\"ATTACH\",\"path\":\"pcqeqx\"},\"status\":\"Attached\"},\"id\":\"dahzxctobg\",\"name\":\"kdmoi\",\"type\":\"postmgrcfbunrm\"},{\"properties\":{\"provisioningState\":\"Cancelled\",\"netAppVolume\":{\"id\":\"kxbpvj\"},\"diskPoolVolume\":{\"targetId\":\"jhxxjyn\",\"lunName\":\"u\",\"mountOption\":\"MOUNT\",\"path\":\"r\"},\"status\":\"LostCommunication\"},\"id\":\"bxqz\",\"name\":\"szjfauvjfdxxivet\",\"type\":\"t\"}],\"nextLink\":\"aqtdoqmcbx\"}") - .toObject(DatastoreList.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DatastoreList model = new DatastoreList(); - model = BinaryData.fromObject(model).toObject(DatastoreList.class); - } -} diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/DatastorePropertiesTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/DatastorePropertiesTests.java deleted file mode 100644 index 396edd46657e5..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/DatastorePropertiesTests.java +++ /dev/null @@ -1,44 +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.avs.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.avs.fluent.models.DatastoreProperties; -import com.azure.resourcemanager.avs.models.DiskPoolVolume; -import com.azure.resourcemanager.avs.models.MountOptionEnum; -import com.azure.resourcemanager.avs.models.NetAppVolume; -import org.junit.jupiter.api.Assertions; - -public final class DatastorePropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DatastoreProperties model = - BinaryData - .fromString( - "{\"provisioningState\":\"Creating\",\"netAppVolume\":{\"id\":\"cgjbirxbp\"},\"diskPoolVolume\":{\"targetId\":\"srfbjfdtwss\",\"lunName\":\"t\",\"mountOption\":\"MOUNT\",\"path\":\"jzbexilzznfq\"},\"status\":\"Inaccessible\"}") - .toObject(DatastoreProperties.class); - Assertions.assertEquals("cgjbirxbp", model.netAppVolume().id()); - Assertions.assertEquals("srfbjfdtwss", model.diskPoolVolume().targetId()); - Assertions.assertEquals("t", model.diskPoolVolume().lunName()); - Assertions.assertEquals(MountOptionEnum.MOUNT, model.diskPoolVolume().mountOption()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DatastoreProperties model = - new DatastoreProperties() - .withNetAppVolume(new NetAppVolume().withId("cgjbirxbp")) - .withDiskPoolVolume( - new DiskPoolVolume() - .withTargetId("srfbjfdtwss") - .withLunName("t") - .withMountOption(MountOptionEnum.MOUNT)); - model = BinaryData.fromObject(model).toObject(DatastoreProperties.class); - Assertions.assertEquals("cgjbirxbp", model.netAppVolume().id()); - Assertions.assertEquals("srfbjfdtwss", model.diskPoolVolume().targetId()); - Assertions.assertEquals("t", model.diskPoolVolume().lunName()); - Assertions.assertEquals(MountOptionEnum.MOUNT, model.diskPoolVolume().mountOption()); - } -} diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/DatastoresCreateOrUpdateMockTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/DatastoresCreateOrUpdateMockTests.java deleted file mode 100644 index 0c8ed1ee64c52..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/DatastoresCreateOrUpdateMockTests.java +++ /dev/null @@ -1,83 +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.avs.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.avs.AvsManager; -import com.azure.resourcemanager.avs.models.Datastore; -import com.azure.resourcemanager.avs.models.DiskPoolVolume; -import com.azure.resourcemanager.avs.models.MountOptionEnum; -import com.azure.resourcemanager.avs.models.NetAppVolume; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class DatastoresCreateOrUpdateMockTests { - @Test - public void testCreateOrUpdate() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"properties\":{\"provisioningState\":\"Succeeded\",\"netAppVolume\":{\"id\":\"xmysuxswqrntv\"},\"diskPoolVolume\":{\"targetId\":\"ijpstte\",\"lunName\":\"oqq\",\"mountOption\":\"MOUNT\",\"path\":\"yufmhruncuwmq\"},\"status\":\"DeadOrError\"},\"id\":\"cdqzhlctddu\",\"name\":\"qn\",\"type\":\"yfp\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - AvsManager manager = - AvsManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - Datastore response = - manager - .datastores() - .define("bbelawumuaslzk") - .withExistingCluster("boldforobwj", "vizbfhfo", "vacqpbtuodxesz") - .withNetAppVolume(new NetAppVolume().withId("ycqucwyh")) - .withDiskPoolVolume( - new DiskPoolVolume() - .withTargetId("nomdrkywuhpsv") - .withLunName("uurutlwexxwlalni") - .withMountOption(MountOptionEnum.ATTACH)) - .create(); - - Assertions.assertEquals("xmysuxswqrntv", response.netAppVolume().id()); - Assertions.assertEquals("ijpstte", response.diskPoolVolume().targetId()); - Assertions.assertEquals("oqq", response.diskPoolVolume().lunName()); - Assertions.assertEquals(MountOptionEnum.MOUNT, response.diskPoolVolume().mountOption()); - } -} diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/DatastoresDeleteMockTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/DatastoresDeleteMockTests.java deleted file mode 100644 index 777962958ef54..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/DatastoresDeleteMockTests.java +++ /dev/null @@ -1,61 +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.avs.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.avs.AvsManager; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class DatastoresDeleteMockTests { - @Test - public void testDelete() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = "{}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - AvsManager manager = - AvsManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager.datastores().delete("keifzzhmkdasv", "lyhb", "cu", "chxgs", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/DatastoresGetWithResponseMockTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/DatastoresGetWithResponseMockTests.java deleted file mode 100644 index 1730f83e13d31..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/DatastoresGetWithResponseMockTests.java +++ /dev/null @@ -1,74 +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.avs.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.avs.AvsManager; -import com.azure.resourcemanager.avs.models.Datastore; -import com.azure.resourcemanager.avs.models.MountOptionEnum; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class DatastoresGetWithResponseMockTests { - @Test - public void testGetWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"properties\":{\"provisioningState\":\"Failed\",\"netAppVolume\":{\"id\":\"dhgbjkvre\"},\"diskPoolVolume\":{\"targetId\":\"eamurvzmlo\",\"lunName\":\"uanashcxlp\",\"mountOption\":\"MOUNT\",\"path\":\"bdkelvidizo\"},\"status\":\"LostCommunication\"},\"id\":\"bccxjmonfdgn\",\"name\":\"n\",\"type\":\"ypuuwwltvuqjctze\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - AvsManager manager = - AvsManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - Datastore response = - manager - .datastores() - .getWithResponse("khgn", "nzonzl", "piqywnc", "jtszcof", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("dhgbjkvre", response.netAppVolume().id()); - Assertions.assertEquals("eamurvzmlo", response.diskPoolVolume().targetId()); - Assertions.assertEquals("uanashcxlp", response.diskPoolVolume().lunName()); - Assertions.assertEquals(MountOptionEnum.MOUNT, response.diskPoolVolume().mountOption()); - } -} diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/DatastoresListMockTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/DatastoresListMockTests.java deleted file mode 100644 index 97f402bdcf281..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/DatastoresListMockTests.java +++ /dev/null @@ -1,72 +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.avs.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.avs.AvsManager; -import com.azure.resourcemanager.avs.models.Datastore; -import com.azure.resourcemanager.avs.models.MountOptionEnum; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class DatastoresListMockTests { - @Test - public void testList() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"value\":[{\"properties\":{\"provisioningState\":\"Updating\",\"netAppVolume\":{\"id\":\"aqh\"},\"diskPoolVolume\":{\"targetId\":\"eufuqyrxpdlcgql\",\"lunName\":\"ismjqfrddgamqu\",\"mountOption\":\"MOUNT\",\"path\":\"rsjuivfcdisyir\"},\"status\":\"DeadOrError\"},\"id\":\"hcz\",\"name\":\"xrxzbujrtr\",\"type\":\"qvwre\"}]}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - AvsManager manager = - AvsManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = - manager.datastores().list("igpibud", "wyxebeybpmzz", "rtffyaqitmh", com.azure.core.util.Context.NONE); - - Assertions.assertEquals("aqh", response.iterator().next().netAppVolume().id()); - Assertions.assertEquals("eufuqyrxpdlcgql", response.iterator().next().diskPoolVolume().targetId()); - Assertions.assertEquals("ismjqfrddgamqu", response.iterator().next().diskPoolVolume().lunName()); - Assertions.assertEquals(MountOptionEnum.MOUNT, response.iterator().next().diskPoolVolume().mountOption()); - } -} diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/DiskPoolVolumeTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/DiskPoolVolumeTests.java deleted file mode 100644 index 86b53a1251c1c..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/DiskPoolVolumeTests.java +++ /dev/null @@ -1,37 +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.avs.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.avs.models.DiskPoolVolume; -import com.azure.resourcemanager.avs.models.MountOptionEnum; -import org.junit.jupiter.api.Assertions; - -public final class DiskPoolVolumeTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DiskPoolVolume model = - BinaryData - .fromString( - "{\"targetId\":\"ruoujmk\",\"lunName\":\"jhwqytjrybnw\",\"mountOption\":\"ATTACH\",\"path\":\"drjervnaenqpehin\"}") - .toObject(DiskPoolVolume.class); - Assertions.assertEquals("ruoujmk", model.targetId()); - Assertions.assertEquals("jhwqytjrybnw", model.lunName()); - Assertions.assertEquals(MountOptionEnum.ATTACH, model.mountOption()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DiskPoolVolume model = - new DiskPoolVolume() - .withTargetId("ruoujmk") - .withLunName("jhwqytjrybnw") - .withMountOption(MountOptionEnum.ATTACH); - model = BinaryData.fromObject(model).toObject(DiskPoolVolume.class); - Assertions.assertEquals("ruoujmk", model.targetId()); - Assertions.assertEquals("jhwqytjrybnw", model.lunName()); - Assertions.assertEquals(MountOptionEnum.ATTACH, model.mountOption()); - } -} diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/EndpointsTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/EndpointsTests.java deleted file mode 100644 index 9638dc01c5453..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/EndpointsTests.java +++ /dev/null @@ -1,24 +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.avs.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.avs.models.Endpoints; - -public final class EndpointsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - Endpoints model = - BinaryData - .fromString("{\"nsxtManager\":\"rsyn\",\"vcsa\":\"idybyxczf\",\"hcxCloudManager\":\"haaxdbabphl\"}") - .toObject(Endpoints.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - Endpoints model = new Endpoints(); - model = BinaryData.fromObject(model).toObject(Endpoints.class); - } -} diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/GlobalReachConnectionsDeleteMockTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/GlobalReachConnectionsDeleteMockTests.java deleted file mode 100644 index 48dfe4bb854bc..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/GlobalReachConnectionsDeleteMockTests.java +++ /dev/null @@ -1,61 +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.avs.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.avs.AvsManager; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class GlobalReachConnectionsDeleteMockTests { - @Test - public void testDelete() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = "{}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - AvsManager manager = - AvsManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager.globalReachConnections().delete("yj", "otp", "opv", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/HcxEnterpriseSitesDeleteWithResponseMockTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/HcxEnterpriseSitesDeleteWithResponseMockTests.java deleted file mode 100644 index c31f48132b983..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/HcxEnterpriseSitesDeleteWithResponseMockTests.java +++ /dev/null @@ -1,63 +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.avs.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.avs.AvsManager; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class HcxEnterpriseSitesDeleteWithResponseMockTests { - @Test - public void testDeleteWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = "{}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - AvsManager manager = - AvsManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager - .hcxEnterpriseSites() - .deleteWithResponse("vruzslzojhpctfnm", "xotngfdguge", "zihgrkyu", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/LocationsCheckQuotaAvailabilityWithResponseMockTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/LocationsCheckQuotaAvailabilityWithResponseMockTests.java deleted file mode 100644 index 45cff355f5d85..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/LocationsCheckQuotaAvailabilityWithResponseMockTests.java +++ /dev/null @@ -1,67 +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.avs.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.avs.AvsManager; -import com.azure.resourcemanager.avs.models.Quota; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class LocationsCheckQuotaAvailabilityWithResponseMockTests { - @Test - public void testCheckQuotaAvailabilityWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"hostsRemaining\":{\"cdmxzrpoaiml\":1513334542,\"iaaomylweazul\":871489167},\"quotaEnabled\":\"Disabled\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - AvsManager manager = - AvsManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - Quota response = - manager - .locations() - .checkQuotaAvailabilityWithResponse("lwtjjguktalh", com.azure.core.util.Context.NONE) - .getValue(); - } -} diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/LocationsCheckTrialAvailabilityWithResponseMockTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/LocationsCheckTrialAvailabilityWithResponseMockTests.java deleted file mode 100644 index 412dea20e53b1..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/LocationsCheckTrialAvailabilityWithResponseMockTests.java +++ /dev/null @@ -1,68 +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.avs.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.avs.AvsManager; -import com.azure.resourcemanager.avs.models.Sku; -import com.azure.resourcemanager.avs.models.Trial; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class LocationsCheckTrialAvailabilityWithResponseMockTests { - @Test - public void testCheckTrialAvailabilityWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = "{\"status\":\"TrialUsed\",\"availableHosts\":1819890486}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - AvsManager manager = - AvsManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - Trial response = - manager - .locations() - .checkTrialAvailabilityWithResponse( - "kozzwculkb", new Sku().withName("wpfaj"), com.azure.core.util.Context.NONE) - .getValue(); - } -} diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/LogSpecificationTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/LogSpecificationTests.java deleted file mode 100644 index 627904a89b017..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/LogSpecificationTests.java +++ /dev/null @@ -1,32 +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.avs.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.avs.models.LogSpecification; -import org.junit.jupiter.api.Assertions; - -public final class LogSpecificationTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - LogSpecification model = - BinaryData - .fromString("{\"name\":\"czvyifq\",\"displayName\":\"kdvjsll\",\"blobDuration\":\"vvdfwatkpnpul\"}") - .toObject(LogSpecification.class); - Assertions.assertEquals("czvyifq", model.name()); - Assertions.assertEquals("kdvjsll", model.displayName()); - Assertions.assertEquals("vvdfwatkpnpul", model.blobDuration()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - LogSpecification model = - new LogSpecification().withName("czvyifq").withDisplayName("kdvjsll").withBlobDuration("vvdfwatkpnpul"); - model = BinaryData.fromObject(model).toObject(LogSpecification.class); - Assertions.assertEquals("czvyifq", model.name()); - Assertions.assertEquals("kdvjsll", model.displayName()); - Assertions.assertEquals("vvdfwatkpnpul", model.blobDuration()); - } -} diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ManagementClusterTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ManagementClusterTests.java deleted file mode 100644 index 93df8df6a2756..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ManagementClusterTests.java +++ /dev/null @@ -1,32 +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.avs.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.avs.models.ManagementCluster; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class ManagementClusterTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ManagementCluster model = - BinaryData - .fromString( - "{\"clusterSize\":2068547199,\"provisioningState\":\"Updating\",\"clusterId\":767485321,\"hosts\":[\"iklbbovpl\"]}") - .toObject(ManagementCluster.class); - Assertions.assertEquals(2068547199, model.clusterSize()); - Assertions.assertEquals("iklbbovpl", model.hosts().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ManagementCluster model = - new ManagementCluster().withClusterSize(2068547199).withHosts(Arrays.asList("iklbbovpl")); - model = BinaryData.fromObject(model).toObject(ManagementCluster.class); - Assertions.assertEquals(2068547199, model.clusterSize()); - Assertions.assertEquals("iklbbovpl", model.hosts().get(0)); - } -} diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/MetricDimensionTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/MetricDimensionTests.java deleted file mode 100644 index 52f3643fe954b..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/MetricDimensionTests.java +++ /dev/null @@ -1,39 +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.avs.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.avs.models.MetricDimension; -import org.junit.jupiter.api.Assertions; - -public final class MetricDimensionTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - MetricDimension model = - BinaryData - .fromString( - "{\"name\":\"dwtiukbldngkp\",\"displayName\":\"ipazyxoegukgjnpi\",\"internalName\":\"gygev\",\"toBeExportedForShoebox\":true}") - .toObject(MetricDimension.class); - Assertions.assertEquals("dwtiukbldngkp", model.name()); - Assertions.assertEquals("ipazyxoegukgjnpi", model.displayName()); - Assertions.assertEquals("gygev", model.internalName()); - Assertions.assertEquals(true, model.toBeExportedForShoebox()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - MetricDimension model = - new MetricDimension() - .withName("dwtiukbldngkp") - .withDisplayName("ipazyxoegukgjnpi") - .withInternalName("gygev") - .withToBeExportedForShoebox(true); - model = BinaryData.fromObject(model).toObject(MetricDimension.class); - Assertions.assertEquals("dwtiukbldngkp", model.name()); - Assertions.assertEquals("ipazyxoegukgjnpi", model.displayName()); - Assertions.assertEquals("gygev", model.internalName()); - Assertions.assertEquals(true, model.toBeExportedForShoebox()); - } -} diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/MetricSpecificationTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/MetricSpecificationTests.java deleted file mode 100644 index 9218d4bc8c7bf..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/MetricSpecificationTests.java +++ /dev/null @@ -1,86 +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.avs.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.avs.models.MetricDimension; -import com.azure.resourcemanager.avs.models.MetricSpecification; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class MetricSpecificationTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - MetricSpecification model = - BinaryData - .fromString( - "{\"name\":\"xbczwtruwiqz\",\"displayName\":\"j\",\"displayDescription\":\"ovm\",\"unit\":\"kacspkw\",\"category\":\"zdobpxjmflbvvnch\",\"aggregationType\":\"cciw\",\"supportedAggregationTypes\":[\"uqkhrsajiwku\"],\"supportedTimeGrainTypes\":[\"skghsauuimj\"],\"fillGapWithZero\":true,\"dimensions\":[{\"name\":\"uugidyjrrfby\",\"displayName\":\"svexcsonpclhoco\",\"internalName\":\"lkevle\",\"toBeExportedForShoebox\":false},{\"name\":\"buhfmvfaxkffeiit\",\"displayName\":\"vmezy\",\"internalName\":\"hxmzsbbzoggig\",\"toBeExportedForShoebox\":true}],\"enableRegionalMdmAccount\":\"ur\",\"sourceMdmAccount\":\"xxjnspydptk\",\"sourceMdmNamespace\":\"nkoukn\"}") - .toObject(MetricSpecification.class); - Assertions.assertEquals("xbczwtruwiqz", model.name()); - Assertions.assertEquals("j", model.displayName()); - Assertions.assertEquals("ovm", model.displayDescription()); - Assertions.assertEquals("kacspkw", model.unit()); - Assertions.assertEquals("zdobpxjmflbvvnch", model.category()); - Assertions.assertEquals("cciw", model.aggregationType()); - Assertions.assertEquals("uqkhrsajiwku", model.supportedAggregationTypes().get(0)); - Assertions.assertEquals("skghsauuimj", model.supportedTimeGrainTypes().get(0)); - Assertions.assertEquals(true, model.fillGapWithZero()); - Assertions.assertEquals("uugidyjrrfby", model.dimensions().get(0).name()); - Assertions.assertEquals("svexcsonpclhoco", model.dimensions().get(0).displayName()); - Assertions.assertEquals("lkevle", model.dimensions().get(0).internalName()); - Assertions.assertEquals(false, model.dimensions().get(0).toBeExportedForShoebox()); - Assertions.assertEquals("ur", model.enableRegionalMdmAccount()); - Assertions.assertEquals("xxjnspydptk", model.sourceMdmAccount()); - Assertions.assertEquals("nkoukn", model.sourceMdmNamespace()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - MetricSpecification model = - new MetricSpecification() - .withName("xbczwtruwiqz") - .withDisplayName("j") - .withDisplayDescription("ovm") - .withUnit("kacspkw") - .withCategory("zdobpxjmflbvvnch") - .withAggregationType("cciw") - .withSupportedAggregationTypes(Arrays.asList("uqkhrsajiwku")) - .withSupportedTimeGrainTypes(Arrays.asList("skghsauuimj")) - .withFillGapWithZero(true) - .withDimensions( - Arrays - .asList( - new MetricDimension() - .withName("uugidyjrrfby") - .withDisplayName("svexcsonpclhoco") - .withInternalName("lkevle") - .withToBeExportedForShoebox(false), - new MetricDimension() - .withName("buhfmvfaxkffeiit") - .withDisplayName("vmezy") - .withInternalName("hxmzsbbzoggig") - .withToBeExportedForShoebox(true))) - .withEnableRegionalMdmAccount("ur") - .withSourceMdmAccount("xxjnspydptk") - .withSourceMdmNamespace("nkoukn"); - model = BinaryData.fromObject(model).toObject(MetricSpecification.class); - Assertions.assertEquals("xbczwtruwiqz", model.name()); - Assertions.assertEquals("j", model.displayName()); - Assertions.assertEquals("ovm", model.displayDescription()); - Assertions.assertEquals("kacspkw", model.unit()); - Assertions.assertEquals("zdobpxjmflbvvnch", model.category()); - Assertions.assertEquals("cciw", model.aggregationType()); - Assertions.assertEquals("uqkhrsajiwku", model.supportedAggregationTypes().get(0)); - Assertions.assertEquals("skghsauuimj", model.supportedTimeGrainTypes().get(0)); - Assertions.assertEquals(true, model.fillGapWithZero()); - Assertions.assertEquals("uugidyjrrfby", model.dimensions().get(0).name()); - Assertions.assertEquals("svexcsonpclhoco", model.dimensions().get(0).displayName()); - Assertions.assertEquals("lkevle", model.dimensions().get(0).internalName()); - Assertions.assertEquals(false, model.dimensions().get(0).toBeExportedForShoebox()); - Assertions.assertEquals("ur", model.enableRegionalMdmAccount()); - Assertions.assertEquals("xxjnspydptk", model.sourceMdmAccount()); - Assertions.assertEquals("nkoukn", model.sourceMdmNamespace()); - } -} diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/NetAppVolumeTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/NetAppVolumeTests.java deleted file mode 100644 index a4c4e86f981dc..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/NetAppVolumeTests.java +++ /dev/null @@ -1,24 +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.avs.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.avs.models.NetAppVolume; -import org.junit.jupiter.api.Assertions; - -public final class NetAppVolumeTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - NetAppVolume model = BinaryData.fromString("{\"id\":\"wpmqt\"}").toObject(NetAppVolume.class); - Assertions.assertEquals("wpmqt", model.id()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - NetAppVolume model = new NetAppVolume().withId("wpmqt"); - model = BinaryData.fromObject(model).toObject(NetAppVolume.class); - Assertions.assertEquals("wpmqt", model.id()); - } -} diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/OperationDisplayTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/OperationDisplayTests.java deleted file mode 100644 index 452519a7d3f6c..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/OperationDisplayTests.java +++ /dev/null @@ -1,25 +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.avs.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.avs.models.OperationDisplay; - -public final class OperationDisplayTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - OperationDisplay model = - BinaryData - .fromString( - "{\"provider\":\"evcciqihnhun\",\"resource\":\"wjzrnfygxgisp\",\"operation\":\"vtz\",\"description\":\"ufubl\"}") - .toObject(OperationDisplay.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - OperationDisplay model = new OperationDisplay(); - model = BinaryData.fromObject(model).toObject(OperationDisplay.class); - } -} diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/OperationInnerTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/OperationInnerTests.java deleted file mode 100644 index 8dd0e06d9cfe1..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/OperationInnerTests.java +++ /dev/null @@ -1,220 +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.avs.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.avs.fluent.models.OperationInner; -import com.azure.resourcemanager.avs.models.LogSpecification; -import com.azure.resourcemanager.avs.models.MetricDimension; -import com.azure.resourcemanager.avs.models.MetricSpecification; -import com.azure.resourcemanager.avs.models.OperationProperties; -import com.azure.resourcemanager.avs.models.ServiceSpecification; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class OperationInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - OperationInner model = - BinaryData - .fromString( - "{\"name\":\"kc\",\"display\":{\"provider\":\"arcryuanzwuxzdxt\",\"resource\":\"rlhm\",\"operation\":\"fp\",\"description\":\"qobmtukk\"},\"isDataAction\":false,\"origin\":\"tihfx\",\"properties\":{\"serviceSpecification\":{\"logSpecifications\":[{\"name\":\"vg\",\"displayName\":\"zsymglzufcyzkohd\",\"blobDuration\":\"hanufhfcbjysagi\"},{\"name\":\"xqhabi\",\"displayName\":\"ikxwc\",\"blobDuration\":\"yscnpqxu\"},{\"name\":\"vyq\",\"displayName\":\"wby\",\"blobDuration\":\"k\"},{\"name\":\"dumjgrtfwvuk\",\"displayName\":\"audccsnhs\",\"blobDuration\":\"nyejhkryhtnap\"}],\"metricSpecifications\":[{\"name\":\"okjye\",\"displayName\":\"kvnipjoxz\",\"displayDescription\":\"chgejspodm\",\"unit\":\"lzydehojwyahux\",\"category\":\"pmqnja\",\"aggregationType\":\"ixjsprozvcputeg\",\"supportedAggregationTypes\":[\"mfdatscmdvpj\",\"u\",\"suuv\",\"kjozkrwfnd\"],\"supportedTimeGrainTypes\":[\"jpslwejd\",\"vwryoqpso\"],\"fillGapWithZero\":true,\"dimensions\":[{},{}],\"enableRegionalMdmAccount\":\"akl\",\"sourceMdmAccount\":\"ahbc\",\"sourceMdmNamespace\":\"ffdfdosygexpa\"},{\"name\":\"akhmsbzjhcrz\",\"displayName\":\"dphlxaolt\",\"displayDescription\":\"trg\",\"unit\":\"bpf\",\"category\":\"s\",\"aggregationType\":\"zgvfcjrwz\",\"supportedAggregationTypes\":[\"j\",\"felluwfzitonpe\",\"fpjkjlxofp\",\"vhpfxxypininmay\"],\"supportedTimeGrainTypes\":[\"bbkpodep\"],\"fillGapWithZero\":true,\"dimensions\":[{},{},{}],\"enableRegionalMdmAccount\":\"vamih\",\"sourceMdmAccount\":\"gnarxzxtheo\",\"sourceMdmNamespace\":\"si\"}]}}}") - .toObject(OperationInner.class); - Assertions.assertEquals(false, model.isDataAction()); - Assertions.assertEquals("tihfx", model.origin()); - Assertions.assertEquals("vg", model.properties().serviceSpecification().logSpecifications().get(0).name()); - Assertions - .assertEquals( - "zsymglzufcyzkohd", model.properties().serviceSpecification().logSpecifications().get(0).displayName()); - Assertions - .assertEquals( - "hanufhfcbjysagi", model.properties().serviceSpecification().logSpecifications().get(0).blobDuration()); - Assertions - .assertEquals("okjye", model.properties().serviceSpecification().metricSpecifications().get(0).name()); - Assertions - .assertEquals( - "kvnipjoxz", model.properties().serviceSpecification().metricSpecifications().get(0).displayName()); - Assertions - .assertEquals( - "chgejspodm", - model.properties().serviceSpecification().metricSpecifications().get(0).displayDescription()); - Assertions - .assertEquals( - "lzydehojwyahux", model.properties().serviceSpecification().metricSpecifications().get(0).unit()); - Assertions - .assertEquals("pmqnja", model.properties().serviceSpecification().metricSpecifications().get(0).category()); - Assertions - .assertEquals( - "ixjsprozvcputeg", - model.properties().serviceSpecification().metricSpecifications().get(0).aggregationType()); - Assertions - .assertEquals( - "mfdatscmdvpj", - model - .properties() - .serviceSpecification() - .metricSpecifications() - .get(0) - .supportedAggregationTypes() - .get(0)); - Assertions - .assertEquals( - "jpslwejd", - model - .properties() - .serviceSpecification() - .metricSpecifications() - .get(0) - .supportedTimeGrainTypes() - .get(0)); - Assertions - .assertEquals( - true, model.properties().serviceSpecification().metricSpecifications().get(0).fillGapWithZero()); - Assertions - .assertEquals( - "akl", - model.properties().serviceSpecification().metricSpecifications().get(0).enableRegionalMdmAccount()); - Assertions - .assertEquals( - "ahbc", model.properties().serviceSpecification().metricSpecifications().get(0).sourceMdmAccount()); - Assertions - .assertEquals( - "ffdfdosygexpa", - model.properties().serviceSpecification().metricSpecifications().get(0).sourceMdmNamespace()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - OperationInner model = - new OperationInner() - .withIsDataAction(false) - .withOrigin("tihfx") - .withProperties( - new OperationProperties() - .withServiceSpecification( - new ServiceSpecification() - .withLogSpecifications( - Arrays - .asList( - new LogSpecification() - .withName("vg") - .withDisplayName("zsymglzufcyzkohd") - .withBlobDuration("hanufhfcbjysagi"), - new LogSpecification() - .withName("xqhabi") - .withDisplayName("ikxwc") - .withBlobDuration("yscnpqxu"), - new LogSpecification() - .withName("vyq") - .withDisplayName("wby") - .withBlobDuration("k"), - new LogSpecification() - .withName("dumjgrtfwvuk") - .withDisplayName("audccsnhs") - .withBlobDuration("nyejhkryhtnap"))) - .withMetricSpecifications( - Arrays - .asList( - new MetricSpecification() - .withName("okjye") - .withDisplayName("kvnipjoxz") - .withDisplayDescription("chgejspodm") - .withUnit("lzydehojwyahux") - .withCategory("pmqnja") - .withAggregationType("ixjsprozvcputeg") - .withSupportedAggregationTypes( - Arrays.asList("mfdatscmdvpj", "u", "suuv", "kjozkrwfnd")) - .withSupportedTimeGrainTypes(Arrays.asList("jpslwejd", "vwryoqpso")) - .withFillGapWithZero(true) - .withDimensions( - Arrays.asList(new MetricDimension(), new MetricDimension())) - .withEnableRegionalMdmAccount("akl") - .withSourceMdmAccount("ahbc") - .withSourceMdmNamespace("ffdfdosygexpa"), - new MetricSpecification() - .withName("akhmsbzjhcrz") - .withDisplayName("dphlxaolt") - .withDisplayDescription("trg") - .withUnit("bpf") - .withCategory("s") - .withAggregationType("zgvfcjrwz") - .withSupportedAggregationTypes( - Arrays - .asList("j", "felluwfzitonpe", "fpjkjlxofp", "vhpfxxypininmay")) - .withSupportedTimeGrainTypes(Arrays.asList("bbkpodep")) - .withFillGapWithZero(true) - .withDimensions( - Arrays - .asList( - new MetricDimension(), - new MetricDimension(), - new MetricDimension())) - .withEnableRegionalMdmAccount("vamih") - .withSourceMdmAccount("gnarxzxtheo") - .withSourceMdmNamespace("si"))))); - model = BinaryData.fromObject(model).toObject(OperationInner.class); - Assertions.assertEquals(false, model.isDataAction()); - Assertions.assertEquals("tihfx", model.origin()); - Assertions.assertEquals("vg", model.properties().serviceSpecification().logSpecifications().get(0).name()); - Assertions - .assertEquals( - "zsymglzufcyzkohd", model.properties().serviceSpecification().logSpecifications().get(0).displayName()); - Assertions - .assertEquals( - "hanufhfcbjysagi", model.properties().serviceSpecification().logSpecifications().get(0).blobDuration()); - Assertions - .assertEquals("okjye", model.properties().serviceSpecification().metricSpecifications().get(0).name()); - Assertions - .assertEquals( - "kvnipjoxz", model.properties().serviceSpecification().metricSpecifications().get(0).displayName()); - Assertions - .assertEquals( - "chgejspodm", - model.properties().serviceSpecification().metricSpecifications().get(0).displayDescription()); - Assertions - .assertEquals( - "lzydehojwyahux", model.properties().serviceSpecification().metricSpecifications().get(0).unit()); - Assertions - .assertEquals("pmqnja", model.properties().serviceSpecification().metricSpecifications().get(0).category()); - Assertions - .assertEquals( - "ixjsprozvcputeg", - model.properties().serviceSpecification().metricSpecifications().get(0).aggregationType()); - Assertions - .assertEquals( - "mfdatscmdvpj", - model - .properties() - .serviceSpecification() - .metricSpecifications() - .get(0) - .supportedAggregationTypes() - .get(0)); - Assertions - .assertEquals( - "jpslwejd", - model - .properties() - .serviceSpecification() - .metricSpecifications() - .get(0) - .supportedTimeGrainTypes() - .get(0)); - Assertions - .assertEquals( - true, model.properties().serviceSpecification().metricSpecifications().get(0).fillGapWithZero()); - Assertions - .assertEquals( - "akl", - model.properties().serviceSpecification().metricSpecifications().get(0).enableRegionalMdmAccount()); - Assertions - .assertEquals( - "ahbc", model.properties().serviceSpecification().metricSpecifications().get(0).sourceMdmAccount()); - Assertions - .assertEquals( - "ffdfdosygexpa", - model.properties().serviceSpecification().metricSpecifications().get(0).sourceMdmNamespace()); - } -} diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/OperationListTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/OperationListTests.java deleted file mode 100644 index b012628bc9eb9..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/OperationListTests.java +++ /dev/null @@ -1,25 +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.avs.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.avs.models.OperationList; - -public final class OperationListTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - OperationList model = - BinaryData - .fromString( - "{\"value\":[{\"name\":\"quvgjxpybczme\",\"display\":{\"provider\":\"zopbsphrupidgs\",\"resource\":\"bejhphoycmsxa\",\"operation\":\"hdxbmtqio\",\"description\":\"zehtbmu\"},\"isDataAction\":false,\"origin\":\"noi\",\"properties\":{\"serviceSpecification\":{\"logSpecifications\":[{},{}],\"metricSpecifications\":[{},{},{}]}}},{\"name\":\"qsoqijgkd\",\"display\":{\"provider\":\"azlobcufpdznrbt\",\"resource\":\"qjnqglhqgnufoooj\",\"operation\":\"ifsqesaagdfmg\",\"description\":\"lhjxr\"},\"isDataAction\":false,\"origin\":\"mrvktsizntoc\",\"properties\":{\"serviceSpecification\":{\"logSpecifications\":[{},{}],\"metricSpecifications\":[{}]}}},{\"name\":\"s\",\"display\":{\"provider\":\"mpoyfd\",\"resource\":\"ogknygjofjdd\",\"operation\":\"s\",\"description\":\"eupewnwreitjz\"},\"isDataAction\":false,\"origin\":\"sarhmofc\",\"properties\":{\"serviceSpecification\":{\"logSpecifications\":[{},{},{},{}],\"metricSpecifications\":[{},{}]}}}],\"nextLink\":\"dtmlxhekuksjt\"}") - .toObject(OperationList.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - OperationList model = new OperationList(); - model = BinaryData.fromObject(model).toObject(OperationList.class); - } -} diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/OperationPropertiesTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/OperationPropertiesTests.java deleted file mode 100644 index afd6801f5775a..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/OperationPropertiesTests.java +++ /dev/null @@ -1,208 +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.avs.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.avs.models.LogSpecification; -import com.azure.resourcemanager.avs.models.MetricDimension; -import com.azure.resourcemanager.avs.models.MetricSpecification; -import com.azure.resourcemanager.avs.models.OperationProperties; -import com.azure.resourcemanager.avs.models.ServiceSpecification; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class OperationPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - OperationProperties model = - BinaryData - .fromString( - "{\"serviceSpecification\":{\"logSpecifications\":[{\"name\":\"eofjaeqjh\",\"displayName\":\"b\",\"blobDuration\":\"v\"},{\"name\":\"mjqulngsn\",\"displayName\":\"bybkzgcwrwclxx\",\"blobDuration\":\"ljdousk\"},{\"name\":\"vkocrcjdkwtn\",\"displayName\":\"bnjbiksqrglssain\",\"blobDuration\":\"jwnzlljfmp\"},{\"name\":\"ebvmgxsabkyqd\",\"displayName\":\"jitcjczdzevn\",\"blobDuration\":\"krwpdap\"}],\"metricSpecifications\":[{\"name\":\"dkvwrwjfe\",\"displayName\":\"nhutjeltmrldhugj\",\"displayDescription\":\"datqxhocdgeabl\",\"unit\":\"huticndvkao\",\"category\":\"yiftyhxhuro\",\"aggregationType\":\"tyxolniwpwc\",\"supportedAggregationTypes\":[\"fkgiawxk\",\"ryplwckbasyypn\",\"dhsgcba\"],\"supportedTimeGrainTypes\":[\"ejk\",\"tynqgoul\",\"ndlik\"],\"fillGapWithZero\":true,\"dimensions\":[{\"name\":\"gibma\",\"displayName\":\"akeqs\",\"internalName\":\"yb\",\"toBeExportedForShoebox\":true},{\"name\":\"dqytbciqfouflmm\",\"displayName\":\"zsm\",\"internalName\":\"mglougpbkw\",\"toBeExportedForShoebox\":true}],\"enableRegionalMdmAccount\":\"duqkt\",\"sourceMdmAccount\":\"spwgcuertumkdosv\",\"sourceMdmNamespace\":\"hbmdgbbjfdd\"},{\"name\":\"bmbexppbhtqqro\",\"displayName\":\"p\",\"displayDescription\":\"s\",\"unit\":\"gbquxigj\",\"category\":\"gzjaoyfhrtxilne\",\"aggregationType\":\"ujysvle\",\"supportedAggregationTypes\":[\"fqawrlyxw\",\"kcprbnw\",\"xgjvtbv\",\"ysszdnrujqguh\"],\"supportedTimeGrainTypes\":[\"uqfprwzw\",\"nguitnwuizgazxu\"],\"fillGapWithZero\":false,\"dimensions\":[{\"name\":\"y\",\"displayName\":\"hr\",\"internalName\":\"dfvzwdzuhty\",\"toBeExportedForShoebox\":true},{\"name\":\"dkfthwxmnt\",\"displayName\":\"waopvkmijcmmxd\",\"internalName\":\"fufsrpymzi\",\"toBeExportedForShoebox\":false}],\"enableRegionalMdmAccount\":\"zcxtbzsgfyccsn\",\"sourceMdmAccount\":\"mdwzjeiachboo\",\"sourceMdmNamespace\":\"lnrosfqp\"}]}}") - .toObject(OperationProperties.class); - Assertions.assertEquals("eofjaeqjh", model.serviceSpecification().logSpecifications().get(0).name()); - Assertions.assertEquals("b", model.serviceSpecification().logSpecifications().get(0).displayName()); - Assertions.assertEquals("v", model.serviceSpecification().logSpecifications().get(0).blobDuration()); - Assertions.assertEquals("dkvwrwjfe", model.serviceSpecification().metricSpecifications().get(0).name()); - Assertions - .assertEquals("nhutjeltmrldhugj", model.serviceSpecification().metricSpecifications().get(0).displayName()); - Assertions - .assertEquals( - "datqxhocdgeabl", model.serviceSpecification().metricSpecifications().get(0).displayDescription()); - Assertions.assertEquals("huticndvkao", model.serviceSpecification().metricSpecifications().get(0).unit()); - Assertions.assertEquals("yiftyhxhuro", model.serviceSpecification().metricSpecifications().get(0).category()); - Assertions - .assertEquals("tyxolniwpwc", model.serviceSpecification().metricSpecifications().get(0).aggregationType()); - Assertions - .assertEquals( - "fkgiawxk", - model.serviceSpecification().metricSpecifications().get(0).supportedAggregationTypes().get(0)); - Assertions - .assertEquals( - "ejk", model.serviceSpecification().metricSpecifications().get(0).supportedTimeGrainTypes().get(0)); - Assertions.assertEquals(true, model.serviceSpecification().metricSpecifications().get(0).fillGapWithZero()); - Assertions - .assertEquals( - "gibma", model.serviceSpecification().metricSpecifications().get(0).dimensions().get(0).name()); - Assertions - .assertEquals( - "akeqs", model.serviceSpecification().metricSpecifications().get(0).dimensions().get(0).displayName()); - Assertions - .assertEquals( - "yb", model.serviceSpecification().metricSpecifications().get(0).dimensions().get(0).internalName()); - Assertions - .assertEquals( - true, - model - .serviceSpecification() - .metricSpecifications() - .get(0) - .dimensions() - .get(0) - .toBeExportedForShoebox()); - Assertions - .assertEquals( - "duqkt", model.serviceSpecification().metricSpecifications().get(0).enableRegionalMdmAccount()); - Assertions - .assertEquals( - "spwgcuertumkdosv", model.serviceSpecification().metricSpecifications().get(0).sourceMdmAccount()); - Assertions - .assertEquals( - "hbmdgbbjfdd", model.serviceSpecification().metricSpecifications().get(0).sourceMdmNamespace()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - OperationProperties model = - new OperationProperties() - .withServiceSpecification( - new ServiceSpecification() - .withLogSpecifications( - Arrays - .asList( - new LogSpecification() - .withName("eofjaeqjh") - .withDisplayName("b") - .withBlobDuration("v"), - new LogSpecification() - .withName("mjqulngsn") - .withDisplayName("bybkzgcwrwclxx") - .withBlobDuration("ljdousk"), - new LogSpecification() - .withName("vkocrcjdkwtn") - .withDisplayName("bnjbiksqrglssain") - .withBlobDuration("jwnzlljfmp"), - new LogSpecification() - .withName("ebvmgxsabkyqd") - .withDisplayName("jitcjczdzevn") - .withBlobDuration("krwpdap"))) - .withMetricSpecifications( - Arrays - .asList( - new MetricSpecification() - .withName("dkvwrwjfe") - .withDisplayName("nhutjeltmrldhugj") - .withDisplayDescription("datqxhocdgeabl") - .withUnit("huticndvkao") - .withCategory("yiftyhxhuro") - .withAggregationType("tyxolniwpwc") - .withSupportedAggregationTypes( - Arrays.asList("fkgiawxk", "ryplwckbasyypn", "dhsgcba")) - .withSupportedTimeGrainTypes(Arrays.asList("ejk", "tynqgoul", "ndlik")) - .withFillGapWithZero(true) - .withDimensions( - Arrays - .asList( - new MetricDimension() - .withName("gibma") - .withDisplayName("akeqs") - .withInternalName("yb") - .withToBeExportedForShoebox(true), - new MetricDimension() - .withName("dqytbciqfouflmm") - .withDisplayName("zsm") - .withInternalName("mglougpbkw") - .withToBeExportedForShoebox(true))) - .withEnableRegionalMdmAccount("duqkt") - .withSourceMdmAccount("spwgcuertumkdosv") - .withSourceMdmNamespace("hbmdgbbjfdd"), - new MetricSpecification() - .withName("bmbexppbhtqqro") - .withDisplayName("p") - .withDisplayDescription("s") - .withUnit("gbquxigj") - .withCategory("gzjaoyfhrtxilne") - .withAggregationType("ujysvle") - .withSupportedAggregationTypes( - Arrays.asList("fqawrlyxw", "kcprbnw", "xgjvtbv", "ysszdnrujqguh")) - .withSupportedTimeGrainTypes(Arrays.asList("uqfprwzw", "nguitnwuizgazxu")) - .withFillGapWithZero(false) - .withDimensions( - Arrays - .asList( - new MetricDimension() - .withName("y") - .withDisplayName("hr") - .withInternalName("dfvzwdzuhty") - .withToBeExportedForShoebox(true), - new MetricDimension() - .withName("dkfthwxmnt") - .withDisplayName("waopvkmijcmmxd") - .withInternalName("fufsrpymzi") - .withToBeExportedForShoebox(false))) - .withEnableRegionalMdmAccount("zcxtbzsgfyccsn") - .withSourceMdmAccount("mdwzjeiachboo") - .withSourceMdmNamespace("lnrosfqp")))); - model = BinaryData.fromObject(model).toObject(OperationProperties.class); - Assertions.assertEquals("eofjaeqjh", model.serviceSpecification().logSpecifications().get(0).name()); - Assertions.assertEquals("b", model.serviceSpecification().logSpecifications().get(0).displayName()); - Assertions.assertEquals("v", model.serviceSpecification().logSpecifications().get(0).blobDuration()); - Assertions.assertEquals("dkvwrwjfe", model.serviceSpecification().metricSpecifications().get(0).name()); - Assertions - .assertEquals("nhutjeltmrldhugj", model.serviceSpecification().metricSpecifications().get(0).displayName()); - Assertions - .assertEquals( - "datqxhocdgeabl", model.serviceSpecification().metricSpecifications().get(0).displayDescription()); - Assertions.assertEquals("huticndvkao", model.serviceSpecification().metricSpecifications().get(0).unit()); - Assertions.assertEquals("yiftyhxhuro", model.serviceSpecification().metricSpecifications().get(0).category()); - Assertions - .assertEquals("tyxolniwpwc", model.serviceSpecification().metricSpecifications().get(0).aggregationType()); - Assertions - .assertEquals( - "fkgiawxk", - model.serviceSpecification().metricSpecifications().get(0).supportedAggregationTypes().get(0)); - Assertions - .assertEquals( - "ejk", model.serviceSpecification().metricSpecifications().get(0).supportedTimeGrainTypes().get(0)); - Assertions.assertEquals(true, model.serviceSpecification().metricSpecifications().get(0).fillGapWithZero()); - Assertions - .assertEquals( - "gibma", model.serviceSpecification().metricSpecifications().get(0).dimensions().get(0).name()); - Assertions - .assertEquals( - "akeqs", model.serviceSpecification().metricSpecifications().get(0).dimensions().get(0).displayName()); - Assertions - .assertEquals( - "yb", model.serviceSpecification().metricSpecifications().get(0).dimensions().get(0).internalName()); - Assertions - .assertEquals( - true, - model - .serviceSpecification() - .metricSpecifications() - .get(0) - .dimensions() - .get(0) - .toBeExportedForShoebox()); - Assertions - .assertEquals( - "duqkt", model.serviceSpecification().metricSpecifications().get(0).enableRegionalMdmAccount()); - Assertions - .assertEquals( - "spwgcuertumkdosv", model.serviceSpecification().metricSpecifications().get(0).sourceMdmAccount()); - Assertions - .assertEquals( - "hbmdgbbjfdd", model.serviceSpecification().metricSpecifications().get(0).sourceMdmNamespace()); - } -} diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/OperationsListMockTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/OperationsListMockTests.java deleted file mode 100644 index c42a96edfe5c1..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/OperationsListMockTests.java +++ /dev/null @@ -1,214 +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.avs.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.avs.AvsManager; -import com.azure.resourcemanager.avs.models.Operation; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class OperationsListMockTests { - @Test - public void testList() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"value\":[{\"name\":\"isofieypefojyqd\",\"display\":{\"provider\":\"plcplcwkhi\",\"resource\":\"hlhzdsqtzbsrgno\",\"operation\":\"jhf\",\"description\":\"vecactx\"},\"isDataAction\":false,\"origin\":\"e\",\"properties\":{\"serviceSpecification\":{\"logSpecifications\":[{\"name\":\"qovekqvgqou\",\"displayName\":\"fzmpjwyivq\",\"blobDuration\":\"f\"},{\"name\":\"vhrfsphuagrt\",\"displayName\":\"kteusqczk\",\"blobDuration\":\"klxubyja\"},{\"name\":\"mmfblcqcuubgqib\",\"displayName\":\"a\",\"blobDuration\":\"etttwgdslqxihhr\"}],\"metricSpecifications\":[{\"name\":\"z\",\"displayName\":\"eypxiutcxapzhyr\",\"displayDescription\":\"togebjoxsl\",\"unit\":\"nhl\",\"category\":\"rqnkkzjcjbtr\",\"aggregationType\":\"ehvvib\",\"supportedAggregationTypes\":[\"jsto\"],\"supportedTimeGrainTypes\":[\"it\",\"kxzt\",\"oobklftidgfcwq\"],\"fillGapWithZero\":false,\"dimensions\":[{},{},{}],\"enableRegionalMdmAccount\":\"xzhemjyh\",\"sourceMdmAccount\":\"uj\",\"sourceMdmNamespace\":\"t\"}]}}}]}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - AvsManager manager = - AvsManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = manager.operations().list(com.azure.core.util.Context.NONE); - - Assertions.assertEquals(false, response.iterator().next().isDataAction()); - Assertions.assertEquals("e", response.iterator().next().origin()); - Assertions - .assertEquals( - "qovekqvgqou", - response.iterator().next().properties().serviceSpecification().logSpecifications().get(0).name()); - Assertions - .assertEquals( - "fzmpjwyivq", - response - .iterator() - .next() - .properties() - .serviceSpecification() - .logSpecifications() - .get(0) - .displayName()); - Assertions - .assertEquals( - "f", - response - .iterator() - .next() - .properties() - .serviceSpecification() - .logSpecifications() - .get(0) - .blobDuration()); - Assertions - .assertEquals( - "z", - response.iterator().next().properties().serviceSpecification().metricSpecifications().get(0).name()); - Assertions - .assertEquals( - "eypxiutcxapzhyr", - response - .iterator() - .next() - .properties() - .serviceSpecification() - .metricSpecifications() - .get(0) - .displayName()); - Assertions - .assertEquals( - "togebjoxsl", - response - .iterator() - .next() - .properties() - .serviceSpecification() - .metricSpecifications() - .get(0) - .displayDescription()); - Assertions - .assertEquals( - "nhl", - response.iterator().next().properties().serviceSpecification().metricSpecifications().get(0).unit()); - Assertions - .assertEquals( - "rqnkkzjcjbtr", - response - .iterator() - .next() - .properties() - .serviceSpecification() - .metricSpecifications() - .get(0) - .category()); - Assertions - .assertEquals( - "ehvvib", - response - .iterator() - .next() - .properties() - .serviceSpecification() - .metricSpecifications() - .get(0) - .aggregationType()); - Assertions - .assertEquals( - "jsto", - response - .iterator() - .next() - .properties() - .serviceSpecification() - .metricSpecifications() - .get(0) - .supportedAggregationTypes() - .get(0)); - Assertions - .assertEquals( - "it", - response - .iterator() - .next() - .properties() - .serviceSpecification() - .metricSpecifications() - .get(0) - .supportedTimeGrainTypes() - .get(0)); - Assertions - .assertEquals( - false, - response - .iterator() - .next() - .properties() - .serviceSpecification() - .metricSpecifications() - .get(0) - .fillGapWithZero()); - Assertions - .assertEquals( - "xzhemjyh", - response - .iterator() - .next() - .properties() - .serviceSpecification() - .metricSpecifications() - .get(0) - .enableRegionalMdmAccount()); - Assertions - .assertEquals( - "uj", - response - .iterator() - .next() - .properties() - .serviceSpecification() - .metricSpecifications() - .get(0) - .sourceMdmAccount()); - Assertions - .assertEquals( - "t", - response - .iterator() - .next() - .properties() - .serviceSpecification() - .metricSpecifications() - .get(0) - .sourceMdmNamespace()); - } -} diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/PlacementPoliciesCreateOrUpdateMockTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/PlacementPoliciesCreateOrUpdateMockTests.java deleted file mode 100644 index cd520a39d5794..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/PlacementPoliciesCreateOrUpdateMockTests.java +++ /dev/null @@ -1,78 +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.avs.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.avs.AvsManager; -import com.azure.resourcemanager.avs.models.PlacementPolicy; -import com.azure.resourcemanager.avs.models.PlacementPolicyProperties; -import com.azure.resourcemanager.avs.models.PlacementPolicyState; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class PlacementPoliciesCreateOrUpdateMockTests { - @Test - public void testCreateOrUpdate() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"properties\":{\"type\":\"PlacementPolicyProperties\",\"state\":\"Enabled\",\"displayName\":\"ggsvoujkxibdaf\",\"provisioningState\":\"Succeeded\"},\"id\":\"mdyomkxfbvfbh\",\"name\":\"y\",\"type\":\"rhpw\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - AvsManager manager = - AvsManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PlacementPolicy response = - manager - .placementPolicies() - .define("a") - .withExistingCluster("wwsko", "dcbrwimuvq", "josovyrrl") - .withProperties( - new PlacementPolicyProperties() - .withState(PlacementPolicyState.ENABLED) - .withDisplayName("qtljqobbpihehc")) - .create(); - - Assertions.assertEquals(PlacementPolicyState.ENABLED, response.properties().state()); - Assertions.assertEquals("ggsvoujkxibdaf", response.properties().displayName()); - } -} diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/PlacementPoliciesDeleteMockTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/PlacementPoliciesDeleteMockTests.java deleted file mode 100644 index acad00272c22f..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/PlacementPoliciesDeleteMockTests.java +++ /dev/null @@ -1,63 +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.avs.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.avs.AvsManager; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class PlacementPoliciesDeleteMockTests { - @Test - public void testDelete() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = "{}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - AvsManager manager = - AvsManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager - .placementPolicies() - .delete("skw", "qjjyslurl", "shhkvpedw", "slsrhmpq", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/PlacementPoliciesGetWithResponseMockTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/PlacementPoliciesGetWithResponseMockTests.java deleted file mode 100644 index 5b55547ff9cef..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/PlacementPoliciesGetWithResponseMockTests.java +++ /dev/null @@ -1,72 +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.avs.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.avs.AvsManager; -import com.azure.resourcemanager.avs.models.PlacementPolicy; -import com.azure.resourcemanager.avs.models.PlacementPolicyState; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class PlacementPoliciesGetWithResponseMockTests { - @Test - public void testGetWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"properties\":{\"type\":\"PlacementPolicyProperties\",\"state\":\"Disabled\",\"displayName\":\"xcdglj\",\"provisioningState\":\"Deleting\"},\"id\":\"euachtomfl\",\"name\":\"ytswfp\",\"type\":\"mdgycxn\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - AvsManager manager = - AvsManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PlacementPolicy response = - manager - .placementPolicies() - .getWithResponse("mzegjon", "hj", "rwgdnqzbrfks", "zhzmtksjci", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals(PlacementPolicyState.DISABLED, response.properties().state()); - Assertions.assertEquals("xcdglj", response.properties().displayName()); - } -} diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/PlacementPoliciesListMockTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/PlacementPoliciesListMockTests.java deleted file mode 100644 index b54220da09447..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/PlacementPoliciesListMockTests.java +++ /dev/null @@ -1,72 +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.avs.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.avs.AvsManager; -import com.azure.resourcemanager.avs.models.PlacementPolicy; -import com.azure.resourcemanager.avs.models.PlacementPolicyState; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class PlacementPoliciesListMockTests { - @Test - public void testList() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"value\":[{\"properties\":{\"type\":\"PlacementPolicyProperties\",\"state\":\"Enabled\",\"displayName\":\"gydlhqv\",\"provisioningState\":\"Canceled\"},\"id\":\"pxy\",\"name\":\"afiqgeaarbgjekg\",\"type\":\"klbyulidwcw\"}]}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - AvsManager manager = - AvsManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = - manager - .placementPolicies() - .list("rupdwvnphcnzq", "pjhmqrhvthl", "iwdcxsmlzzhzd", com.azure.core.util.Context.NONE); - - Assertions.assertEquals(PlacementPolicyState.ENABLED, response.iterator().next().properties().state()); - Assertions.assertEquals("gydlhqv", response.iterator().next().properties().displayName()); - } -} diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/PlacementPoliciesListTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/PlacementPoliciesListTests.java deleted file mode 100644 index c0230e34f3530..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/PlacementPoliciesListTests.java +++ /dev/null @@ -1,25 +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.avs.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.avs.models.PlacementPoliciesList; - -public final class PlacementPoliciesListTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - PlacementPoliciesList model = - BinaryData - .fromString( - "{\"value\":[{\"properties\":{\"type\":\"PlacementPolicyProperties\",\"state\":\"Disabled\",\"displayName\":\"umwctondz\",\"provisioningState\":\"Canceled\"},\"id\":\"udfdlwgg\",\"name\":\"tsbwtovvtgse\",\"type\":\"nqfiufxqknpi\"},{\"properties\":{\"type\":\"PlacementPolicyProperties\",\"state\":\"Disabled\",\"displayName\":\"ttwqmsni\",\"provisioningState\":\"Deleting\"},\"id\":\"dmqnrojlpij\",\"name\":\"k\",\"type\":\"xfrdd\"}],\"nextLink\":\"ratiz\"}") - .toObject(PlacementPoliciesList.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - PlacementPoliciesList model = new PlacementPoliciesList(); - model = BinaryData.fromObject(model).toObject(PlacementPoliciesList.class); - } -} diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/PlacementPolicyInnerTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/PlacementPolicyInnerTests.java deleted file mode 100644 index b83104b6eca04..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/PlacementPolicyInnerTests.java +++ /dev/null @@ -1,37 +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.avs.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.avs.fluent.models.PlacementPolicyInner; -import com.azure.resourcemanager.avs.models.PlacementPolicyProperties; -import com.azure.resourcemanager.avs.models.PlacementPolicyState; -import org.junit.jupiter.api.Assertions; - -public final class PlacementPolicyInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - PlacementPolicyInner model = - BinaryData - .fromString( - "{\"properties\":{\"type\":\"PlacementPolicyProperties\",\"state\":\"Enabled\",\"displayName\":\"sxiftozq\",\"provisioningState\":\"Canceled\"},\"id\":\"f\",\"name\":\"wesgogczh\",\"type\":\"nnxk\"}") - .toObject(PlacementPolicyInner.class); - Assertions.assertEquals(PlacementPolicyState.ENABLED, model.properties().state()); - Assertions.assertEquals("sxiftozq", model.properties().displayName()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - PlacementPolicyInner model = - new PlacementPolicyInner() - .withProperties( - new PlacementPolicyProperties() - .withState(PlacementPolicyState.ENABLED) - .withDisplayName("sxiftozq")); - model = BinaryData.fromObject(model).toObject(PlacementPolicyInner.class); - Assertions.assertEquals(PlacementPolicyState.ENABLED, model.properties().state()); - Assertions.assertEquals("sxiftozq", model.properties().displayName()); - } -} diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/PlacementPolicyPropertiesTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/PlacementPolicyPropertiesTests.java deleted file mode 100644 index 4411175939819..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/PlacementPolicyPropertiesTests.java +++ /dev/null @@ -1,32 +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.avs.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.avs.models.PlacementPolicyProperties; -import com.azure.resourcemanager.avs.models.PlacementPolicyState; -import org.junit.jupiter.api.Assertions; - -public final class PlacementPolicyPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - PlacementPolicyProperties model = - BinaryData - .fromString( - "{\"type\":\"PlacementPolicyProperties\",\"state\":\"Disabled\",\"displayName\":\"yhmossxkkg\",\"provisioningState\":\"Failed\"}") - .toObject(PlacementPolicyProperties.class); - Assertions.assertEquals(PlacementPolicyState.DISABLED, model.state()); - Assertions.assertEquals("yhmossxkkg", model.displayName()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - PlacementPolicyProperties model = - new PlacementPolicyProperties().withState(PlacementPolicyState.DISABLED).withDisplayName("yhmossxkkg"); - model = BinaryData.fromObject(model).toObject(PlacementPolicyProperties.class); - Assertions.assertEquals(PlacementPolicyState.DISABLED, model.state()); - Assertions.assertEquals("yhmossxkkg", model.displayName()); - } -} diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/PlacementPolicyUpdatePropertiesTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/PlacementPolicyUpdatePropertiesTests.java deleted file mode 100644 index 399de323d8fc3..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/PlacementPolicyUpdatePropertiesTests.java +++ /dev/null @@ -1,46 +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.avs.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.avs.fluent.models.PlacementPolicyUpdateProperties; -import com.azure.resourcemanager.avs.models.AffinityStrength; -import com.azure.resourcemanager.avs.models.AzureHybridBenefitType; -import com.azure.resourcemanager.avs.models.PlacementPolicyState; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class PlacementPolicyUpdatePropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - PlacementPolicyUpdateProperties model = - BinaryData - .fromString( - "{\"state\":\"Enabled\",\"vmMembers\":[\"sewgioilqukr\"],\"hostMembers\":[\"tqmieox\",\"rgguf\",\"yaomtb\"],\"affinityStrength\":\"Should\",\"azureHybridBenefitType\":\"SqlHost\"}") - .toObject(PlacementPolicyUpdateProperties.class); - Assertions.assertEquals(PlacementPolicyState.ENABLED, model.state()); - Assertions.assertEquals("sewgioilqukr", model.vmMembers().get(0)); - Assertions.assertEquals("tqmieox", model.hostMembers().get(0)); - Assertions.assertEquals(AffinityStrength.SHOULD, model.affinityStrength()); - Assertions.assertEquals(AzureHybridBenefitType.SQL_HOST, model.azureHybridBenefitType()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - PlacementPolicyUpdateProperties model = - new PlacementPolicyUpdateProperties() - .withState(PlacementPolicyState.ENABLED) - .withVmMembers(Arrays.asList("sewgioilqukr")) - .withHostMembers(Arrays.asList("tqmieox", "rgguf", "yaomtb")) - .withAffinityStrength(AffinityStrength.SHOULD) - .withAzureHybridBenefitType(AzureHybridBenefitType.SQL_HOST); - model = BinaryData.fromObject(model).toObject(PlacementPolicyUpdateProperties.class); - Assertions.assertEquals(PlacementPolicyState.ENABLED, model.state()); - Assertions.assertEquals("sewgioilqukr", model.vmMembers().get(0)); - Assertions.assertEquals("tqmieox", model.hostMembers().get(0)); - Assertions.assertEquals(AffinityStrength.SHOULD, model.affinityStrength()); - Assertions.assertEquals(AzureHybridBenefitType.SQL_HOST, model.azureHybridBenefitType()); - } -} diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/PlacementPolicyUpdateTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/PlacementPolicyUpdateTests.java deleted file mode 100644 index b011e0ff2c9e4..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/PlacementPolicyUpdateTests.java +++ /dev/null @@ -1,46 +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.avs.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.avs.models.AffinityStrength; -import com.azure.resourcemanager.avs.models.AzureHybridBenefitType; -import com.azure.resourcemanager.avs.models.PlacementPolicyState; -import com.azure.resourcemanager.avs.models.PlacementPolicyUpdate; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class PlacementPolicyUpdateTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - PlacementPolicyUpdate model = - BinaryData - .fromString( - "{\"properties\":{\"state\":\"Disabled\",\"vmMembers\":[\"bdhqxvcxgf\",\"pdso\"],\"hostMembers\":[\"hrnsvbu\",\"wdvzyy\",\"ycnunvjsrtk\",\"awnopqgikyzirtxd\"],\"affinityStrength\":\"Should\",\"azureHybridBenefitType\":\"SqlHost\"}}") - .toObject(PlacementPolicyUpdate.class); - Assertions.assertEquals(PlacementPolicyState.DISABLED, model.state()); - Assertions.assertEquals("bdhqxvcxgf", model.vmMembers().get(0)); - Assertions.assertEquals("hrnsvbu", model.hostMembers().get(0)); - Assertions.assertEquals(AffinityStrength.SHOULD, model.affinityStrength()); - Assertions.assertEquals(AzureHybridBenefitType.SQL_HOST, model.azureHybridBenefitType()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - PlacementPolicyUpdate model = - new PlacementPolicyUpdate() - .withState(PlacementPolicyState.DISABLED) - .withVmMembers(Arrays.asList("bdhqxvcxgf", "pdso")) - .withHostMembers(Arrays.asList("hrnsvbu", "wdvzyy", "ycnunvjsrtk", "awnopqgikyzirtxd")) - .withAffinityStrength(AffinityStrength.SHOULD) - .withAzureHybridBenefitType(AzureHybridBenefitType.SQL_HOST); - model = BinaryData.fromObject(model).toObject(PlacementPolicyUpdate.class); - Assertions.assertEquals(PlacementPolicyState.DISABLED, model.state()); - Assertions.assertEquals("bdhqxvcxgf", model.vmMembers().get(0)); - Assertions.assertEquals("hrnsvbu", model.hostMembers().get(0)); - Assertions.assertEquals(AffinityStrength.SHOULD, model.affinityStrength()); - Assertions.assertEquals(AzureHybridBenefitType.SQL_HOST, model.azureHybridBenefitType()); - } -} diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/PrivateCloudIdentityTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/PrivateCloudIdentityTests.java deleted file mode 100644 index 0b3a3f8350ca7..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/PrivateCloudIdentityTests.java +++ /dev/null @@ -1,28 +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.avs.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.avs.models.PrivateCloudIdentity; -import com.azure.resourcemanager.avs.models.ResourceIdentityType; -import org.junit.jupiter.api.Assertions; - -public final class PrivateCloudIdentityTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - PrivateCloudIdentity model = - BinaryData - .fromString("{\"principalId\":\"micykvceoveilo\",\"tenantId\":\"oty\",\"type\":\"SystemAssigned\"}") - .toObject(PrivateCloudIdentity.class); - Assertions.assertEquals(ResourceIdentityType.SYSTEM_ASSIGNED, model.type()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - PrivateCloudIdentity model = new PrivateCloudIdentity().withType(ResourceIdentityType.SYSTEM_ASSIGNED); - model = BinaryData.fromObject(model).toObject(PrivateCloudIdentity.class); - Assertions.assertEquals(ResourceIdentityType.SYSTEM_ASSIGNED, model.type()); - } -} diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/PrivateCloudsDeleteMockTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/PrivateCloudsDeleteMockTests.java deleted file mode 100644 index 148d7c9e30584..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/PrivateCloudsDeleteMockTests.java +++ /dev/null @@ -1,61 +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.avs.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.avs.AvsManager; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class PrivateCloudsDeleteMockTests { - @Test - public void testDelete() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = "{}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - AvsManager manager = - AvsManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager.privateClouds().delete("vbkbxgomf", "juwasqvdaeyyguxa", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/QuotaInnerTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/QuotaInnerTests.java deleted file mode 100644 index 51391084fa116..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/QuotaInnerTests.java +++ /dev/null @@ -1,25 +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.avs.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.avs.fluent.models.QuotaInner; - -public final class QuotaInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - QuotaInner model = - BinaryData - .fromString( - "{\"hostsRemaining\":{\"de\":229483686,\"jzicwifsjt\":856772857},\"quotaEnabled\":\"Disabled\"}") - .toObject(QuotaInner.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - QuotaInner model = new QuotaInner(); - model = BinaryData.fromObject(model).toObject(QuotaInner.class); - } -} diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ScriptCmdletInnerTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ScriptCmdletInnerTests.java deleted file mode 100644 index 59848430cdc17..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ScriptCmdletInnerTests.java +++ /dev/null @@ -1,25 +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.avs.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.avs.fluent.models.ScriptCmdletInner; - -public final class ScriptCmdletInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ScriptCmdletInner model = - BinaryData - .fromString( - "{\"properties\":{\"description\":\"eydbsd\",\"timeout\":\"m\",\"parameters\":[{\"type\":\"Credential\",\"name\":\"vbbxuripl\",\"description\":\"n\",\"visibility\":\"Visible\",\"optional\":\"Optional\"},{\"type\":\"Bool\",\"name\":\"ywrckp\",\"description\":\"lyhpluodpvruud\",\"visibility\":\"Visible\",\"optional\":\"Optional\"},{\"type\":\"SecureString\",\"name\":\"stgktst\",\"description\":\"xeclzedqbcvhzlhp\",\"visibility\":\"Hidden\",\"optional\":\"Optional\"}]},\"id\":\"dlwwqfbumlkxt\",\"name\":\"qjfsmlmbtxhw\",\"type\":\"fwsrtawcoezbrhu\"}") - .toObject(ScriptCmdletInner.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ScriptCmdletInner model = new ScriptCmdletInner(); - model = BinaryData.fromObject(model).toObject(ScriptCmdletInner.class); - } -} diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ScriptCmdletPropertiesTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ScriptCmdletPropertiesTests.java deleted file mode 100644 index 5d7a9c5a1c6b7..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ScriptCmdletPropertiesTests.java +++ /dev/null @@ -1,25 +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.avs.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.avs.fluent.models.ScriptCmdletProperties; - -public final class ScriptCmdletPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ScriptCmdletProperties model = - BinaryData - .fromString( - "{\"description\":\"kh\",\"timeout\":\"ygo\",\"parameters\":[{\"type\":\"String\",\"name\":\"qjbvleorfmlu\",\"description\":\"tqzfavyv\",\"visibility\":\"Hidden\",\"optional\":\"Optional\"},{\"type\":\"Credential\",\"name\":\"euayjkqabqgzsles\",\"description\":\"bhernntiew\",\"visibility\":\"Visible\",\"optional\":\"Required\"},{\"type\":\"Credential\",\"name\":\"rbe\",\"description\":\"agohbuff\",\"visibility\":\"Hidden\",\"optional\":\"Optional\"}]}") - .toObject(ScriptCmdletProperties.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ScriptCmdletProperties model = new ScriptCmdletProperties(); - model = BinaryData.fromObject(model).toObject(ScriptCmdletProperties.class); - } -} diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ScriptCmdletsGetWithResponseMockTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ScriptCmdletsGetWithResponseMockTests.java deleted file mode 100644 index 13fb12301a16e..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ScriptCmdletsGetWithResponseMockTests.java +++ /dev/null @@ -1,67 +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.avs.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.avs.AvsManager; -import com.azure.resourcemanager.avs.models.ScriptCmdlet; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class ScriptCmdletsGetWithResponseMockTests { - @Test - public void testGetWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"properties\":{\"description\":\"iov\",\"timeout\":\"cgxuugqkctotiowl\",\"parameters\":[{\"type\":\"Bool\",\"name\":\"tjgwdtguk\",\"description\":\"nblwphqlkcc\",\"visibility\":\"Visible\",\"optional\":\"Optional\"}]},\"id\":\"qwahoi\",\"name\":\"lwgniiprglvawu\",\"type\":\"z\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - AvsManager manager = - AvsManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - ScriptCmdlet response = - manager - .scriptCmdlets() - .getWithResponse("emmucfxh", "kkflrmymyincqlhr", "s", "sl", com.azure.core.util.Context.NONE) - .getValue(); - } -} diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ScriptCmdletsListMockTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ScriptCmdletsListMockTests.java deleted file mode 100644 index 44b12f9521d4b..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ScriptCmdletsListMockTests.java +++ /dev/null @@ -1,65 +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.avs.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.avs.AvsManager; -import com.azure.resourcemanager.avs.models.ScriptCmdlet; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class ScriptCmdletsListMockTests { - @Test - public void testList() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"value\":[{\"properties\":{\"description\":\"sxze\",\"timeout\":\"axwk\",\"parameters\":[{\"type\":\"Bool\",\"name\":\"uhxep\",\"description\":\"utznabaobns\",\"visibility\":\"Hidden\",\"optional\":\"Required\"}]},\"id\":\"ltymkmvguihywart\",\"name\":\"pphkixkykxds\",\"type\":\"j\"}]}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - AvsManager manager = - AvsManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = - manager.scriptCmdlets().list("oewbid", "vteo", "xvgpiude", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ScriptCmdletsListTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ScriptCmdletsListTests.java deleted file mode 100644 index 9998d584750c7..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ScriptCmdletsListTests.java +++ /dev/null @@ -1,25 +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.avs.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.avs.models.ScriptCmdletsList; - -public final class ScriptCmdletsListTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ScriptCmdletsList model = - BinaryData - .fromString( - "{\"value\":[{\"properties\":{\"description\":\"hu\",\"timeout\":\"wp\",\"parameters\":[{\"type\":\"String\",\"name\":\"gjup\",\"description\":\"utpwoqhihejqgw\",\"visibility\":\"Visible\",\"optional\":\"Required\"},{\"type\":\"Int\",\"name\":\"ypsxjvfoim\",\"description\":\"slirciz\",\"visibility\":\"Hidden\",\"optional\":\"Optional\"}]},\"id\":\"fceacvlhvygd\",\"name\":\"ftumrtwnawjslbiw\",\"type\":\"ojgcyzt\"},{\"properties\":{\"description\":\"z\",\"timeout\":\"aeqphchqnr\",\"parameters\":[{\"type\":\"Int\",\"name\":\"uwrykqgaifmvikl\",\"description\":\"dvk\",\"visibility\":\"Visible\",\"optional\":\"Optional\"},{\"type\":\"Float\",\"name\":\"cvdsrhnj\",\"description\":\"olvtnovqfzge\",\"visibility\":\"Hidden\",\"optional\":\"Optional\"},{\"type\":\"Credential\",\"name\":\"ltducea\",\"description\":\"mczuo\",\"visibility\":\"Visible\",\"optional\":\"Optional\"}]},\"id\":\"w\",\"name\":\"qioknssxmojm\",\"type\":\"vpkjpr\"}],\"nextLink\":\"wcfzqljyxgt\"}") - .toObject(ScriptCmdletsList.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ScriptCmdletsList model = new ScriptCmdletsList(); - model = BinaryData.fromObject(model).toObject(ScriptCmdletsList.class); - } -} diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ScriptExecutionInnerTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ScriptExecutionInnerTests.java deleted file mode 100644 index 774802635e1fb..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ScriptExecutionInnerTests.java +++ /dev/null @@ -1,69 +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.avs.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.avs.fluent.models.ScriptExecutionInner; -import com.azure.resourcemanager.avs.models.ScriptExecutionParameter; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class ScriptExecutionInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ScriptExecutionInner model = - BinaryData - .fromString( - "{\"properties\":{\"scriptCmdletId\":\"abwidfcxsspuun\",\"parameters\":[{\"type\":\"ScriptExecutionParameter\",\"name\":\"yhkx\"}],\"hiddenParameters\":[{\"type\":\"ScriptExecutionParameter\",\"name\":\"drihpfhoqcaaewda\"},{\"type\":\"ScriptExecutionParameter\",\"name\":\"mdjvlpj\"}],\"failureReason\":\"kzbrmsgeivsiy\",\"timeout\":\"zkdnc\",\"retention\":\"xonbzoggculapz\",\"submittedAt\":\"2021-07-25T18:35:20Z\",\"startedAt\":\"2021-08-05T01:58:35Z\",\"finishedAt\":\"2021-06-21T04:03:02Z\",\"provisioningState\":\"Cancelled\",\"output\":[\"pnylb\",\"uajlyj\"],\"namedOutputs\":{\"zhvfcibyfmowuxr\":\"dataof\",\"xfzwi\":\"datajpvd\",\"xjrk\":\"datavwzjbhyz\"},\"information\":[\"trnegvmnvuqeqvld\",\"pa\"],\"warnings\":[\"bkkd\",\"flvestmjlxrrilo\",\"apeewchpxlkt\",\"kuziycsle\"],\"errors\":[\"uztcktyhjtqed\"]},\"id\":\"gzulwmmrqzzr\",\"name\":\"jvpglydzgk\",\"type\":\"vqeevtoep\"}") - .toObject(ScriptExecutionInner.class); - Assertions.assertEquals("abwidfcxsspuun", model.scriptCmdletId()); - Assertions.assertEquals("yhkx", model.parameters().get(0).name()); - Assertions.assertEquals("drihpfhoqcaaewda", model.hiddenParameters().get(0).name()); - Assertions.assertEquals("kzbrmsgeivsiy", model.failureReason()); - Assertions.assertEquals("zkdnc", model.timeout()); - Assertions.assertEquals("xonbzoggculapz", model.retention()); - Assertions.assertEquals("pnylb", model.output().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ScriptExecutionInner model = - new ScriptExecutionInner() - .withScriptCmdletId("abwidfcxsspuun") - .withParameters(Arrays.asList(new ScriptExecutionParameter().withName("yhkx"))) - .withHiddenParameters( - Arrays - .asList( - new ScriptExecutionParameter().withName("drihpfhoqcaaewda"), - new ScriptExecutionParameter().withName("mdjvlpj"))) - .withFailureReason("kzbrmsgeivsiy") - .withTimeout("zkdnc") - .withRetention("xonbzoggculapz") - .withOutput(Arrays.asList("pnylb", "uajlyj")) - .withNamedOutputs(mapOf("zhvfcibyfmowuxr", "dataof", "xfzwi", "datajpvd", "xjrk", "datavwzjbhyz")); - model = BinaryData.fromObject(model).toObject(ScriptExecutionInner.class); - Assertions.assertEquals("abwidfcxsspuun", model.scriptCmdletId()); - Assertions.assertEquals("yhkx", model.parameters().get(0).name()); - Assertions.assertEquals("drihpfhoqcaaewda", model.hiddenParameters().get(0).name()); - Assertions.assertEquals("kzbrmsgeivsiy", model.failureReason()); - Assertions.assertEquals("zkdnc", model.timeout()); - Assertions.assertEquals("xonbzoggculapz", model.retention()); - Assertions.assertEquals("pnylb", model.output().get(0)); - } - - // Use "Map.of" if available - @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/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ScriptExecutionParameterTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ScriptExecutionParameterTests.java deleted file mode 100644 index 8f3c9e0344c32..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ScriptExecutionParameterTests.java +++ /dev/null @@ -1,27 +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.avs.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.avs.models.ScriptExecutionParameter; -import org.junit.jupiter.api.Assertions; - -public final class ScriptExecutionParameterTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ScriptExecutionParameter model = - BinaryData - .fromString("{\"type\":\"ScriptExecutionParameter\",\"name\":\"tppn\"}") - .toObject(ScriptExecutionParameter.class); - Assertions.assertEquals("tppn", model.name()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ScriptExecutionParameter model = new ScriptExecutionParameter().withName("tppn"); - model = BinaryData.fromObject(model).toObject(ScriptExecutionParameter.class); - Assertions.assertEquals("tppn", model.name()); - } -} diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ScriptExecutionPropertiesTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ScriptExecutionPropertiesTests.java deleted file mode 100644 index edbdbe68dae0a..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ScriptExecutionPropertiesTests.java +++ /dev/null @@ -1,69 +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.avs.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.avs.fluent.models.ScriptExecutionProperties; -import com.azure.resourcemanager.avs.models.ScriptExecutionParameter; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class ScriptExecutionPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ScriptExecutionProperties model = - BinaryData - .fromString( - "{\"scriptCmdletId\":\"utnwytpzdmovzvf\",\"parameters\":[{\"type\":\"ScriptExecutionParameter\",\"name\":\"wzqa\"},{\"type\":\"ScriptExecutionParameter\",\"name\":\"f\"}],\"hiddenParameters\":[{\"type\":\"ScriptExecutionParameter\",\"name\":\"ur\"}],\"failureReason\":\"laecxndticok\",\"timeout\":\"vzm\",\"retention\":\"t\",\"submittedAt\":\"2021-01-29T20:58:55Z\",\"startedAt\":\"2021-12-03T00:07:08Z\",\"finishedAt\":\"2021-05-21T11:49:52Z\",\"provisioningState\":\"Failed\",\"output\":[\"lnpkciay\",\"riykhyawfvjlbox\"],\"namedOutputs\":{\"digumbnr\":\"datajlmxhomdynhd\",\"hezwwvaiq\":\"dataauzzptjazysd\"},\"information\":[\"vfonkphhqyikvyl\"],\"warnings\":[\"avluwmncs\",\"tijfybvp\",\"ekrsgs\"],\"errors\":[\"huzqgn\",\"dgkynscliqhzvhxn\",\"omtkub\"]}") - .toObject(ScriptExecutionProperties.class); - Assertions.assertEquals("utnwytpzdmovzvf", model.scriptCmdletId()); - Assertions.assertEquals("wzqa", model.parameters().get(0).name()); - Assertions.assertEquals("ur", model.hiddenParameters().get(0).name()); - Assertions.assertEquals("laecxndticok", model.failureReason()); - Assertions.assertEquals("vzm", model.timeout()); - Assertions.assertEquals("t", model.retention()); - Assertions.assertEquals("lnpkciay", model.output().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ScriptExecutionProperties model = - new ScriptExecutionProperties() - .withScriptCmdletId("utnwytpzdmovzvf") - .withParameters( - Arrays - .asList( - new ScriptExecutionParameter().withName("wzqa"), - new ScriptExecutionParameter().withName("f"))) - .withHiddenParameters(Arrays.asList(new ScriptExecutionParameter().withName("ur"))) - .withFailureReason("laecxndticok") - .withTimeout("vzm") - .withRetention("t") - .withOutput(Arrays.asList("lnpkciay", "riykhyawfvjlbox")) - .withNamedOutputs(mapOf("digumbnr", "datajlmxhomdynhd", "hezwwvaiq", "dataauzzptjazysd")); - model = BinaryData.fromObject(model).toObject(ScriptExecutionProperties.class); - Assertions.assertEquals("utnwytpzdmovzvf", model.scriptCmdletId()); - Assertions.assertEquals("wzqa", model.parameters().get(0).name()); - Assertions.assertEquals("ur", model.hiddenParameters().get(0).name()); - Assertions.assertEquals("laecxndticok", model.failureReason()); - Assertions.assertEquals("vzm", model.timeout()); - Assertions.assertEquals("t", model.retention()); - Assertions.assertEquals("lnpkciay", model.output().get(0)); - } - - // Use "Map.of" if available - @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/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ScriptExecutionsCreateOrUpdateMockTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ScriptExecutionsCreateOrUpdateMockTests.java deleted file mode 100644 index 87c7312d42373..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ScriptExecutionsCreateOrUpdateMockTests.java +++ /dev/null @@ -1,105 +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.avs.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.avs.AvsManager; -import com.azure.resourcemanager.avs.models.ScriptExecution; -import com.azure.resourcemanager.avs.models.ScriptExecutionParameter; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class ScriptExecutionsCreateOrUpdateMockTests { - @Test - public void testCreateOrUpdate() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"properties\":{\"scriptCmdletId\":\"mslclblyjxlt\",\"parameters\":[{\"type\":\"ScriptExecutionParameter\",\"name\":\"uscv\"},{\"type\":\"ScriptExecutionParameter\",\"name\":\"f\"}],\"hiddenParameters\":[{\"type\":\"ScriptExecutionParameter\",\"name\":\"ctmgxuupbezqccy\"},{\"type\":\"ScriptExecutionParameter\",\"name\":\"rtceukdqkkyihzt\"},{\"type\":\"ScriptExecutionParameter\",\"name\":\"eq\"},{\"type\":\"ScriptExecutionParameter\",\"name\":\"gqzgwldoychill\"}],\"failureReason\":\"cfehuwaoagu\",\"timeout\":\"icq\",\"retention\":\"izs\",\"submittedAt\":\"2021-05-20T02:42:18Z\",\"startedAt\":\"2021-03-15T23:43:36Z\",\"finishedAt\":\"2021-06-27T17:41:19Z\",\"provisioningState\":\"Succeeded\",\"output\":[\"tk\",\"qejpmvssehaepwa\"],\"namedOutputs\":{\"y\":\"datatczhupeuknijd\",\"ydjfb\":\"dataes\",\"v\":\"datac\",\"uflgbhgauacdixm\":\"datahulrtywikdmhla\"},\"information\":[\"rs\"],\"warnings\":[\"qg\",\"kfnozoeoqbvj\",\"vefgwbmqjchntas\"],\"errors\":[\"mx\",\"ulpzealb\",\"qkyojwyvf\"]},\"id\":\"mbtsuahxsg\",\"name\":\"jcmmzrrscub\",\"type\":\"wsdrnpxqwodif\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - AvsManager manager = - AvsManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - ScriptExecution response = - manager - .scriptExecutions() - .define("mlghktuidvrmazlp") - .withExistingPrivateCloud("crrpcjttbstvje", "qnrmvvfko") - .withScriptCmdletId("exymzvla") - .withParameters(Arrays.asList(new ScriptExecutionParameter().withName("bhpwvqsgnyy"))) - .withHiddenParameters( - Arrays - .asList( - new ScriptExecutionParameter().withName("ivensrpmeyyvpk"), - new ScriptExecutionParameter().withName("atlb"))) - .withFailureReason("pzgsk") - .withTimeout("rfhfvo") - .withRetention("knbnxwcdommpvfq") - .withOutput(Arrays.asList("aclkiexhajlfnt")) - .withNamedOutputs(mapOf("diygbpvnwswmtxky", "datafyut", "l", "datatwwgzwx")) - .create(); - - Assertions.assertEquals("mslclblyjxlt", response.scriptCmdletId()); - Assertions.assertEquals("uscv", response.parameters().get(0).name()); - Assertions.assertEquals("ctmgxuupbezqccy", response.hiddenParameters().get(0).name()); - Assertions.assertEquals("cfehuwaoagu", response.failureReason()); - Assertions.assertEquals("icq", response.timeout()); - Assertions.assertEquals("izs", response.retention()); - Assertions.assertEquals("tk", response.output().get(0)); - } - - // Use "Map.of" if available - @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/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ScriptExecutionsDeleteMockTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ScriptExecutionsDeleteMockTests.java deleted file mode 100644 index 86ab2b39f46f8..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ScriptExecutionsDeleteMockTests.java +++ /dev/null @@ -1,61 +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.avs.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.avs.AvsManager; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class ScriptExecutionsDeleteMockTests { - @Test - public void testDelete() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = "{}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - AvsManager manager = - AvsManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager.scriptExecutions().delete("gnzxojpslsvj", "pli", "fiqwoy", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ScriptExecutionsGetExecutionLogsWithResponseMockTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ScriptExecutionsGetExecutionLogsWithResponseMockTests.java deleted file mode 100644 index 2fc8a4763f85d..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ScriptExecutionsGetExecutionLogsWithResponseMockTests.java +++ /dev/null @@ -1,88 +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.avs.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.avs.AvsManager; -import com.azure.resourcemanager.avs.models.ScriptExecution; -import com.azure.resourcemanager.avs.models.ScriptOutputStreamType; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class ScriptExecutionsGetExecutionLogsWithResponseMockTests { - @Test - public void testGetExecutionLogsWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"properties\":{\"scriptCmdletId\":\"benribcawetzq\",\"parameters\":[{\"type\":\"ScriptExecutionParameter\",\"name\":\"jwfljhznamtua\"},{\"type\":\"ScriptExecutionParameter\",\"name\":\"mzwcjjncqt\"},{\"type\":\"ScriptExecutionParameter\",\"name\":\"z\"},{\"type\":\"ScriptExecutionParameter\",\"name\":\"izvg\"}],\"hiddenParameters\":[{\"type\":\"ScriptExecutionParameter\",\"name\":\"tzuuvb\"},{\"type\":\"ScriptExecutionParameter\",\"name\":\"ngrebwg\"}],\"failureReason\":\"httzlswvajqfutlx\",\"timeout\":\"oqza\",\"retention\":\"nwqrjzfrgqh\",\"submittedAt\":\"2021-05-07T20:50:08Z\",\"startedAt\":\"2021-05-24T01:31:46Z\",\"finishedAt\":\"2021-03-17T16:52:41Z\",\"provisioningState\":\"Canceled\",\"output\":[\"r\",\"hmbpyryxamebly\",\"yvk\",\"kmrocxne\"],\"namedOutputs\":{\"pyapucygvoav\":\"datamtodl\"},\"information\":[\"ssxlghieegjlg\",\"vpaseksgbu\"],\"warnings\":[\"tu\",\"gdhg\",\"qipir\",\"iwrqofulopmjnl\"],\"errors\":[\"hcbjpibk\"]},\"id\":\"phuuuerctato\",\"name\":\"intqpbrlcyr\",\"type\":\"uczkgofxyfsruc\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - AvsManager manager = - AvsManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - ScriptExecution response = - manager - .scriptExecutions() - .getExecutionLogsWithResponse( - "qvapcohhoucq", - "q", - "jxcx", - Arrays - .asList( - ScriptOutputStreamType.OUTPUT, - ScriptOutputStreamType.ERROR, - ScriptOutputStreamType.INFORMATION, - ScriptOutputStreamType.WARNING), - com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("benribcawetzq", response.scriptCmdletId()); - Assertions.assertEquals("jwfljhznamtua", response.parameters().get(0).name()); - Assertions.assertEquals("tzuuvb", response.hiddenParameters().get(0).name()); - Assertions.assertEquals("httzlswvajqfutlx", response.failureReason()); - Assertions.assertEquals("oqza", response.timeout()); - Assertions.assertEquals("nwqrjzfrgqh", response.retention()); - Assertions.assertEquals("r", response.output().get(0)); - } -} diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ScriptExecutionsGetWithResponseMockTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ScriptExecutionsGetWithResponseMockTests.java deleted file mode 100644 index fbb3865b6fab6..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ScriptExecutionsGetWithResponseMockTests.java +++ /dev/null @@ -1,76 +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.avs.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.avs.AvsManager; -import com.azure.resourcemanager.avs.models.ScriptExecution; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class ScriptExecutionsGetWithResponseMockTests { - @Test - public void testGetWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"properties\":{\"scriptCmdletId\":\"zydmxzjijpvuaurk\",\"parameters\":[{\"type\":\"ScriptExecutionParameter\",\"name\":\"irldefxr\"}],\"hiddenParameters\":[{\"type\":\"ScriptExecutionParameter\",\"name\":\"xnbkkj\"},{\"type\":\"ScriptExecutionParameter\",\"name\":\"nurnnq\"},{\"type\":\"ScriptExecutionParameter\",\"name\":\"nqbpi\"},{\"type\":\"ScriptExecutionParameter\",\"name\":\"xqltgrd\"}],\"failureReason\":\"ypxrx\",\"timeout\":\"bfihw\",\"retention\":\"vctafsrb\",\"submittedAt\":\"2021-08-17T18:59:51Z\",\"startedAt\":\"2021-06-04T08:10:19Z\",\"finishedAt\":\"2021-02-19T23:36:25Z\",\"provisioningState\":\"Succeeded\",\"output\":[\"hspnxwqagnepz\",\"aklsbsbq\",\"qagwwrxaomz\",\"sgl\"],\"namedOutputs\":{\"oawjqoyueay\":\"datazezkhhltnjadh\",\"lbyrru\":\"databpcms\",\"igdhxiidlo\":\"dataqthwmgnmbscbb\"},\"information\":[\"bwdpyqyyb\",\"ubmdnafcbqwre\",\"jelaqacigele\",\"hdbvqvwzkjop\"],\"warnings\":[\"onrlkwzdqybxceak\",\"cptsoqfyiase\",\"chkrttzr\",\"zisgykiuemvanb\"],\"errors\":[\"hmnr\"]},\"id\":\"xbsojkli\",\"name\":\"hmdp\",\"type\":\"ysprq\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - AvsManager manager = - AvsManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - ScriptExecution response = - manager - .scriptExecutions() - .getWithResponse("ssffxuifmc", "ypobkdqzr", "zsylollgt", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("zydmxzjijpvuaurk", response.scriptCmdletId()); - Assertions.assertEquals("irldefxr", response.parameters().get(0).name()); - Assertions.assertEquals("xnbkkj", response.hiddenParameters().get(0).name()); - Assertions.assertEquals("ypxrx", response.failureReason()); - Assertions.assertEquals("bfihw", response.timeout()); - Assertions.assertEquals("vctafsrb", response.retention()); - Assertions.assertEquals("hspnxwqagnepz", response.output().get(0)); - } -} diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ScriptExecutionsListMockTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ScriptExecutionsListMockTests.java deleted file mode 100644 index c9d390ac9d152..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ScriptExecutionsListMockTests.java +++ /dev/null @@ -1,74 +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.avs.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.avs.AvsManager; -import com.azure.resourcemanager.avs.models.ScriptExecution; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class ScriptExecutionsListMockTests { - @Test - public void testList() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"value\":[{\"properties\":{\"scriptCmdletId\":\"ifoxxkubvphav\",\"parameters\":[{\"type\":\"ScriptExecutionParameter\",\"name\":\"brbqgvgovp\"}],\"hiddenParameters\":[{\"type\":\"ScriptExecutionParameter\",\"name\":\"tefjoknssqyzq\"},{\"type\":\"ScriptExecutionParameter\",\"name\":\"dikdfrdbi\"},{\"type\":\"ScriptExecutionParameter\",\"name\":\"mrjgeihfqlggwfi\"}],\"failureReason\":\"cxmjpbyephmg\",\"timeout\":\"vljvrc\",\"retention\":\"fqip\",\"submittedAt\":\"2020-12-22T02:20:11Z\",\"startedAt\":\"2021-09-18T18:40:03Z\",\"finishedAt\":\"2021-04-01T06:59Z\",\"provisioningState\":\"Cancelling\",\"output\":[\"abvn\",\"ilee\"],\"namedOutputs\":{\"aukhfkvcisiz\":\"datawlpaugmrmfjlrxwt\",\"eewxeiqbpsmg\":\"dataoaedsxjwuivedwcg\",\"dlrgms\":\"datamguaml\"},\"information\":[\"gaufcs\",\"hvn\",\"wgnxkympqanxrj\"],\"warnings\":[\"tw\",\"taoypnyghshxc\"],\"errors\":[\"kgmnsghpxyc\",\"hdrwjjkh\"]},\"id\":\"yomacluzvxnqm\",\"name\":\"rpqpd\",\"type\":\"wmkoisq\"}]}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - AvsManager manager = - AvsManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = - manager.scriptExecutions().list("ufypiv", "sbbjpmcu", com.azure.core.util.Context.NONE); - - Assertions.assertEquals("ifoxxkubvphav", response.iterator().next().scriptCmdletId()); - Assertions.assertEquals("brbqgvgovp", response.iterator().next().parameters().get(0).name()); - Assertions.assertEquals("tefjoknssqyzq", response.iterator().next().hiddenParameters().get(0).name()); - Assertions.assertEquals("cxmjpbyephmg", response.iterator().next().failureReason()); - Assertions.assertEquals("vljvrc", response.iterator().next().timeout()); - Assertions.assertEquals("fqip", response.iterator().next().retention()); - Assertions.assertEquals("abvn", response.iterator().next().output().get(0)); - } -} diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ScriptExecutionsListTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ScriptExecutionsListTests.java deleted file mode 100644 index 7887ac46d7651..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ScriptExecutionsListTests.java +++ /dev/null @@ -1,25 +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.avs.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.avs.models.ScriptExecutionsList; - -public final class ScriptExecutionsListTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ScriptExecutionsList model = - BinaryData - .fromString( - "{\"value\":[{\"properties\":{\"scriptCmdletId\":\"nmwcpmgu\",\"parameters\":[{\"type\":\"ScriptExecutionParameter\",\"name\":\"raufactkahzova\"},{\"type\":\"ScriptExecutionParameter\",\"name\":\"j\"},{\"type\":\"ScriptExecutionParameter\",\"name\":\"iuxxpshneekulfg\"}],\"hiddenParameters\":[{\"type\":\"ScriptExecutionParameter\",\"name\":\"ubkwdle\"},{\"type\":\"ScriptExecutionParameter\",\"name\":\"rds\"}],\"failureReason\":\"ujbazpjuohminyfl\",\"timeout\":\"orwmduvwpklv\",\"retention\":\"mygdxpgpqch\",\"submittedAt\":\"2021-12-04T12:22:10Z\",\"startedAt\":\"2021-05-26T11:43:30Z\",\"finishedAt\":\"2021-04-10T21:01:23Z\",\"provisioningState\":\"Deleting\",\"output\":[\"xgibbda\",\"confozauors\"],\"namedOutputs\":{\"pzlrphw\":\"datakwbqplhlvnuu\",\"nnrwrbiork\":\"datasoldweyuqdunv\"},\"information\":[\"ywjhhgdnhx\",\"sivfomilo\"],\"warnings\":[\"dufiq\",\"dieuzaofj\"],\"errors\":[\"cyyysfgdot\"]},\"id\":\"ubiipuipwoqonma\",\"name\":\"jeknizshq\",\"type\":\"cimpevfg\"},{\"properties\":{\"scriptCmdletId\":\"rrilbywdxsmic\",\"parameters\":[{\"type\":\"ScriptExecutionParameter\",\"name\":\"wfscjfn\"},{\"type\":\"ScriptExecutionParameter\",\"name\":\"nszqujiz\"},{\"type\":\"ScriptExecutionParameter\",\"name\":\"voqyt\"},{\"type\":\"ScriptExecutionParameter\",\"name\":\"byowbblgyavutp\"}],\"hiddenParameters\":[{\"type\":\"ScriptExecutionParameter\",\"name\":\"oxoismsksbpim\"},{\"type\":\"ScriptExecutionParameter\",\"name\":\"qolj\"}],\"failureReason\":\"cgxxlxs\",\"timeout\":\"fgcviz\",\"retention\":\"dwl\",\"submittedAt\":\"2021-04-04T23:05:36Z\",\"startedAt\":\"2021-03-22T22:39:30Z\",\"finishedAt\":\"2021-10-25T23:33:10Z\",\"provisioningState\":\"Cancelling\",\"output\":[\"k\",\"ubdyhgk\",\"minsgowzf\",\"tsttktlahbq\"],\"namedOutputs\":{\"x\":\"dataxtgzukxitmmqtgqq\"},\"information\":[\"xrxc\"],\"warnings\":[\"isavok\",\"dzf\"],\"errors\":[\"ivjlfrqttbajlka\"]},\"id\":\"nwxyiop\",\"name\":\"dkqqfkuvscxkd\",\"type\":\"ligovibrxkpm\"},{\"properties\":{\"scriptCmdletId\":\"zuruocbgo\",\"parameters\":[{\"type\":\"ScriptExecutionParameter\",\"name\":\"te\"},{\"type\":\"ScriptExecutionParameter\",\"name\":\"ybfhjxa\"}],\"hiddenParameters\":[{\"type\":\"ScriptExecutionParameter\",\"name\":\"jgslordilmyww\"},{\"type\":\"ScriptExecutionParameter\",\"name\":\"kgkxn\"}],\"failureReason\":\"dabg\",\"timeout\":\"vudtjuewbcihx\",\"retention\":\"whcjyxcc\",\"submittedAt\":\"2021-08-23T00:43:43Z\",\"startedAt\":\"2020-12-23T12:08:57Z\",\"finishedAt\":\"2021-09-20T03:02:08Z\",\"provisioningState\":\"Cancelling\",\"output\":[\"zp\",\"gwjplmag\",\"tcyohpfkyrk\"],\"namedOutputs\":{\"aiy\":\"datagiogsjkmnwqjno\"},\"information\":[\"viacegfnmntfpmv\"],\"warnings\":[\"fnczdwvvbalx\",\"l\"],\"errors\":[\"podbzevwrdnh\",\"ukuv\"]},\"id\":\"jcswsmys\",\"name\":\"uluqypfc\",\"type\":\"lerchpq\"}],\"nextLink\":\"f\"}") - .toObject(ScriptExecutionsList.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ScriptExecutionsList model = new ScriptExecutionsList(); - model = BinaryData.fromObject(model).toObject(ScriptExecutionsList.class); - } -} diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ScriptPackageInnerTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ScriptPackageInnerTests.java deleted file mode 100644 index c52d80e883562..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ScriptPackageInnerTests.java +++ /dev/null @@ -1,25 +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.avs.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.avs.fluent.models.ScriptPackageInner; - -public final class ScriptPackageInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ScriptPackageInner model = - BinaryData - .fromString( - "{\"properties\":{\"description\":\"hfssnrb\",\"version\":\"efr\",\"company\":\"sgaojfmwncot\",\"uri\":\"fhir\"},\"id\":\"tymoxoftp\",\"name\":\"piwyczuhxacpqjl\",\"type\":\"h\"}") - .toObject(ScriptPackageInner.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ScriptPackageInner model = new ScriptPackageInner(); - model = BinaryData.fromObject(model).toObject(ScriptPackageInner.class); - } -} diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ScriptPackagePropertiesTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ScriptPackagePropertiesTests.java deleted file mode 100644 index fc61eaa167611..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ScriptPackagePropertiesTests.java +++ /dev/null @@ -1,25 +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.avs.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.avs.fluent.models.ScriptPackageProperties; - -public final class ScriptPackagePropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ScriptPackageProperties model = - BinaryData - .fromString( - "{\"description\":\"usps\",\"version\":\"sdvlmfwdgzxulucv\",\"company\":\"mrsreuzvxurisjnh\",\"uri\":\"txifqj\"}") - .toObject(ScriptPackageProperties.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ScriptPackageProperties model = new ScriptPackageProperties(); - model = BinaryData.fromObject(model).toObject(ScriptPackageProperties.class); - } -} diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ScriptPackagesGetWithResponseMockTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ScriptPackagesGetWithResponseMockTests.java deleted file mode 100644 index e7a82f925d51a..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ScriptPackagesGetWithResponseMockTests.java +++ /dev/null @@ -1,67 +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.avs.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.avs.AvsManager; -import com.azure.resourcemanager.avs.models.ScriptPackage; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class ScriptPackagesGetWithResponseMockTests { - @Test - public void testGetWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"properties\":{\"description\":\"tgjcsgguxheml\",\"version\":\"waeeczgfb\",\"company\":\"klelssxb\",\"uri\":\"c\"},\"id\":\"xzujksrlsm\",\"name\":\"esqplp\",\"type\":\"mjc\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - AvsManager manager = - AvsManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - ScriptPackage response = - manager - .scriptPackages() - .getWithResponse("ehnmnaoyankco", "qswankltytmhdr", "znnhd", com.azure.core.util.Context.NONE) - .getValue(); - } -} diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ScriptPackagesListMockTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ScriptPackagesListMockTests.java deleted file mode 100644 index 06a8e820b6601..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ScriptPackagesListMockTests.java +++ /dev/null @@ -1,65 +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.avs.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.avs.AvsManager; -import com.azure.resourcemanager.avs.models.ScriptPackage; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class ScriptPackagesListMockTests { - @Test - public void testList() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"value\":[{\"properties\":{\"description\":\"kumuikjcjca\",\"version\":\"bwsnsqow\",\"company\":\"comlikytwvczc\",\"uri\":\"k\"},\"id\":\"cvejyfdvlvhbwrn\",\"name\":\"xt\",\"type\":\"ddpqt\"}]}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - AvsManager manager = - AvsManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = - manager.scriptPackages().list("gddeimaw", "o", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ScriptPackagesListTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ScriptPackagesListTests.java deleted file mode 100644 index 7fc4e152c53fd..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ScriptPackagesListTests.java +++ /dev/null @@ -1,25 +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.avs.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.avs.models.ScriptPackagesList; - -public final class ScriptPackagesListTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ScriptPackagesList model = - BinaryData - .fromString( - "{\"value\":[{\"properties\":{\"description\":\"ffovjzhpj\",\"version\":\"bgj\",\"company\":\"xumvfcluyovw\",\"uri\":\"bkfezzxscyhwzdgi\"},\"id\":\"ujb\",\"name\":\"bomvzzbtdcqv\",\"type\":\"niyujv\"}],\"nextLink\":\"l\"}") - .toObject(ScriptPackagesList.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ScriptPackagesList model = new ScriptPackagesList(); - model = BinaryData.fromObject(model).toObject(ScriptPackagesList.class); - } -} diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ScriptParameterTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ScriptParameterTests.java deleted file mode 100644 index bfa4f0861d51f..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ScriptParameterTests.java +++ /dev/null @@ -1,28 +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.avs.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.avs.models.ScriptParameter; -import org.junit.jupiter.api.Assertions; - -public final class ScriptParameterTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ScriptParameter model = - BinaryData - .fromString( - "{\"type\":\"String\",\"name\":\"hmxtdr\",\"description\":\"utacoe\",\"visibility\":\"Visible\",\"optional\":\"Required\"}") - .toObject(ScriptParameter.class); - Assertions.assertEquals("hmxtdr", model.name()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ScriptParameter model = new ScriptParameter().withName("hmxtdr"); - model = BinaryData.fromObject(model).toObject(ScriptParameter.class); - Assertions.assertEquals("hmxtdr", model.name()); - } -} diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ScriptSecureStringExecutionParameterTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ScriptSecureStringExecutionParameterTests.java deleted file mode 100644 index 316c87706f26e..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ScriptSecureStringExecutionParameterTests.java +++ /dev/null @@ -1,31 +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.avs.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.avs.models.ScriptSecureStringExecutionParameter; -import org.junit.jupiter.api.Assertions; - -public final class ScriptSecureStringExecutionParameterTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ScriptSecureStringExecutionParameter model = - BinaryData - .fromString( - "{\"type\":\"SecureValue\",\"secureValue\":\"knlrariaawiuagy\",\"name\":\"wqfbylyrfgiagt\"}") - .toObject(ScriptSecureStringExecutionParameter.class); - Assertions.assertEquals("wqfbylyrfgiagt", model.name()); - Assertions.assertEquals("knlrariaawiuagy", model.secureValue()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ScriptSecureStringExecutionParameter model = - new ScriptSecureStringExecutionParameter().withName("wqfbylyrfgiagt").withSecureValue("knlrariaawiuagy"); - model = BinaryData.fromObject(model).toObject(ScriptSecureStringExecutionParameter.class); - Assertions.assertEquals("wqfbylyrfgiagt", model.name()); - Assertions.assertEquals("knlrariaawiuagy", model.secureValue()); - } -} diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ScriptStringExecutionParameterTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ScriptStringExecutionParameterTests.java deleted file mode 100644 index 1368ec6b13086..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ScriptStringExecutionParameterTests.java +++ /dev/null @@ -1,30 +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.avs.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.avs.models.ScriptStringExecutionParameter; -import org.junit.jupiter.api.Assertions; - -public final class ScriptStringExecutionParameterTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ScriptStringExecutionParameter model = - BinaryData - .fromString("{\"type\":\"Value\",\"value\":\"jocqwogfnzjvusf\",\"name\":\"ld\"}") - .toObject(ScriptStringExecutionParameter.class); - Assertions.assertEquals("ld", model.name()); - Assertions.assertEquals("jocqwogfnzjvusf", model.value()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ScriptStringExecutionParameter model = - new ScriptStringExecutionParameter().withName("ld").withValue("jocqwogfnzjvusf"); - model = BinaryData.fromObject(model).toObject(ScriptStringExecutionParameter.class); - Assertions.assertEquals("ld", model.name()); - Assertions.assertEquals("jocqwogfnzjvusf", model.value()); - } -} diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ServiceSpecificationTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ServiceSpecificationTests.java deleted file mode 100644 index cc8999c2ae897..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ServiceSpecificationTests.java +++ /dev/null @@ -1,215 +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.avs.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.avs.models.LogSpecification; -import com.azure.resourcemanager.avs.models.MetricDimension; -import com.azure.resourcemanager.avs.models.MetricSpecification; -import com.azure.resourcemanager.avs.models.ServiceSpecification; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class ServiceSpecificationTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ServiceSpecification model = - BinaryData - .fromString( - "{\"logSpecifications\":[{\"name\":\"zzvypyqrimzinp\",\"displayName\":\"wjdk\",\"blobDuration\":\"soodqxhcrmnoh\"},{\"name\":\"ckwhds\",\"displayName\":\"fiyipjxsqwpgrj\",\"blobDuration\":\"norcjxvsnbyxqab\"},{\"name\":\"ocpcy\",\"displayName\":\"urzafb\",\"blobDuration\":\"j\"}],\"metricSpecifications\":[{\"name\":\"oq\",\"displayName\":\"mkljavb\",\"displayDescription\":\"dtqajzyulpkudj\",\"unit\":\"lkhbz\",\"category\":\"epgzgqexz\",\"aggregationType\":\"c\",\"supportedAggregationTypes\":[\"paierh\"],\"supportedTimeGrainTypes\":[\"sglumma\",\"tjaodxobnb\"],\"fillGapWithZero\":false,\"dimensions\":[{\"name\":\"okaj\",\"displayName\":\"npime\",\"internalName\":\"stxgc\",\"toBeExportedForShoebox\":false},{\"name\":\"maajrmvdjwzrlo\",\"displayName\":\"clwhijcoejctbz\",\"internalName\":\"s\",\"toBeExportedForShoebox\":false},{\"name\":\"bkbfkgukdkex\",\"displayName\":\"pofm\",\"internalName\":\"x\",\"toBeExportedForShoebox\":false}],\"enableRegionalMdmAccount\":\"gddtocj\",\"sourceMdmAccount\":\"hvpmoue\",\"sourceMdmNamespace\":\"dzxibqeojnxqbzvd\"},{\"name\":\"t\",\"displayName\":\"deicbtwnpzao\",\"displayDescription\":\"uhrhcffcyddgl\",\"unit\":\"t\",\"category\":\"qkwpyeicxmqc\",\"aggregationType\":\"q\",\"supportedAggregationTypes\":[\"hix\",\"igdtopbob\",\"og\",\"m\"],\"supportedTimeGrainTypes\":[\"a\"],\"fillGapWithZero\":true,\"dimensions\":[{\"name\":\"ayvvtpgvdf\",\"displayName\":\"otkftutqxlngx\",\"internalName\":\"fgugnxkrxdqmid\",\"toBeExportedForShoebox\":false},{\"name\":\"rvqdra\",\"displayName\":\"jybige\",\"internalName\":\"qfbow\",\"toBeExportedForShoebox\":true}],\"enableRegionalMdmAccount\":\"yktz\",\"sourceMdmAccount\":\"u\",\"sourceMdmNamespace\":\"wgqyw\"},{\"name\":\"drvyn\",\"displayName\":\"gpphrcgyn\",\"displayDescription\":\"cpecfvmmcoofs\",\"unit\":\"zevgb\",\"category\":\"jqabcypmivkwlzuv\",\"aggregationType\":\"fwnfnb\",\"supportedAggregationTypes\":[\"ionle\",\"x\"],\"supportedTimeGrainTypes\":[\"gtzxdpn\"],\"fillGapWithZero\":false,\"dimensions\":[{\"name\":\"rjfeallnwsubisnj\",\"displayName\":\"pmng\",\"internalName\":\"scxaq\",\"toBeExportedForShoebox\":true},{\"name\":\"hcbonqvpkvlr\",\"displayName\":\"jease\",\"internalName\":\"heoflokeyyienjbd\",\"toBeExportedForShoebox\":true},{\"name\":\"rhpdjpjumas\",\"displayName\":\"zj\",\"internalName\":\"yegu\",\"toBeExportedForShoebox\":false},{\"name\":\"xxhejjzzvd\",\"displayName\":\"gwdslfhotwm\",\"internalName\":\"npwlbjnpg\",\"toBeExportedForShoebox\":true}],\"enableRegionalMdmAccount\":\"adehxnltyfsopp\",\"sourceMdmAccount\":\"uesnzwdejbavo\",\"sourceMdmNamespace\":\"zdmohctbqvu\"},{\"name\":\"xdn\",\"displayName\":\"vo\",\"displayDescription\":\"ujjugwdkcglh\",\"unit\":\"azjdyggd\",\"category\":\"ixhbkuofqweykhm\",\"aggregationType\":\"evfyexfwhybcib\",\"supportedAggregationTypes\":[\"dcsi\",\"ynnaam\",\"ectehf\"],\"supportedTimeGrainTypes\":[\"cj\",\"ypvhezrkg\"],\"fillGapWithZero\":false,\"dimensions\":[{\"name\":\"fovgmkqsleyyvxy\",\"displayName\":\"pkc\",\"internalName\":\"tpngjcrcczsqpjh\",\"toBeExportedForShoebox\":false},{\"name\":\"jvnysounqe\",\"displayName\":\"noae\",\"internalName\":\"fhyhltrpmopjmcma\",\"toBeExportedForShoebox\":false},{\"name\":\"thfuiuaodsfcpkvx\",\"displayName\":\"puozmyzydag\",\"internalName\":\"axbezyiuo\",\"toBeExportedForShoebox\":true},{\"name\":\"hrdxwzywqsmbs\",\"displayName\":\"exim\",\"internalName\":\"yocf\",\"toBeExportedForShoebox\":false}],\"enableRegionalMdmAccount\":\"ymddys\",\"sourceMdmAccount\":\"i\",\"sourceMdmNamespace\":\"xhqyudxorrqnb\"}]}") - .toObject(ServiceSpecification.class); - Assertions.assertEquals("zzvypyqrimzinp", model.logSpecifications().get(0).name()); - Assertions.assertEquals("wjdk", model.logSpecifications().get(0).displayName()); - Assertions.assertEquals("soodqxhcrmnoh", model.logSpecifications().get(0).blobDuration()); - Assertions.assertEquals("oq", model.metricSpecifications().get(0).name()); - Assertions.assertEquals("mkljavb", model.metricSpecifications().get(0).displayName()); - Assertions.assertEquals("dtqajzyulpkudj", model.metricSpecifications().get(0).displayDescription()); - Assertions.assertEquals("lkhbz", model.metricSpecifications().get(0).unit()); - Assertions.assertEquals("epgzgqexz", model.metricSpecifications().get(0).category()); - Assertions.assertEquals("c", model.metricSpecifications().get(0).aggregationType()); - Assertions.assertEquals("paierh", model.metricSpecifications().get(0).supportedAggregationTypes().get(0)); - Assertions.assertEquals("sglumma", model.metricSpecifications().get(0).supportedTimeGrainTypes().get(0)); - Assertions.assertEquals(false, model.metricSpecifications().get(0).fillGapWithZero()); - Assertions.assertEquals("okaj", model.metricSpecifications().get(0).dimensions().get(0).name()); - Assertions.assertEquals("npime", model.metricSpecifications().get(0).dimensions().get(0).displayName()); - Assertions.assertEquals("stxgc", model.metricSpecifications().get(0).dimensions().get(0).internalName()); - Assertions - .assertEquals(false, model.metricSpecifications().get(0).dimensions().get(0).toBeExportedForShoebox()); - Assertions.assertEquals("gddtocj", model.metricSpecifications().get(0).enableRegionalMdmAccount()); - Assertions.assertEquals("hvpmoue", model.metricSpecifications().get(0).sourceMdmAccount()); - Assertions.assertEquals("dzxibqeojnxqbzvd", model.metricSpecifications().get(0).sourceMdmNamespace()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ServiceSpecification model = - new ServiceSpecification() - .withLogSpecifications( - Arrays - .asList( - new LogSpecification() - .withName("zzvypyqrimzinp") - .withDisplayName("wjdk") - .withBlobDuration("soodqxhcrmnoh"), - new LogSpecification() - .withName("ckwhds") - .withDisplayName("fiyipjxsqwpgrj") - .withBlobDuration("norcjxvsnbyxqab"), - new LogSpecification().withName("ocpcy").withDisplayName("urzafb").withBlobDuration("j"))) - .withMetricSpecifications( - Arrays - .asList( - new MetricSpecification() - .withName("oq") - .withDisplayName("mkljavb") - .withDisplayDescription("dtqajzyulpkudj") - .withUnit("lkhbz") - .withCategory("epgzgqexz") - .withAggregationType("c") - .withSupportedAggregationTypes(Arrays.asList("paierh")) - .withSupportedTimeGrainTypes(Arrays.asList("sglumma", "tjaodxobnb")) - .withFillGapWithZero(false) - .withDimensions( - Arrays - .asList( - new MetricDimension() - .withName("okaj") - .withDisplayName("npime") - .withInternalName("stxgc") - .withToBeExportedForShoebox(false), - new MetricDimension() - .withName("maajrmvdjwzrlo") - .withDisplayName("clwhijcoejctbz") - .withInternalName("s") - .withToBeExportedForShoebox(false), - new MetricDimension() - .withName("bkbfkgukdkex") - .withDisplayName("pofm") - .withInternalName("x") - .withToBeExportedForShoebox(false))) - .withEnableRegionalMdmAccount("gddtocj") - .withSourceMdmAccount("hvpmoue") - .withSourceMdmNamespace("dzxibqeojnxqbzvd"), - new MetricSpecification() - .withName("t") - .withDisplayName("deicbtwnpzao") - .withDisplayDescription("uhrhcffcyddgl") - .withUnit("t") - .withCategory("qkwpyeicxmqc") - .withAggregationType("q") - .withSupportedAggregationTypes(Arrays.asList("hix", "igdtopbob", "og", "m")) - .withSupportedTimeGrainTypes(Arrays.asList("a")) - .withFillGapWithZero(true) - .withDimensions( - Arrays - .asList( - new MetricDimension() - .withName("ayvvtpgvdf") - .withDisplayName("otkftutqxlngx") - .withInternalName("fgugnxkrxdqmid") - .withToBeExportedForShoebox(false), - new MetricDimension() - .withName("rvqdra") - .withDisplayName("jybige") - .withInternalName("qfbow") - .withToBeExportedForShoebox(true))) - .withEnableRegionalMdmAccount("yktz") - .withSourceMdmAccount("u") - .withSourceMdmNamespace("wgqyw"), - new MetricSpecification() - .withName("drvyn") - .withDisplayName("gpphrcgyn") - .withDisplayDescription("cpecfvmmcoofs") - .withUnit("zevgb") - .withCategory("jqabcypmivkwlzuv") - .withAggregationType("fwnfnb") - .withSupportedAggregationTypes(Arrays.asList("ionle", "x")) - .withSupportedTimeGrainTypes(Arrays.asList("gtzxdpn")) - .withFillGapWithZero(false) - .withDimensions( - Arrays - .asList( - new MetricDimension() - .withName("rjfeallnwsubisnj") - .withDisplayName("pmng") - .withInternalName("scxaq") - .withToBeExportedForShoebox(true), - new MetricDimension() - .withName("hcbonqvpkvlr") - .withDisplayName("jease") - .withInternalName("heoflokeyyienjbd") - .withToBeExportedForShoebox(true), - new MetricDimension() - .withName("rhpdjpjumas") - .withDisplayName("zj") - .withInternalName("yegu") - .withToBeExportedForShoebox(false), - new MetricDimension() - .withName("xxhejjzzvd") - .withDisplayName("gwdslfhotwm") - .withInternalName("npwlbjnpg") - .withToBeExportedForShoebox(true))) - .withEnableRegionalMdmAccount("adehxnltyfsopp") - .withSourceMdmAccount("uesnzwdejbavo") - .withSourceMdmNamespace("zdmohctbqvu"), - new MetricSpecification() - .withName("xdn") - .withDisplayName("vo") - .withDisplayDescription("ujjugwdkcglh") - .withUnit("azjdyggd") - .withCategory("ixhbkuofqweykhm") - .withAggregationType("evfyexfwhybcib") - .withSupportedAggregationTypes(Arrays.asList("dcsi", "ynnaam", "ectehf")) - .withSupportedTimeGrainTypes(Arrays.asList("cj", "ypvhezrkg")) - .withFillGapWithZero(false) - .withDimensions( - Arrays - .asList( - new MetricDimension() - .withName("fovgmkqsleyyvxy") - .withDisplayName("pkc") - .withInternalName("tpngjcrcczsqpjh") - .withToBeExportedForShoebox(false), - new MetricDimension() - .withName("jvnysounqe") - .withDisplayName("noae") - .withInternalName("fhyhltrpmopjmcma") - .withToBeExportedForShoebox(false), - new MetricDimension() - .withName("thfuiuaodsfcpkvx") - .withDisplayName("puozmyzydag") - .withInternalName("axbezyiuo") - .withToBeExportedForShoebox(true), - new MetricDimension() - .withName("hrdxwzywqsmbs") - .withDisplayName("exim") - .withInternalName("yocf") - .withToBeExportedForShoebox(false))) - .withEnableRegionalMdmAccount("ymddys") - .withSourceMdmAccount("i") - .withSourceMdmNamespace("xhqyudxorrqnb"))); - model = BinaryData.fromObject(model).toObject(ServiceSpecification.class); - Assertions.assertEquals("zzvypyqrimzinp", model.logSpecifications().get(0).name()); - Assertions.assertEquals("wjdk", model.logSpecifications().get(0).displayName()); - Assertions.assertEquals("soodqxhcrmnoh", model.logSpecifications().get(0).blobDuration()); - Assertions.assertEquals("oq", model.metricSpecifications().get(0).name()); - Assertions.assertEquals("mkljavb", model.metricSpecifications().get(0).displayName()); - Assertions.assertEquals("dtqajzyulpkudj", model.metricSpecifications().get(0).displayDescription()); - Assertions.assertEquals("lkhbz", model.metricSpecifications().get(0).unit()); - Assertions.assertEquals("epgzgqexz", model.metricSpecifications().get(0).category()); - Assertions.assertEquals("c", model.metricSpecifications().get(0).aggregationType()); - Assertions.assertEquals("paierh", model.metricSpecifications().get(0).supportedAggregationTypes().get(0)); - Assertions.assertEquals("sglumma", model.metricSpecifications().get(0).supportedTimeGrainTypes().get(0)); - Assertions.assertEquals(false, model.metricSpecifications().get(0).fillGapWithZero()); - Assertions.assertEquals("okaj", model.metricSpecifications().get(0).dimensions().get(0).name()); - Assertions.assertEquals("npime", model.metricSpecifications().get(0).dimensions().get(0).displayName()); - Assertions.assertEquals("stxgc", model.metricSpecifications().get(0).dimensions().get(0).internalName()); - Assertions - .assertEquals(false, model.metricSpecifications().get(0).dimensions().get(0).toBeExportedForShoebox()); - Assertions.assertEquals("gddtocj", model.metricSpecifications().get(0).enableRegionalMdmAccount()); - Assertions.assertEquals("hvpmoue", model.metricSpecifications().get(0).sourceMdmAccount()); - Assertions.assertEquals("dzxibqeojnxqbzvd", model.metricSpecifications().get(0).sourceMdmNamespace()); - } -} diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/SkuTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/SkuTests.java deleted file mode 100644 index 01aed020e20b1..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/SkuTests.java +++ /dev/null @@ -1,24 +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.avs.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.avs.models.Sku; -import org.junit.jupiter.api.Assertions; - -public final class SkuTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - Sku model = BinaryData.fromString("{\"name\":\"typmrbpizcdrqjsd\"}").toObject(Sku.class); - Assertions.assertEquals("typmrbpizcdrqjsd", model.name()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - Sku model = new Sku().withName("typmrbpizcdrqjsd"); - model = BinaryData.fromObject(model).toObject(Sku.class); - Assertions.assertEquals("typmrbpizcdrqjsd", model.name()); - } -} diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/TrialInnerTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/TrialInnerTests.java deleted file mode 100644 index 6e6ee4c3362de..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/TrialInnerTests.java +++ /dev/null @@ -1,24 +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.avs.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.avs.fluent.models.TrialInner; - -public final class TrialInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - TrialInner model = - BinaryData - .fromString("{\"status\":\"TrialAvailable\",\"availableHosts\":1342514759}") - .toObject(TrialInner.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - TrialInner model = new TrialInner(); - model = BinaryData.fromObject(model).toObject(TrialInner.class); - } -} diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/VirtualMachineInnerTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/VirtualMachineInnerTests.java deleted file mode 100644 index f9856ed6f15bc..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/VirtualMachineInnerTests.java +++ /dev/null @@ -1,25 +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.avs.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.avs.fluent.models.VirtualMachineInner; - -public final class VirtualMachineInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - VirtualMachineInner model = - BinaryData - .fromString( - "{\"properties\":{\"displayName\":\"phvwauyqncygu\",\"moRefId\":\"vipmdscwxqupevzh\",\"folderPath\":\"totxhojujb\",\"restrictMovement\":\"Disabled\"},\"id\":\"lmcuvhixb\",\"name\":\"xyfwnylrcool\",\"type\":\"ttpkiwkkbnujrywv\"}") - .toObject(VirtualMachineInner.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - VirtualMachineInner model = new VirtualMachineInner(); - model = BinaryData.fromObject(model).toObject(VirtualMachineInner.class); - } -} diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/VirtualMachinePropertiesTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/VirtualMachinePropertiesTests.java deleted file mode 100644 index 0ec626792840c..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/VirtualMachinePropertiesTests.java +++ /dev/null @@ -1,25 +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.avs.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.avs.fluent.models.VirtualMachineProperties; - -public final class VirtualMachinePropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - VirtualMachineProperties model = - BinaryData - .fromString( - "{\"displayName\":\"lbfpncurd\",\"moRefId\":\"wiithtywub\",\"folderPath\":\"bihwqknfdnt\",\"restrictMovement\":\"Disabled\"}") - .toObject(VirtualMachineProperties.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - VirtualMachineProperties model = new VirtualMachineProperties(); - model = BinaryData.fromObject(model).toObject(VirtualMachineProperties.class); - } -} diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/VirtualMachineRestrictMovementTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/VirtualMachineRestrictMovementTests.java deleted file mode 100644 index 94e1077ae6668..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/VirtualMachineRestrictMovementTests.java +++ /dev/null @@ -1,27 +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.avs.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.avs.models.VirtualMachineRestrictMovement; -import com.azure.resourcemanager.avs.models.VirtualMachineRestrictMovementState; -import org.junit.jupiter.api.Assertions; - -public final class VirtualMachineRestrictMovementTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - VirtualMachineRestrictMovement model = - BinaryData.fromString("{\"restrictMovement\":\"Disabled\"}").toObject(VirtualMachineRestrictMovement.class); - Assertions.assertEquals(VirtualMachineRestrictMovementState.DISABLED, model.restrictMovement()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - VirtualMachineRestrictMovement model = - new VirtualMachineRestrictMovement().withRestrictMovement(VirtualMachineRestrictMovementState.DISABLED); - model = BinaryData.fromObject(model).toObject(VirtualMachineRestrictMovement.class); - Assertions.assertEquals(VirtualMachineRestrictMovementState.DISABLED, model.restrictMovement()); - } -} diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/VirtualMachinesGetWithResponseMockTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/VirtualMachinesGetWithResponseMockTests.java deleted file mode 100644 index 33208b5073184..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/VirtualMachinesGetWithResponseMockTests.java +++ /dev/null @@ -1,67 +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.avs.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.avs.AvsManager; -import com.azure.resourcemanager.avs.models.VirtualMachine; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class VirtualMachinesGetWithResponseMockTests { - @Test - public void testGetWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"properties\":{\"displayName\":\"mozusgzvlnsnnjz\",\"moRefId\":\"afolpymwamxqzrag\",\"folderPath\":\"dphtv\",\"restrictMovement\":\"Enabled\"},\"id\":\"a\",\"name\":\"vl\",\"type\":\"jchcsrlzknmzla\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - AvsManager manager = - AvsManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - VirtualMachine response = - manager - .virtualMachines() - .getWithResponse("jafi", "lhguyn", "chl", "mltx", com.azure.core.util.Context.NONE) - .getValue(); - } -} diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/VirtualMachinesListMockTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/VirtualMachinesListMockTests.java deleted file mode 100644 index cb54ad355ac41..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/VirtualMachinesListMockTests.java +++ /dev/null @@ -1,65 +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.avs.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.avs.AvsManager; -import com.azure.resourcemanager.avs.models.VirtualMachine; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class VirtualMachinesListMockTests { - @Test - public void testList() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"value\":[{\"properties\":{\"displayName\":\"zolxrzvhqjwtr\",\"moRefId\":\"gv\",\"folderPath\":\"pcrrk\",\"restrictMovement\":\"Enabled\"},\"id\":\"w\",\"name\":\"mjsmwr\",\"type\":\"kcdxfzzzw\"}]}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - AvsManager manager = - AvsManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = - manager.virtualMachines().list("ovvtzejetjkln", "ikyju", "k", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/VirtualMachinesListTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/VirtualMachinesListTests.java deleted file mode 100644 index fef84378bd11d..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/VirtualMachinesListTests.java +++ /dev/null @@ -1,25 +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.avs.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.avs.models.VirtualMachinesList; - -public final class VirtualMachinesListTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - VirtualMachinesList model = - BinaryData - .fromString( - "{\"value\":[{\"properties\":{\"displayName\":\"wuenvr\",\"moRefId\":\"yo\",\"folderPath\":\"ibreb\",\"restrictMovement\":\"Disabled\"},\"id\":\"ysjkixqtnqttez\",\"name\":\"wfff\",\"type\":\"akpjpqqmtedlt\"}],\"nextLink\":\"jihy\"}") - .toObject(VirtualMachinesList.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - VirtualMachinesList model = new VirtualMachinesList(); - model = BinaryData.fromObject(model).toObject(VirtualMachinesList.class); - } -} diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/VmHostPlacementPolicyPropertiesTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/VmHostPlacementPolicyPropertiesTests.java deleted file mode 100644 index 4edc668ea01f3..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/VmHostPlacementPolicyPropertiesTests.java +++ /dev/null @@ -1,53 +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.avs.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.avs.models.AffinityStrength; -import com.azure.resourcemanager.avs.models.AffinityType; -import com.azure.resourcemanager.avs.models.AzureHybridBenefitType; -import com.azure.resourcemanager.avs.models.PlacementPolicyState; -import com.azure.resourcemanager.avs.models.VmHostPlacementPolicyProperties; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class VmHostPlacementPolicyPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - VmHostPlacementPolicyProperties model = - BinaryData - .fromString( - "{\"type\":\"VmHost\",\"vmMembers\":[\"ffukiscvw\"],\"hostMembers\":[\"hwplefaxvx\",\"l\",\"btgn\",\"nzeyqxtjj\"],\"affinityType\":\"Affinity\",\"affinityStrength\":\"Should\",\"azureHybridBenefitType\":\"SqlHost\",\"state\":\"Disabled\",\"displayName\":\"vodggxdbee\",\"provisioningState\":\"Building\"}") - .toObject(VmHostPlacementPolicyProperties.class); - Assertions.assertEquals(PlacementPolicyState.DISABLED, model.state()); - Assertions.assertEquals("vodggxdbee", model.displayName()); - Assertions.assertEquals("ffukiscvw", model.vmMembers().get(0)); - Assertions.assertEquals("hwplefaxvx", model.hostMembers().get(0)); - Assertions.assertEquals(AffinityType.AFFINITY, model.affinityType()); - Assertions.assertEquals(AffinityStrength.SHOULD, model.affinityStrength()); - Assertions.assertEquals(AzureHybridBenefitType.SQL_HOST, model.azureHybridBenefitType()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - VmHostPlacementPolicyProperties model = - new VmHostPlacementPolicyProperties() - .withState(PlacementPolicyState.DISABLED) - .withDisplayName("vodggxdbee") - .withVmMembers(Arrays.asList("ffukiscvw")) - .withHostMembers(Arrays.asList("hwplefaxvx", "l", "btgn", "nzeyqxtjj")) - .withAffinityType(AffinityType.AFFINITY) - .withAffinityStrength(AffinityStrength.SHOULD) - .withAzureHybridBenefitType(AzureHybridBenefitType.SQL_HOST); - model = BinaryData.fromObject(model).toObject(VmHostPlacementPolicyProperties.class); - Assertions.assertEquals(PlacementPolicyState.DISABLED, model.state()); - Assertions.assertEquals("vodggxdbee", model.displayName()); - Assertions.assertEquals("ffukiscvw", model.vmMembers().get(0)); - Assertions.assertEquals("hwplefaxvx", model.hostMembers().get(0)); - Assertions.assertEquals(AffinityType.AFFINITY, model.affinityType()); - Assertions.assertEquals(AffinityStrength.SHOULD, model.affinityStrength()); - Assertions.assertEquals(AzureHybridBenefitType.SQL_HOST, model.azureHybridBenefitType()); - } -} diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/VmPlacementPolicyPropertiesTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/VmPlacementPolicyPropertiesTests.java deleted file mode 100644 index 2c671318e23b5..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/VmPlacementPolicyPropertiesTests.java +++ /dev/null @@ -1,42 +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.avs.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.avs.models.AffinityType; -import com.azure.resourcemanager.avs.models.PlacementPolicyState; -import com.azure.resourcemanager.avs.models.VmPlacementPolicyProperties; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class VmPlacementPolicyPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - VmPlacementPolicyProperties model = - BinaryData - .fromString( - "{\"type\":\"VmVm\",\"vmMembers\":[\"xg\",\"moy\",\"cdyuibhmfdnbzyd\",\"f\"],\"affinityType\":\"AntiAffinity\",\"state\":\"Enabled\",\"displayName\":\"aeoisrvh\",\"provisioningState\":\"Succeeded\"}") - .toObject(VmPlacementPolicyProperties.class); - Assertions.assertEquals(PlacementPolicyState.ENABLED, model.state()); - Assertions.assertEquals("aeoisrvh", model.displayName()); - Assertions.assertEquals("xg", model.vmMembers().get(0)); - Assertions.assertEquals(AffinityType.ANTI_AFFINITY, model.affinityType()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - VmPlacementPolicyProperties model = - new VmPlacementPolicyProperties() - .withState(PlacementPolicyState.ENABLED) - .withDisplayName("aeoisrvh") - .withVmMembers(Arrays.asList("xg", "moy", "cdyuibhmfdnbzyd", "f")) - .withAffinityType(AffinityType.ANTI_AFFINITY); - model = BinaryData.fromObject(model).toObject(VmPlacementPolicyProperties.class); - Assertions.assertEquals(PlacementPolicyState.ENABLED, model.state()); - Assertions.assertEquals("aeoisrvh", model.displayName()); - Assertions.assertEquals("xg", model.vmMembers().get(0)); - Assertions.assertEquals(AffinityType.ANTI_AFFINITY, model.affinityType()); - } -} diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkDhcpEntityTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkDhcpEntityTests.java deleted file mode 100644 index 76e320b52fbbb..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkDhcpEntityTests.java +++ /dev/null @@ -1,31 +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.avs.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.avs.models.WorkloadNetworkDhcpEntity; -import org.junit.jupiter.api.Assertions; - -public final class WorkloadNetworkDhcpEntityTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - WorkloadNetworkDhcpEntity model = - BinaryData - .fromString( - "{\"dhcpType\":\"WorkloadNetworkDhcpEntity\",\"displayName\":\"ph\",\"segments\":[\"l\",\"jrvxaglrv\"],\"provisioningState\":\"Building\",\"revision\":6059783226180243872}") - .toObject(WorkloadNetworkDhcpEntity.class); - Assertions.assertEquals("ph", model.displayName()); - Assertions.assertEquals(6059783226180243872L, model.revision()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - WorkloadNetworkDhcpEntity model = - new WorkloadNetworkDhcpEntity().withDisplayName("ph").withRevision(6059783226180243872L); - model = BinaryData.fromObject(model).toObject(WorkloadNetworkDhcpEntity.class); - Assertions.assertEquals("ph", model.displayName()); - Assertions.assertEquals(6059783226180243872L, model.revision()); - } -} diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkDhcpInnerTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkDhcpInnerTests.java deleted file mode 100644 index 85f027b648e83..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkDhcpInnerTests.java +++ /dev/null @@ -1,34 +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.avs.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.avs.fluent.models.WorkloadNetworkDhcpInner; -import com.azure.resourcemanager.avs.models.WorkloadNetworkDhcpEntity; -import org.junit.jupiter.api.Assertions; - -public final class WorkloadNetworkDhcpInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - WorkloadNetworkDhcpInner model = - BinaryData - .fromString( - "{\"properties\":{\"dhcpType\":\"WorkloadNetworkDhcpEntity\",\"displayName\":\"jhfjxwm\",\"segments\":[\"kfoqreyfkzikfj\",\"wneaiv\"],\"provisioningState\":\"Building\",\"revision\":8376736309034828237},\"id\":\"pcirelsfeaen\",\"name\":\"abfatkl\",\"type\":\"dxbjhwuaanozj\"}") - .toObject(WorkloadNetworkDhcpInner.class); - Assertions.assertEquals("jhfjxwm", model.properties().displayName()); - Assertions.assertEquals(8376736309034828237L, model.properties().revision()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - WorkloadNetworkDhcpInner model = - new WorkloadNetworkDhcpInner() - .withProperties( - new WorkloadNetworkDhcpEntity().withDisplayName("jhfjxwm").withRevision(8376736309034828237L)); - model = BinaryData.fromObject(model).toObject(WorkloadNetworkDhcpInner.class); - Assertions.assertEquals("jhfjxwm", model.properties().displayName()); - Assertions.assertEquals(8376736309034828237L, model.properties().revision()); - } -} diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkDhcpListTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkDhcpListTests.java deleted file mode 100644 index c7d1d97d6f929..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkDhcpListTests.java +++ /dev/null @@ -1,25 +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.avs.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.avs.models.WorkloadNetworkDhcpList; - -public final class WorkloadNetworkDhcpListTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - WorkloadNetworkDhcpList model = - BinaryData - .fromString( - "{\"value\":[{\"properties\":{\"dhcpType\":\"WorkloadNetworkDhcpEntity\",\"displayName\":\"gjltdtbnnhado\",\"segments\":[\"kvci\",\"hnvpamqgxq\",\"u\"],\"provisioningState\":\"Canceled\",\"revision\":5551509476153562500},\"id\":\"ggxkallatmelwuip\",\"name\":\"ccjzkzivgvv\",\"type\":\"nayrhyrnxxmueedn\"},{\"properties\":{\"dhcpType\":\"WorkloadNetworkDhcpEntity\",\"displayName\":\"v\",\"segments\":[\"wq\",\"tchealmf\",\"tdaaygdvwvg\"],\"provisioningState\":\"Updating\",\"revision\":492065479137109444},\"id\":\"xrtfudxep\",\"name\":\"gyqagvrvmnpkuk\",\"type\":\"himdbl\"}],\"nextLink\":\"wi\"}") - .toObject(WorkloadNetworkDhcpList.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - WorkloadNetworkDhcpList model = new WorkloadNetworkDhcpList(); - model = BinaryData.fromObject(model).toObject(WorkloadNetworkDhcpList.class); - } -} diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkDhcpRelayTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkDhcpRelayTests.java deleted file mode 100644 index 43721f4e3aab6..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkDhcpRelayTests.java +++ /dev/null @@ -1,37 +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.avs.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.avs.models.WorkloadNetworkDhcpRelay; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class WorkloadNetworkDhcpRelayTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - WorkloadNetworkDhcpRelay model = - BinaryData - .fromString( - "{\"dhcpType\":\"RELAY\",\"serverAddresses\":[\"fffwafqroudaspav\"],\"displayName\":\"hrv\",\"segments\":[\"n\"],\"provisioningState\":\"Updating\",\"revision\":152087869378436778}") - .toObject(WorkloadNetworkDhcpRelay.class); - Assertions.assertEquals("hrv", model.displayName()); - Assertions.assertEquals(152087869378436778L, model.revision()); - Assertions.assertEquals("fffwafqroudaspav", model.serverAddresses().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - WorkloadNetworkDhcpRelay model = - new WorkloadNetworkDhcpRelay() - .withDisplayName("hrv") - .withRevision(152087869378436778L) - .withServerAddresses(Arrays.asList("fffwafqroudaspav")); - model = BinaryData.fromObject(model).toObject(WorkloadNetworkDhcpRelay.class); - Assertions.assertEquals("hrv", model.displayName()); - Assertions.assertEquals(152087869378436778L, model.revision()); - Assertions.assertEquals("fffwafqroudaspav", model.serverAddresses().get(0)); - } -} diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkDhcpServerTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkDhcpServerTests.java deleted file mode 100644 index ca8a59530d497..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkDhcpServerTests.java +++ /dev/null @@ -1,39 +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.avs.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.avs.models.WorkloadNetworkDhcpServer; -import org.junit.jupiter.api.Assertions; - -public final class WorkloadNetworkDhcpServerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - WorkloadNetworkDhcpServer model = - BinaryData - .fromString( - "{\"dhcpType\":\"SERVER\",\"serverAddress\":\"py\",\"leaseTime\":3485711592453889453,\"displayName\":\"dcnifmz\",\"segments\":[\"ymbrnysuxmpraf\",\"g\"],\"provisioningState\":\"Updating\",\"revision\":8975968727108219865}") - .toObject(WorkloadNetworkDhcpServer.class); - Assertions.assertEquals("dcnifmz", model.displayName()); - Assertions.assertEquals(8975968727108219865L, model.revision()); - Assertions.assertEquals("py", model.serverAddress()); - Assertions.assertEquals(3485711592453889453L, model.leaseTime()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - WorkloadNetworkDhcpServer model = - new WorkloadNetworkDhcpServer() - .withDisplayName("dcnifmz") - .withRevision(8975968727108219865L) - .withServerAddress("py") - .withLeaseTime(3485711592453889453L); - model = BinaryData.fromObject(model).toObject(WorkloadNetworkDhcpServer.class); - Assertions.assertEquals("dcnifmz", model.displayName()); - Assertions.assertEquals(8975968727108219865L, model.revision()); - Assertions.assertEquals("py", model.serverAddress()); - Assertions.assertEquals(3485711592453889453L, model.leaseTime()); - } -} diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkDnsServiceInnerTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkDnsServiceInnerTests.java deleted file mode 100644 index a52c58350e20f..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkDnsServiceInnerTests.java +++ /dev/null @@ -1,47 +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.avs.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.avs.fluent.models.WorkloadNetworkDnsServiceInner; -import com.azure.resourcemanager.avs.models.DnsServiceLogLevelEnum; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class WorkloadNetworkDnsServiceInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - WorkloadNetworkDnsServiceInner model = - BinaryData - .fromString( - "{\"properties\":{\"displayName\":\"wpracstwitykhev\",\"dnsServiceIp\":\"cedcpnmdy\",\"defaultDnsZone\":\"nwzxltjcv\",\"fqdnZones\":[\"tiugcxnav\",\"wxqibyq\",\"nyowxwlmdjrkvfg\"],\"logLevel\":\"DEBUG\",\"status\":\"SUCCESS\",\"provisioningState\":\"Deleting\",\"revision\":5624857824409587662},\"id\":\"cizsjqlhkrribdei\",\"name\":\"qipqkghvxndz\",\"type\":\"mkrefajpjorwkq\"}") - .toObject(WorkloadNetworkDnsServiceInner.class); - Assertions.assertEquals("wpracstwitykhev", model.displayName()); - Assertions.assertEquals("cedcpnmdy", model.dnsServiceIp()); - Assertions.assertEquals("nwzxltjcv", model.defaultDnsZone()); - Assertions.assertEquals("tiugcxnav", model.fqdnZones().get(0)); - Assertions.assertEquals(DnsServiceLogLevelEnum.DEBUG, model.logLevel()); - Assertions.assertEquals(5624857824409587662L, model.revision()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - WorkloadNetworkDnsServiceInner model = - new WorkloadNetworkDnsServiceInner() - .withDisplayName("wpracstwitykhev") - .withDnsServiceIp("cedcpnmdy") - .withDefaultDnsZone("nwzxltjcv") - .withFqdnZones(Arrays.asList("tiugcxnav", "wxqibyq", "nyowxwlmdjrkvfg")) - .withLogLevel(DnsServiceLogLevelEnum.DEBUG) - .withRevision(5624857824409587662L); - model = BinaryData.fromObject(model).toObject(WorkloadNetworkDnsServiceInner.class); - Assertions.assertEquals("wpracstwitykhev", model.displayName()); - Assertions.assertEquals("cedcpnmdy", model.dnsServiceIp()); - Assertions.assertEquals("nwzxltjcv", model.defaultDnsZone()); - Assertions.assertEquals("tiugcxnav", model.fqdnZones().get(0)); - Assertions.assertEquals(DnsServiceLogLevelEnum.DEBUG, model.logLevel()); - Assertions.assertEquals(5624857824409587662L, model.revision()); - } -} diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkDnsServicePropertiesTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkDnsServicePropertiesTests.java deleted file mode 100644 index 1f4984235d63e..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkDnsServicePropertiesTests.java +++ /dev/null @@ -1,47 +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.avs.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.avs.fluent.models.WorkloadNetworkDnsServiceProperties; -import com.azure.resourcemanager.avs.models.DnsServiceLogLevelEnum; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class WorkloadNetworkDnsServicePropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - WorkloadNetworkDnsServiceProperties model = - BinaryData - .fromString( - "{\"displayName\":\"hgbijt\",\"dnsServiceIp\":\"vfxzsjab\",\"defaultDnsZone\":\"systawfsdjp\",\"fqdnZones\":[\"p\"],\"logLevel\":\"WARNING\",\"status\":\"FAILURE\",\"provisioningState\":\"Deleting\",\"revision\":1701030021377266817}") - .toObject(WorkloadNetworkDnsServiceProperties.class); - Assertions.assertEquals("hgbijt", model.displayName()); - Assertions.assertEquals("vfxzsjab", model.dnsServiceIp()); - Assertions.assertEquals("systawfsdjp", model.defaultDnsZone()); - Assertions.assertEquals("p", model.fqdnZones().get(0)); - Assertions.assertEquals(DnsServiceLogLevelEnum.WARNING, model.logLevel()); - Assertions.assertEquals(1701030021377266817L, model.revision()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - WorkloadNetworkDnsServiceProperties model = - new WorkloadNetworkDnsServiceProperties() - .withDisplayName("hgbijt") - .withDnsServiceIp("vfxzsjab") - .withDefaultDnsZone("systawfsdjp") - .withFqdnZones(Arrays.asList("p")) - .withLogLevel(DnsServiceLogLevelEnum.WARNING) - .withRevision(1701030021377266817L); - model = BinaryData.fromObject(model).toObject(WorkloadNetworkDnsServiceProperties.class); - Assertions.assertEquals("hgbijt", model.displayName()); - Assertions.assertEquals("vfxzsjab", model.dnsServiceIp()); - Assertions.assertEquals("systawfsdjp", model.defaultDnsZone()); - Assertions.assertEquals("p", model.fqdnZones().get(0)); - Assertions.assertEquals(DnsServiceLogLevelEnum.WARNING, model.logLevel()); - Assertions.assertEquals(1701030021377266817L, model.revision()); - } -} diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkDnsServicesListTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkDnsServicesListTests.java deleted file mode 100644 index 72ed2e874412a..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkDnsServicesListTests.java +++ /dev/null @@ -1,25 +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.avs.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.avs.models.WorkloadNetworkDnsServicesList; - -public final class WorkloadNetworkDnsServicesListTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - WorkloadNetworkDnsServicesList model = - BinaryData - .fromString( - "{\"value\":[{\"properties\":{\"displayName\":\"msweypqwdxggicc\",\"dnsServiceIp\":\"xqhuexm\",\"defaultDnsZone\":\"tlstvlzywem\",\"fqdnZones\":[\"ncsdtclusiyp\",\"sfgytguslfead\",\"ygqukyhejh\"],\"logLevel\":\"FATAL\",\"status\":\"FAILURE\",\"provisioningState\":\"Deleting\",\"revision\":3624367237798775147},\"id\":\"lppvksrpq\",\"name\":\"ujzra\",\"type\":\"htwdwrftswibyrcd\"}],\"nextLink\":\"h\"}") - .toObject(WorkloadNetworkDnsServicesList.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - WorkloadNetworkDnsServicesList model = new WorkloadNetworkDnsServicesList(); - model = BinaryData.fromObject(model).toObject(WorkloadNetworkDnsServicesList.class); - } -} diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkDnsZoneInnerTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkDnsZoneInnerTests.java deleted file mode 100644 index 042367400bfd9..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkDnsZoneInnerTests.java +++ /dev/null @@ -1,46 +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.avs.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.avs.fluent.models.WorkloadNetworkDnsZoneInner; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class WorkloadNetworkDnsZoneInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - WorkloadNetworkDnsZoneInner model = - BinaryData - .fromString( - "{\"properties\":{\"displayName\":\"gpikpzimejza\",\"domain\":[\"zxiavrm\",\"zonokixrjqci\",\"gzpfrla\"],\"dnsServerIps\":[\"rnwoiindfp\"],\"sourceIp\":\"jylwbtlhflsj\",\"dnsServices\":9210142067978159406,\"provisioningState\":\"Failed\",\"revision\":8719927850018337646},\"id\":\"bgofeljag\",\"name\":\"qmqhldvriii\",\"type\":\"jnalghf\"}") - .toObject(WorkloadNetworkDnsZoneInner.class); - Assertions.assertEquals("gpikpzimejza", model.displayName()); - Assertions.assertEquals("zxiavrm", model.domain().get(0)); - Assertions.assertEquals("rnwoiindfp", model.dnsServerIps().get(0)); - Assertions.assertEquals("jylwbtlhflsj", model.sourceIp()); - Assertions.assertEquals(9210142067978159406L, model.dnsServices()); - Assertions.assertEquals(8719927850018337646L, model.revision()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - WorkloadNetworkDnsZoneInner model = - new WorkloadNetworkDnsZoneInner() - .withDisplayName("gpikpzimejza") - .withDomain(Arrays.asList("zxiavrm", "zonokixrjqci", "gzpfrla")) - .withDnsServerIps(Arrays.asList("rnwoiindfp")) - .withSourceIp("jylwbtlhflsj") - .withDnsServices(9210142067978159406L) - .withRevision(8719927850018337646L); - model = BinaryData.fromObject(model).toObject(WorkloadNetworkDnsZoneInner.class); - Assertions.assertEquals("gpikpzimejza", model.displayName()); - Assertions.assertEquals("zxiavrm", model.domain().get(0)); - Assertions.assertEquals("rnwoiindfp", model.dnsServerIps().get(0)); - Assertions.assertEquals("jylwbtlhflsj", model.sourceIp()); - Assertions.assertEquals(9210142067978159406L, model.dnsServices()); - Assertions.assertEquals(8719927850018337646L, model.revision()); - } -} diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkDnsZonePropertiesTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkDnsZonePropertiesTests.java deleted file mode 100644 index 4e7c1896ea5cf..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkDnsZonePropertiesTests.java +++ /dev/null @@ -1,46 +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.avs.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.avs.fluent.models.WorkloadNetworkDnsZoneProperties; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class WorkloadNetworkDnsZonePropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - WorkloadNetworkDnsZoneProperties model = - BinaryData - .fromString( - "{\"displayName\":\"tvsexsowuel\",\"domain\":[\"hahhxvrhmzkwpj\",\"wws\",\"ughftqsx\",\"qxujxukndxd\"],\"dnsServerIps\":[\"jguufzdm\",\"yqtfihwh\",\"otzi\",\"gamv\"],\"sourceIp\":\"ho\",\"dnsServices\":7727848197027665557,\"provisioningState\":\"Updating\",\"revision\":8365308553932036978}") - .toObject(WorkloadNetworkDnsZoneProperties.class); - Assertions.assertEquals("tvsexsowuel", model.displayName()); - Assertions.assertEquals("hahhxvrhmzkwpj", model.domain().get(0)); - Assertions.assertEquals("jguufzdm", model.dnsServerIps().get(0)); - Assertions.assertEquals("ho", model.sourceIp()); - Assertions.assertEquals(7727848197027665557L, model.dnsServices()); - Assertions.assertEquals(8365308553932036978L, model.revision()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - WorkloadNetworkDnsZoneProperties model = - new WorkloadNetworkDnsZoneProperties() - .withDisplayName("tvsexsowuel") - .withDomain(Arrays.asList("hahhxvrhmzkwpj", "wws", "ughftqsx", "qxujxukndxd")) - .withDnsServerIps(Arrays.asList("jguufzdm", "yqtfihwh", "otzi", "gamv")) - .withSourceIp("ho") - .withDnsServices(7727848197027665557L) - .withRevision(8365308553932036978L); - model = BinaryData.fromObject(model).toObject(WorkloadNetworkDnsZoneProperties.class); - Assertions.assertEquals("tvsexsowuel", model.displayName()); - Assertions.assertEquals("hahhxvrhmzkwpj", model.domain().get(0)); - Assertions.assertEquals("jguufzdm", model.dnsServerIps().get(0)); - Assertions.assertEquals("ho", model.sourceIp()); - Assertions.assertEquals(7727848197027665557L, model.dnsServices()); - Assertions.assertEquals(8365308553932036978L, model.revision()); - } -} diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkDnsZonesListTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkDnsZonesListTests.java deleted file mode 100644 index d3839a2353d65..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkDnsZonesListTests.java +++ /dev/null @@ -1,25 +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.avs.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.avs.models.WorkloadNetworkDnsZonesList; - -public final class WorkloadNetworkDnsZonesListTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - WorkloadNetworkDnsZonesList model = - BinaryData - .fromString( - "{\"value\":[{\"properties\":{\"displayName\":\"abudurgk\",\"domain\":[\"o\",\"zhjjklffhmouwq\",\"gzrf\"],\"dnsServerIps\":[\"yebizikayuh\",\"lbjbsyb\",\"qwrvtldgmfp\",\"vm\"],\"sourceIp\":\"paslthaqfxssmwu\",\"dnsServices\":5857300583432232826,\"provisioningState\":\"Updating\",\"revision\":8587897237189545303},\"id\":\"drhneuyow\",\"name\":\"kdw\",\"type\":\"t\"}],\"nextLink\":\"ib\"}") - .toObject(WorkloadNetworkDnsZonesList.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - WorkloadNetworkDnsZonesList model = new WorkloadNetworkDnsZonesList(); - model = BinaryData.fromObject(model).toObject(WorkloadNetworkDnsZonesList.class); - } -} diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkGatewayInnerTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkGatewayInnerTests.java deleted file mode 100644 index ba495306defb1..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkGatewayInnerTests.java +++ /dev/null @@ -1,28 +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.avs.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.avs.fluent.models.WorkloadNetworkGatewayInner; -import org.junit.jupiter.api.Assertions; - -public final class WorkloadNetworkGatewayInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - WorkloadNetworkGatewayInner model = - BinaryData - .fromString( - "{\"properties\":{\"displayName\":\"yxxrwlycoduh\",\"path\":\"xkgymareqnajxqu\"},\"id\":\"jhkycub\",\"name\":\"ddg\",\"type\":\"sofwqmzqalkrmnji\"}") - .toObject(WorkloadNetworkGatewayInner.class); - Assertions.assertEquals("yxxrwlycoduh", model.displayName()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - WorkloadNetworkGatewayInner model = new WorkloadNetworkGatewayInner().withDisplayName("yxxrwlycoduh"); - model = BinaryData.fromObject(model).toObject(WorkloadNetworkGatewayInner.class); - Assertions.assertEquals("yxxrwlycoduh", model.displayName()); - } -} diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkGatewayListTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkGatewayListTests.java deleted file mode 100644 index 6fbbbdafa2d64..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkGatewayListTests.java +++ /dev/null @@ -1,25 +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.avs.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.avs.models.WorkloadNetworkGatewayList; - -public final class WorkloadNetworkGatewayListTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - WorkloadNetworkGatewayList model = - BinaryData - .fromString( - "{\"value\":[{\"properties\":{\"displayName\":\"tcs\",\"path\":\"cktqumiekkezzi\"},\"id\":\"hlyfjhdgqgg\",\"name\":\"bdunygaeqid\",\"type\":\"qfatpxllrxcyjm\"}],\"nextLink\":\"dsuvarmywdmjsjqb\"}") - .toObject(WorkloadNetworkGatewayList.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - WorkloadNetworkGatewayList model = new WorkloadNetworkGatewayList(); - model = BinaryData.fromObject(model).toObject(WorkloadNetworkGatewayList.class); - } -} diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkGatewayPropertiesTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkGatewayPropertiesTests.java deleted file mode 100644 index 6db7c07b38150..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkGatewayPropertiesTests.java +++ /dev/null @@ -1,27 +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.avs.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.avs.fluent.models.WorkloadNetworkGatewayProperties; -import org.junit.jupiter.api.Assertions; - -public final class WorkloadNetworkGatewayPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - WorkloadNetworkGatewayProperties model = - BinaryData - .fromString("{\"displayName\":\"xacqqudfnbyx\",\"path\":\"aabjyvayffimrz\"}") - .toObject(WorkloadNetworkGatewayProperties.class); - Assertions.assertEquals("xacqqudfnbyx", model.displayName()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - WorkloadNetworkGatewayProperties model = new WorkloadNetworkGatewayProperties().withDisplayName("xacqqudfnbyx"); - model = BinaryData.fromObject(model).toObject(WorkloadNetworkGatewayProperties.class); - Assertions.assertEquals("xacqqudfnbyx", model.displayName()); - } -} diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkInnerTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkInnerTests.java deleted file mode 100644 index df7396fca3bf4..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkInnerTests.java +++ /dev/null @@ -1,24 +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.avs.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.avs.fluent.models.WorkloadNetworkInner; - -public final class WorkloadNetworkInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - WorkloadNetworkInner model = - BinaryData - .fromString("{\"id\":\"wab\",\"name\":\"ets\",\"type\":\"hszhedplvwiwu\"}") - .toObject(WorkloadNetworkInner.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - WorkloadNetworkInner model = new WorkloadNetworkInner(); - model = BinaryData.fromObject(model).toObject(WorkloadNetworkInner.class); - } -} diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkListTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkListTests.java deleted file mode 100644 index 4fa6a4b955be5..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkListTests.java +++ /dev/null @@ -1,25 +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.avs.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.avs.models.WorkloadNetworkList; - -public final class WorkloadNetworkListTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - WorkloadNetworkList model = - BinaryData - .fromString( - "{\"value\":[{\"id\":\"mbes\",\"name\":\"dnkwwtppjflcxog\",\"type\":\"okonzmnsikvmkqz\"},{\"id\":\"qqkdltfzxmhhvhgu\",\"name\":\"eodkwobda\",\"type\":\"xtibqdxbxwakbog\"},{\"id\":\"xndlkzgxhu\",\"name\":\"iplbpodxunkbebxm\",\"type\":\"byyntwlrbqt\"}],\"nextLink\":\"ievseotgqrllt\"}") - .toObject(WorkloadNetworkList.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - WorkloadNetworkList model = new WorkloadNetworkList(); - model = BinaryData.fromObject(model).toObject(WorkloadNetworkList.class); - } -} diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkPortMirroringInnerTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkPortMirroringInnerTests.java deleted file mode 100644 index ec3d8119b707e..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkPortMirroringInnerTests.java +++ /dev/null @@ -1,43 +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.avs.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.avs.fluent.models.WorkloadNetworkPortMirroringInner; -import com.azure.resourcemanager.avs.models.PortMirroringDirectionEnum; -import org.junit.jupiter.api.Assertions; - -public final class WorkloadNetworkPortMirroringInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - WorkloadNetworkPortMirroringInner model = - BinaryData - .fromString( - "{\"properties\":{\"displayName\":\"bzkfzbeyvpn\",\"direction\":\"BIDIRECTIONAL\",\"source\":\"invkjjxdxrbuu\",\"destination\":\"clewyhm\",\"status\":\"FAILURE\",\"provisioningState\":\"Building\",\"revision\":4379393753371043787},\"id\":\"ofncckwyfzqwhxxb\",\"name\":\"yq\",\"type\":\"xzfe\"}") - .toObject(WorkloadNetworkPortMirroringInner.class); - Assertions.assertEquals("bzkfzbeyvpn", model.displayName()); - Assertions.assertEquals(PortMirroringDirectionEnum.BIDIRECTIONAL, model.direction()); - Assertions.assertEquals("invkjjxdxrbuu", model.source()); - Assertions.assertEquals("clewyhm", model.destination()); - Assertions.assertEquals(4379393753371043787L, model.revision()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - WorkloadNetworkPortMirroringInner model = - new WorkloadNetworkPortMirroringInner() - .withDisplayName("bzkfzbeyvpn") - .withDirection(PortMirroringDirectionEnum.BIDIRECTIONAL) - .withSource("invkjjxdxrbuu") - .withDestination("clewyhm") - .withRevision(4379393753371043787L); - model = BinaryData.fromObject(model).toObject(WorkloadNetworkPortMirroringInner.class); - Assertions.assertEquals("bzkfzbeyvpn", model.displayName()); - Assertions.assertEquals(PortMirroringDirectionEnum.BIDIRECTIONAL, model.direction()); - Assertions.assertEquals("invkjjxdxrbuu", model.source()); - Assertions.assertEquals("clewyhm", model.destination()); - Assertions.assertEquals(4379393753371043787L, model.revision()); - } -} diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkPortMirroringListTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkPortMirroringListTests.java deleted file mode 100644 index df32ecf00e27c..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkPortMirroringListTests.java +++ /dev/null @@ -1,25 +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.avs.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.avs.models.WorkloadNetworkPortMirroringList; - -public final class WorkloadNetworkPortMirroringListTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - WorkloadNetworkPortMirroringList model = - BinaryData - .fromString( - "{\"value\":[{\"properties\":{\"displayName\":\"ogs\",\"direction\":\"EGRESS\",\"source\":\"vfdnwnwmewzsyyce\",\"destination\":\"soibjudpfrx\",\"status\":\"FAILURE\",\"provisioningState\":\"Failed\",\"revision\":1649253814789212920},\"id\":\"tdwkqbrq\",\"name\":\"bpaxhexiilivpdt\",\"type\":\"irqtdqoa\"},{\"properties\":{\"displayName\":\"uzf\",\"direction\":\"INGRESS\",\"source\":\"yfxrx\",\"destination\":\"eptra\",\"status\":\"SUCCESS\",\"provisioningState\":\"Building\",\"revision\":6292061975589121523},\"id\":\"nwxuqlcvydyp\",\"name\":\"tdooaoj\",\"type\":\"niodkooeb\"},{\"properties\":{\"displayName\":\"jhemms\",\"direction\":\"INGRESS\",\"source\":\"c\",\"destination\":\"dtjinfw\",\"status\":\"SUCCESS\",\"provisioningState\":\"Canceled\",\"revision\":9167541690912774024},\"id\":\"jvefkdlfoakggkfp\",\"name\":\"gaowpulpqblylsyx\",\"type\":\"qjnsjervtia\"}],\"nextLink\":\"sdszue\"}") - .toObject(WorkloadNetworkPortMirroringList.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - WorkloadNetworkPortMirroringList model = new WorkloadNetworkPortMirroringList(); - model = BinaryData.fromObject(model).toObject(WorkloadNetworkPortMirroringList.class); - } -} diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkPortMirroringPropertiesTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkPortMirroringPropertiesTests.java deleted file mode 100644 index 37d28b7f126df..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkPortMirroringPropertiesTests.java +++ /dev/null @@ -1,43 +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.avs.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.avs.fluent.models.WorkloadNetworkPortMirroringProperties; -import com.azure.resourcemanager.avs.models.PortMirroringDirectionEnum; -import org.junit.jupiter.api.Assertions; - -public final class WorkloadNetworkPortMirroringPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - WorkloadNetworkPortMirroringProperties model = - BinaryData - .fromString( - "{\"displayName\":\"tpp\",\"direction\":\"BIDIRECTIONAL\",\"source\":\"xorjaltolmncwsob\",\"destination\":\"csdbnwdcfhuc\",\"status\":\"FAILURE\",\"provisioningState\":\"Failed\",\"revision\":6962670154943364996}") - .toObject(WorkloadNetworkPortMirroringProperties.class); - Assertions.assertEquals("tpp", model.displayName()); - Assertions.assertEquals(PortMirroringDirectionEnum.BIDIRECTIONAL, model.direction()); - Assertions.assertEquals("xorjaltolmncwsob", model.source()); - Assertions.assertEquals("csdbnwdcfhuc", model.destination()); - Assertions.assertEquals(6962670154943364996L, model.revision()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - WorkloadNetworkPortMirroringProperties model = - new WorkloadNetworkPortMirroringProperties() - .withDisplayName("tpp") - .withDirection(PortMirroringDirectionEnum.BIDIRECTIONAL) - .withSource("xorjaltolmncwsob") - .withDestination("csdbnwdcfhuc") - .withRevision(6962670154943364996L); - model = BinaryData.fromObject(model).toObject(WorkloadNetworkPortMirroringProperties.class); - Assertions.assertEquals("tpp", model.displayName()); - Assertions.assertEquals(PortMirroringDirectionEnum.BIDIRECTIONAL, model.direction()); - Assertions.assertEquals("xorjaltolmncwsob", model.source()); - Assertions.assertEquals("csdbnwdcfhuc", model.destination()); - Assertions.assertEquals(6962670154943364996L, model.revision()); - } -} diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkPublicIPsListTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkPublicIPsListTests.java deleted file mode 100644 index b5a2a76482159..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkPublicIPsListTests.java +++ /dev/null @@ -1,25 +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.avs.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.avs.models.WorkloadNetworkPublicIPsList; - -public final class WorkloadNetworkPublicIPsListTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - WorkloadNetworkPublicIPsList model = - BinaryData - .fromString( - "{\"value\":[{\"properties\":{\"displayName\":\"kfwynw\",\"numberOfPublicIPs\":4797206470804726594,\"publicIPBlock\":\"kayh\",\"provisioningState\":\"Deleting\"},\"id\":\"vyqia\",\"name\":\"kzwpcnpw\",\"type\":\"cjaesgvvs\"}],\"nextLink\":\"yajguqfhwygzlv\"}") - .toObject(WorkloadNetworkPublicIPsList.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - WorkloadNetworkPublicIPsList model = new WorkloadNetworkPublicIPsList(); - model = BinaryData.fromObject(model).toObject(WorkloadNetworkPublicIPsList.class); - } -} diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkPublicIpInnerTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkPublicIpInnerTests.java deleted file mode 100644 index 1f254c13ba071..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkPublicIpInnerTests.java +++ /dev/null @@ -1,33 +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.avs.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.avs.fluent.models.WorkloadNetworkPublicIpInner; -import org.junit.jupiter.api.Assertions; - -public final class WorkloadNetworkPublicIpInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - WorkloadNetworkPublicIpInner model = - BinaryData - .fromString( - "{\"properties\":{\"displayName\":\"fxusemdwzr\",\"numberOfPublicIPs\":3024534869961182139,\"publicIPBlock\":\"fcqdpsq\",\"provisioningState\":\"Building\"},\"id\":\"psvuoymgc\",\"name\":\"elvezrypq\",\"type\":\"mfe\"}") - .toObject(WorkloadNetworkPublicIpInner.class); - Assertions.assertEquals("fxusemdwzr", model.displayName()); - Assertions.assertEquals(3024534869961182139L, model.numberOfPublicIPs()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - WorkloadNetworkPublicIpInner model = - new WorkloadNetworkPublicIpInner() - .withDisplayName("fxusemdwzr") - .withNumberOfPublicIPs(3024534869961182139L); - model = BinaryData.fromObject(model).toObject(WorkloadNetworkPublicIpInner.class); - Assertions.assertEquals("fxusemdwzr", model.displayName()); - Assertions.assertEquals(3024534869961182139L, model.numberOfPublicIPs()); - } -} diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkPublicIpPropertiesTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkPublicIpPropertiesTests.java deleted file mode 100644 index 7830c039ac87d..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkPublicIpPropertiesTests.java +++ /dev/null @@ -1,33 +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.avs.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.avs.fluent.models.WorkloadNetworkPublicIpProperties; -import org.junit.jupiter.api.Assertions; - -public final class WorkloadNetworkPublicIpPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - WorkloadNetworkPublicIpProperties model = - BinaryData - .fromString( - "{\"displayName\":\"erqwkyhkobopg\",\"numberOfPublicIPs\":3864953731732888830,\"publicIPBlock\":\"wep\",\"provisioningState\":\"Building\"}") - .toObject(WorkloadNetworkPublicIpProperties.class); - Assertions.assertEquals("erqwkyhkobopg", model.displayName()); - Assertions.assertEquals(3864953731732888830L, model.numberOfPublicIPs()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - WorkloadNetworkPublicIpProperties model = - new WorkloadNetworkPublicIpProperties() - .withDisplayName("erqwkyhkobopg") - .withNumberOfPublicIPs(3864953731732888830L); - model = BinaryData.fromObject(model).toObject(WorkloadNetworkPublicIpProperties.class); - Assertions.assertEquals("erqwkyhkobopg", model.displayName()); - Assertions.assertEquals(3864953731732888830L, model.numberOfPublicIPs()); - } -} diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkSegmentInnerTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkSegmentInnerTests.java deleted file mode 100644 index 6f4a40d50b2b0..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkSegmentInnerTests.java +++ /dev/null @@ -1,46 +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.avs.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.avs.fluent.models.WorkloadNetworkSegmentInner; -import com.azure.resourcemanager.avs.models.WorkloadNetworkSegmentSubnet; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class WorkloadNetworkSegmentInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - WorkloadNetworkSegmentInner model = - BinaryData - .fromString( - "{\"properties\":{\"displayName\":\"k\",\"connectedGateway\":\"oxafn\",\"subnet\":{\"dhcpRanges\":[\"ichkoymkcdyhb\",\"kkpwdreqnovvq\",\"ovljxywsu\"],\"gatewayAddress\":\"yrs\"},\"portVif\":[{\"portName\":\"tgadgvraeaen\"},{\"portName\":\"nzar\"},{\"portName\":\"lquuijfqkacewii\"}],\"status\":\"SUCCESS\",\"provisioningState\":\"Succeeded\",\"revision\":4401878821743951844},\"id\":\"wwiftohqkvpuv\",\"name\":\"sgplsakn\",\"type\":\"n\"}") - .toObject(WorkloadNetworkSegmentInner.class); - Assertions.assertEquals("k", model.displayName()); - Assertions.assertEquals("oxafn", model.connectedGateway()); - Assertions.assertEquals("ichkoymkcdyhb", model.subnet().dhcpRanges().get(0)); - Assertions.assertEquals("yrs", model.subnet().gatewayAddress()); - Assertions.assertEquals(4401878821743951844L, model.revision()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - WorkloadNetworkSegmentInner model = - new WorkloadNetworkSegmentInner() - .withDisplayName("k") - .withConnectedGateway("oxafn") - .withSubnet( - new WorkloadNetworkSegmentSubnet() - .withDhcpRanges(Arrays.asList("ichkoymkcdyhb", "kkpwdreqnovvq", "ovljxywsu")) - .withGatewayAddress("yrs")) - .withRevision(4401878821743951844L); - model = BinaryData.fromObject(model).toObject(WorkloadNetworkSegmentInner.class); - Assertions.assertEquals("k", model.displayName()); - Assertions.assertEquals("oxafn", model.connectedGateway()); - Assertions.assertEquals("ichkoymkcdyhb", model.subnet().dhcpRanges().get(0)); - Assertions.assertEquals("yrs", model.subnet().gatewayAddress()); - Assertions.assertEquals(4401878821743951844L, model.revision()); - } -} diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkSegmentPortVifTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkSegmentPortVifTests.java deleted file mode 100644 index 6de67bafb097c..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkSegmentPortVifTests.java +++ /dev/null @@ -1,25 +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.avs.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.avs.models.WorkloadNetworkSegmentPortVif; -import org.junit.jupiter.api.Assertions; - -public final class WorkloadNetworkSegmentPortVifTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - WorkloadNetworkSegmentPortVif model = - BinaryData.fromString("{\"portName\":\"cvokotllxdyhg\"}").toObject(WorkloadNetworkSegmentPortVif.class); - Assertions.assertEquals("cvokotllxdyhg", model.portName()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - WorkloadNetworkSegmentPortVif model = new WorkloadNetworkSegmentPortVif().withPortName("cvokotllxdyhg"); - model = BinaryData.fromObject(model).toObject(WorkloadNetworkSegmentPortVif.class); - Assertions.assertEquals("cvokotllxdyhg", model.portName()); - } -} diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkSegmentPropertiesTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkSegmentPropertiesTests.java deleted file mode 100644 index 25c06b17d701f..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkSegmentPropertiesTests.java +++ /dev/null @@ -1,46 +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.avs.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.avs.fluent.models.WorkloadNetworkSegmentProperties; -import com.azure.resourcemanager.avs.models.WorkloadNetworkSegmentSubnet; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class WorkloadNetworkSegmentPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - WorkloadNetworkSegmentProperties model = - BinaryData - .fromString( - "{\"displayName\":\"ynl\",\"connectedGateway\":\"huopxodlqiynto\",\"subnet\":{\"dhcpRanges\":[\"leosjswsrms\",\"yzrpzbchckqqzq\"],\"gatewayAddress\":\"xiy\"},\"portVif\":[{\"portName\":\"zynkedya\"},{\"portName\":\"wyhqmibzyhwits\"},{\"portName\":\"pyy\"},{\"portName\":\"cdpu\"}],\"status\":\"FAILURE\",\"provisioningState\":\"Succeeded\",\"revision\":359022541227333751}") - .toObject(WorkloadNetworkSegmentProperties.class); - Assertions.assertEquals("ynl", model.displayName()); - Assertions.assertEquals("huopxodlqiynto", model.connectedGateway()); - Assertions.assertEquals("leosjswsrms", model.subnet().dhcpRanges().get(0)); - Assertions.assertEquals("xiy", model.subnet().gatewayAddress()); - Assertions.assertEquals(359022541227333751L, model.revision()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - WorkloadNetworkSegmentProperties model = - new WorkloadNetworkSegmentProperties() - .withDisplayName("ynl") - .withConnectedGateway("huopxodlqiynto") - .withSubnet( - new WorkloadNetworkSegmentSubnet() - .withDhcpRanges(Arrays.asList("leosjswsrms", "yzrpzbchckqqzq")) - .withGatewayAddress("xiy")) - .withRevision(359022541227333751L); - model = BinaryData.fromObject(model).toObject(WorkloadNetworkSegmentProperties.class); - Assertions.assertEquals("ynl", model.displayName()); - Assertions.assertEquals("huopxodlqiynto", model.connectedGateway()); - Assertions.assertEquals("leosjswsrms", model.subnet().dhcpRanges().get(0)); - Assertions.assertEquals("xiy", model.subnet().gatewayAddress()); - Assertions.assertEquals(359022541227333751L, model.revision()); - } -} diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkSegmentSubnetTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkSegmentSubnetTests.java deleted file mode 100644 index efa8d77d5c097..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkSegmentSubnetTests.java +++ /dev/null @@ -1,33 +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.avs.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.avs.models.WorkloadNetworkSegmentSubnet; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class WorkloadNetworkSegmentSubnetTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - WorkloadNetworkSegmentSubnet model = - BinaryData - .fromString("{\"dhcpRanges\":[\"biknsorgjhxbld\",\"lwwrl\"],\"gatewayAddress\":\"m\"}") - .toObject(WorkloadNetworkSegmentSubnet.class); - Assertions.assertEquals("biknsorgjhxbld", model.dhcpRanges().get(0)); - Assertions.assertEquals("m", model.gatewayAddress()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - WorkloadNetworkSegmentSubnet model = - new WorkloadNetworkSegmentSubnet() - .withDhcpRanges(Arrays.asList("biknsorgjhxbld", "lwwrl")) - .withGatewayAddress("m"); - model = BinaryData.fromObject(model).toObject(WorkloadNetworkSegmentSubnet.class); - Assertions.assertEquals("biknsorgjhxbld", model.dhcpRanges().get(0)); - Assertions.assertEquals("m", model.gatewayAddress()); - } -} diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkSegmentsListTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkSegmentsListTests.java deleted file mode 100644 index 2e30d77c8bfdb..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkSegmentsListTests.java +++ /dev/null @@ -1,25 +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.avs.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.avs.models.WorkloadNetworkSegmentsList; - -public final class WorkloadNetworkSegmentsListTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - WorkloadNetworkSegmentsList model = - BinaryData - .fromString( - "{\"value\":[{\"properties\":{\"displayName\":\"uwz\",\"connectedGateway\":\"xbmp\",\"subnet\":{\"dhcpRanges\":[\"fuzmuvpbtt\",\"um\",\"rp\"],\"gatewayAddress\":\"ebmnzbtbhjpglk\"},\"portVif\":[{\"portName\":\"dneu\"},{\"portName\":\"fphsdyhtozfikdow\"}],\"status\":\"SUCCESS\",\"provisioningState\":\"Updating\",\"revision\":2092756450243660051},\"id\":\"clvit\",\"name\":\"hqzonosggbhcoh\",\"type\":\"wdsjnkalju\"},{\"properties\":{\"displayName\":\"swacffgdkzz\",\"connectedGateway\":\"kfvhqcrailvpn\",\"subnet\":{\"dhcpRanges\":[\"flrwd\",\"hdlxyjrxsagafcn\"],\"gatewayAddress\":\"gwq\"},\"portVif\":[{\"portName\":\"dgfbcvkcvqvpke\"},{\"portName\":\"cvdrhvoodsot\"}],\"status\":\"SUCCESS\",\"provisioningState\":\"Deleting\",\"revision\":5400521651850486690},\"id\":\"j\",\"name\":\"vnhdldwmgxcxr\",\"type\":\"lpmutwuoegrpkhj\"},{\"properties\":{\"displayName\":\"yqsluic\",\"connectedGateway\":\"ggkzzlvmbmpa\",\"subnet\":{\"dhcpRanges\":[\"fv\",\"efyw\"],\"gatewayAddress\":\"pfvmwyhrfou\"},\"portVif\":[{\"portName\":\"akcp\"},{\"portName\":\"yzvqt\"}],\"status\":\"SUCCESS\",\"provisioningState\":\"Failed\",\"revision\":3901581715856749689},\"id\":\"zksmondj\",\"name\":\"quxvypomgkop\",\"type\":\"whojvp\"},{\"properties\":{\"displayName\":\"gxysmocmbqfqvm\",\"connectedGateway\":\"xozap\",\"subnet\":{\"dhcpRanges\":[\"xprglyatddc\",\"cbcuejrjxgciqi\",\"rhos\",\"sdqrhzoymibmrq\"],\"gatewayAddress\":\"bahwfl\"},\"portVif\":[{\"portName\":\"tmhrkwofyyvoqacp\"},{\"portName\":\"xpbtgiwbwo\"},{\"portName\":\"washr\"}],\"status\":\"SUCCESS\",\"provisioningState\":\"Succeeded\",\"revision\":3530483379804377024},\"id\":\"wbpokulpiujwaasi\",\"name\":\"qiiobyuqer\",\"type\":\"qlpqwcciuq\"}],\"nextLink\":\"dbutauvfbtkuwhh\"}") - .toObject(WorkloadNetworkSegmentsList.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - WorkloadNetworkSegmentsList model = new WorkloadNetworkSegmentsList(); - model = BinaryData.fromObject(model).toObject(WorkloadNetworkSegmentsList.class); - } -} diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkVMGroupInnerTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkVMGroupInnerTests.java deleted file mode 100644 index afb9f1db270f5..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkVMGroupInnerTests.java +++ /dev/null @@ -1,37 +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.avs.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.avs.fluent.models.WorkloadNetworkVMGroupInner; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class WorkloadNetworkVMGroupInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - WorkloadNetworkVMGroupInner model = - BinaryData - .fromString( - "{\"properties\":{\"displayName\":\"buruvd\",\"members\":[\"s\",\"zlxwabmqoefkifr\",\"tpuqujmq\"],\"status\":\"FAILURE\",\"provisioningState\":\"Deleting\",\"revision\":2719047035031836575},\"id\":\"oaongbjc\",\"name\":\"tujitcjedft\",\"type\":\"waezkojvd\"}") - .toObject(WorkloadNetworkVMGroupInner.class); - Assertions.assertEquals("buruvd", model.displayName()); - Assertions.assertEquals("s", model.members().get(0)); - Assertions.assertEquals(2719047035031836575L, model.revision()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - WorkloadNetworkVMGroupInner model = - new WorkloadNetworkVMGroupInner() - .withDisplayName("buruvd") - .withMembers(Arrays.asList("s", "zlxwabmqoefkifr", "tpuqujmq")) - .withRevision(2719047035031836575L); - model = BinaryData.fromObject(model).toObject(WorkloadNetworkVMGroupInner.class); - Assertions.assertEquals("buruvd", model.displayName()); - Assertions.assertEquals("s", model.members().get(0)); - Assertions.assertEquals(2719047035031836575L, model.revision()); - } -} diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkVMGroupPropertiesTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkVMGroupPropertiesTests.java deleted file mode 100644 index 607bad90e8b95..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkVMGroupPropertiesTests.java +++ /dev/null @@ -1,37 +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.avs.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.avs.fluent.models.WorkloadNetworkVMGroupProperties; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class WorkloadNetworkVMGroupPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - WorkloadNetworkVMGroupProperties model = - BinaryData - .fromString( - "{\"displayName\":\"zfoqouicybxar\",\"members\":[\"zuf\",\"x\",\"iqopidoamciod\",\"khazxkhnzbonlwn\"],\"status\":\"FAILURE\",\"provisioningState\":\"Updating\",\"revision\":8928756986200818231}") - .toObject(WorkloadNetworkVMGroupProperties.class); - Assertions.assertEquals("zfoqouicybxar", model.displayName()); - Assertions.assertEquals("zuf", model.members().get(0)); - Assertions.assertEquals(8928756986200818231L, model.revision()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - WorkloadNetworkVMGroupProperties model = - new WorkloadNetworkVMGroupProperties() - .withDisplayName("zfoqouicybxar") - .withMembers(Arrays.asList("zuf", "x", "iqopidoamciod", "khazxkhnzbonlwn")) - .withRevision(8928756986200818231L); - model = BinaryData.fromObject(model).toObject(WorkloadNetworkVMGroupProperties.class); - Assertions.assertEquals("zfoqouicybxar", model.displayName()); - Assertions.assertEquals("zuf", model.members().get(0)); - Assertions.assertEquals(8928756986200818231L, model.revision()); - } -} diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkVMGroupsListTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkVMGroupsListTests.java deleted file mode 100644 index 456045d18334d..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkVMGroupsListTests.java +++ /dev/null @@ -1,25 +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.avs.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.avs.models.WorkloadNetworkVMGroupsList; - -public final class WorkloadNetworkVMGroupsListTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - WorkloadNetworkVMGroupsList model = - BinaryData - .fromString( - "{\"value\":[{\"properties\":{\"displayName\":\"ca\",\"members\":[\"bvtvudutncormr\",\"xqtvcofu\"],\"status\":\"SUCCESS\",\"provisioningState\":\"Canceled\",\"revision\":2516318057912167047},\"id\":\"bgdknnqv\",\"name\":\"aznqntoru\",\"type\":\"sgsahmkycgr\"}],\"nextLink\":\"wjue\"}") - .toObject(WorkloadNetworkVMGroupsList.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - WorkloadNetworkVMGroupsList model = new WorkloadNetworkVMGroupsList(); - model = BinaryData.fromObject(model).toObject(WorkloadNetworkVMGroupsList.class); - } -} diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkVirtualMachineInnerTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkVirtualMachineInnerTests.java deleted file mode 100644 index c032150d5c677..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkVirtualMachineInnerTests.java +++ /dev/null @@ -1,29 +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.avs.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.avs.fluent.models.WorkloadNetworkVirtualMachineInner; -import org.junit.jupiter.api.Assertions; - -public final class WorkloadNetworkVirtualMachineInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - WorkloadNetworkVirtualMachineInner model = - BinaryData - .fromString( - "{\"properties\":{\"displayName\":\"slfaoqzpiyyl\",\"vmType\":\"REGULAR\"},\"id\":\"nswhcc\",\"name\":\"ph\",\"type\":\"aivwitqscywu\"}") - .toObject(WorkloadNetworkVirtualMachineInner.class); - Assertions.assertEquals("slfaoqzpiyyl", model.displayName()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - WorkloadNetworkVirtualMachineInner model = - new WorkloadNetworkVirtualMachineInner().withDisplayName("slfaoqzpiyyl"); - model = BinaryData.fromObject(model).toObject(WorkloadNetworkVirtualMachineInner.class); - Assertions.assertEquals("slfaoqzpiyyl", model.displayName()); - } -} diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkVirtualMachinePropertiesTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkVirtualMachinePropertiesTests.java deleted file mode 100644 index b9de3564195ec..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkVirtualMachinePropertiesTests.java +++ /dev/null @@ -1,28 +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.avs.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.avs.fluent.models.WorkloadNetworkVirtualMachineProperties; -import org.junit.jupiter.api.Assertions; - -public final class WorkloadNetworkVirtualMachinePropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - WorkloadNetworkVirtualMachineProperties model = - BinaryData - .fromString("{\"displayName\":\"woluhczbwemhair\",\"vmType\":\"REGULAR\"}") - .toObject(WorkloadNetworkVirtualMachineProperties.class); - Assertions.assertEquals("woluhczbwemhair", model.displayName()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - WorkloadNetworkVirtualMachineProperties model = - new WorkloadNetworkVirtualMachineProperties().withDisplayName("woluhczbwemhair"); - model = BinaryData.fromObject(model).toObject(WorkloadNetworkVirtualMachineProperties.class); - Assertions.assertEquals("woluhczbwemhair", model.displayName()); - } -} diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkVirtualMachinesListTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkVirtualMachinesListTests.java deleted file mode 100644 index 25e8f7c445eb0..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkVirtualMachinesListTests.java +++ /dev/null @@ -1,25 +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.avs.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.avs.models.WorkloadNetworkVirtualMachinesList; - -public final class WorkloadNetworkVirtualMachinesListTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - WorkloadNetworkVirtualMachinesList model = - BinaryData - .fromString( - "{\"value\":[{\"properties\":{\"displayName\":\"szzcmrvexztv\",\"vmType\":\"SERVICE\"},\"id\":\"gsfraoyzkoow\",\"name\":\"lmnguxaw\",\"type\":\"aldsy\"},{\"properties\":{\"displayName\":\"imerqfobwyznk\",\"vmType\":\"REGULAR\"},\"id\":\"utwpfhp\",\"name\":\"gmhrskdsnfdsdoak\",\"type\":\"tdlmkkzevd\"},{\"properties\":{\"displayName\":\"wpusdsttwvogv\",\"vmType\":\"REGULAR\"},\"id\":\"jdcngqqm\",\"name\":\"akufgmjz\",\"type\":\"wr\"},{\"properties\":{\"displayName\":\"twaenuuzko\",\"vmType\":\"EDGE\"},\"id\":\"inrfdwoyu\",\"name\":\"hziuiefozbhdms\",\"type\":\"l\"}],\"nextLink\":\"qhoftrmaequiah\"}") - .toObject(WorkloadNetworkVirtualMachinesList.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - WorkloadNetworkVirtualMachinesList model = new WorkloadNetworkVirtualMachinesList(); - model = BinaryData.fromObject(model).toObject(WorkloadNetworkVirtualMachinesList.class); - } -} diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksCreateDhcpMockTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksCreateDhcpMockTests.java deleted file mode 100644 index b098ddb14a3d9..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksCreateDhcpMockTests.java +++ /dev/null @@ -1,75 +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.avs.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.avs.AvsManager; -import com.azure.resourcemanager.avs.models.WorkloadNetworkDhcp; -import com.azure.resourcemanager.avs.models.WorkloadNetworkDhcpEntity; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class WorkloadNetworksCreateDhcpMockTests { - @Test - public void testCreateDhcp() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"properties\":{\"dhcpType\":\"WorkloadNetworkDhcpEntity\",\"displayName\":\"fuughtuqfec\",\"segments\":[\"ygtuhx\"],\"provisioningState\":\"Succeeded\",\"revision\":8894754548360108244},\"id\":\"wmrswnjlxuzrh\",\"name\":\"pusxjb\",\"type\":\"qehgpd\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - AvsManager manager = - AvsManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - WorkloadNetworkDhcp response = - manager - .workloadNetworks() - .defineDhcp("ixjawrtm") - .withExistingPrivateCloud("opionszon", "pngajin") - .withProperties( - new WorkloadNetworkDhcpEntity().withDisplayName("myccx").withRevision(6733942550770793710L)) - .create(); - - Assertions.assertEquals("fuughtuqfec", response.properties().displayName()); - Assertions.assertEquals(8894754548360108244L, response.properties().revision()); - } -} diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksCreateDnsServiceMockTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksCreateDnsServiceMockTests.java deleted file mode 100644 index ebe4a3f6ccd9c..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksCreateDnsServiceMockTests.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.avs.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.avs.AvsManager; -import com.azure.resourcemanager.avs.models.DnsServiceLogLevelEnum; -import com.azure.resourcemanager.avs.models.WorkloadNetworkDnsService; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class WorkloadNetworksCreateDnsServiceMockTests { - @Test - public void testCreateDnsService() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"properties\":{\"displayName\":\"fdlpukhpyr\",\"dnsServiceIp\":\"izjcpeog\",\"defaultDnsZone\":\"nmg\",\"fqdnZones\":[\"uxddbhfh\",\"fpazjzoywjxhpd\",\"lontacnpq\",\"tehtuevrhrljyoog\"],\"logLevel\":\"FATAL\",\"status\":\"SUCCESS\",\"provisioningState\":\"Succeeded\",\"revision\":809684715358738696},\"id\":\"bsre\",\"name\":\"rfqkfuar\",\"type\":\"nlvhhtklnvnafvv\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - AvsManager manager = - AvsManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - WorkloadNetworkDnsService response = - manager - .workloadNetworks() - .defineDnsService("p") - .withExistingPrivateCloud("oxhlw", "tsjgqrsx") - .withDisplayName("u") - .withDnsServiceIp("nchrszizoyu") - .withDefaultDnsZone("yetnd") - .withFqdnZones(Arrays.asList("qyggagfl", "lgmtrwahzjmucf", "byrplrohkpig", "fusuckzmkwklsno")) - .withLogLevel(DnsServiceLogLevelEnum.WARNING) - .withRevision(6054442894219666255L) - .create(); - - Assertions.assertEquals("fdlpukhpyr", response.displayName()); - Assertions.assertEquals("izjcpeog", response.dnsServiceIp()); - Assertions.assertEquals("nmg", response.defaultDnsZone()); - Assertions.assertEquals("uxddbhfh", response.fqdnZones().get(0)); - Assertions.assertEquals(DnsServiceLogLevelEnum.FATAL, response.logLevel()); - Assertions.assertEquals(809684715358738696L, response.revision()); - } -} diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksCreateDnsZoneMockTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksCreateDnsZoneMockTests.java deleted file mode 100644 index 6dfae89b2ca17..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksCreateDnsZoneMockTests.java +++ /dev/null @@ -1,83 +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.avs.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.avs.AvsManager; -import com.azure.resourcemanager.avs.models.WorkloadNetworkDnsZone; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class WorkloadNetworksCreateDnsZoneMockTests { - @Test - public void testCreateDnsZone() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"properties\":{\"displayName\":\"yo\",\"domain\":[\"rouuxvnsasbcry\",\"o\",\"izrxklob\",\"xnazpmkml\"],\"dnsServerIps\":[\"vfxzopjh\",\"zxlioh\",\"d\",\"dtfgxqbawpcbb\"],\"sourceIp\":\"qcy\",\"dnsServices\":3888945371660163872,\"provisioningState\":\"Succeeded\",\"revision\":1167026751673523681},\"id\":\"icdhz\",\"name\":\"dyb\",\"type\":\"wgbdvibidmhmwffp\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - AvsManager manager = - AvsManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - WorkloadNetworkDnsZone response = - manager - .workloadNetworks() - .defineDnsZone("minqcym") - .withExistingPrivateCloud("yfedevjbo", "lcqxypokk") - .withDisplayName("gn") - .withDomain(Arrays.asList("x", "wuninv")) - .withDnsServerIps(Arrays.asList("chaqdtvqec", "qct")) - .withSourceIp("xdtddmflhuytxzv") - .withDnsServices(3117767040904980283L) - .withRevision(6355503721954410956L) - .create(); - - Assertions.assertEquals("yo", response.displayName()); - Assertions.assertEquals("rouuxvnsasbcry", response.domain().get(0)); - Assertions.assertEquals("vfxzopjh", response.dnsServerIps().get(0)); - Assertions.assertEquals("qcy", response.sourceIp()); - Assertions.assertEquals(3888945371660163872L, response.dnsServices()); - Assertions.assertEquals(1167026751673523681L, response.revision()); - } -} diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksCreatePortMirroringMockTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksCreatePortMirroringMockTests.java deleted file mode 100644 index b9531b2869dcb..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksCreatePortMirroringMockTests.java +++ /dev/null @@ -1,81 +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.avs.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.avs.AvsManager; -import com.azure.resourcemanager.avs.models.PortMirroringDirectionEnum; -import com.azure.resourcemanager.avs.models.WorkloadNetworkPortMirroring; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class WorkloadNetworksCreatePortMirroringMockTests { - @Test - public void testCreatePortMirroring() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"properties\":{\"displayName\":\"lbnseqac\",\"direction\":\"INGRESS\",\"source\":\"ilguooqjagmditg\",\"destination\":\"iookjbsah\",\"status\":\"SUCCESS\",\"provisioningState\":\"Succeeded\",\"revision\":2010422282594274461},\"id\":\"qacsl\",\"name\":\"otoebnfxofv\",\"type\":\"jkgd\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - AvsManager manager = - AvsManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - WorkloadNetworkPortMirroring response = - manager - .workloadNetworks() - .definePortMirroring("bnwgfmxj") - .withExistingPrivateCloud("hzjqatucoige", "xncnwfe") - .withDisplayName("bjb") - .withDirection(PortMirroringDirectionEnum.EGRESS) - .withSource("gtdysnaqu") - .withDestination("qbctqha") - .withRevision(7064502112567095656L) - .create(); - - Assertions.assertEquals("lbnseqac", response.displayName()); - Assertions.assertEquals(PortMirroringDirectionEnum.INGRESS, response.direction()); - Assertions.assertEquals("ilguooqjagmditg", response.source()); - Assertions.assertEquals("iookjbsah", response.destination()); - Assertions.assertEquals(2010422282594274461L, response.revision()); - } -} diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksCreatePublicIpMockTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksCreatePublicIpMockTests.java deleted file mode 100644 index 44957ce54ee99..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksCreatePublicIpMockTests.java +++ /dev/null @@ -1,74 +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.avs.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.avs.AvsManager; -import com.azure.resourcemanager.avs.models.WorkloadNetworkPublicIp; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class WorkloadNetworksCreatePublicIpMockTests { - @Test - public void testCreatePublicIp() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"properties\":{\"displayName\":\"qepvufhbzeh\",\"numberOfPublicIPs\":5833531132490364986,\"publicIPBlock\":\"hnl\",\"provisioningState\":\"Succeeded\"},\"id\":\"bldxeaclgscho\",\"name\":\"imkrsrrmouc\",\"type\":\"ofldpuviyfcaa\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - AvsManager manager = - AvsManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - WorkloadNetworkPublicIp response = - manager - .workloadNetworks() - .definePublicIp("oxoyyukp") - .withExistingPrivateCloud("fmuvapckccr", "vwe") - .withDisplayName("mmoiroqboshbra") - .withNumberOfPublicIPs(7328880240070265535L) - .create(); - - Assertions.assertEquals("qepvufhbzeh", response.displayName()); - Assertions.assertEquals(5833531132490364986L, response.numberOfPublicIPs()); - } -} diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksCreateSegmentsMockTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksCreateSegmentsMockTests.java deleted file mode 100644 index 2eb98cbef43de..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksCreateSegmentsMockTests.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.avs.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.avs.AvsManager; -import com.azure.resourcemanager.avs.models.WorkloadNetworkSegment; -import com.azure.resourcemanager.avs.models.WorkloadNetworkSegmentSubnet; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class WorkloadNetworksCreateSegmentsMockTests { - @Test - public void testCreateSegments() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"properties\":{\"displayName\":\"bowsepd\",\"connectedGateway\":\"kmtdher\",\"subnet\":{\"dhcpRanges\":[\"c\",\"uahokq\",\"obkauxofsh\"],\"gatewayAddress\":\"hwpnulaiywzejywh\"},\"portVif\":[{\"portName\":\"ojpllndnpdwrpqaf\"},{\"portName\":\"ug\"},{\"portName\":\"n\"}],\"status\":\"SUCCESS\",\"provisioningState\":\"Succeeded\",\"revision\":5446103695513333706},\"id\":\"pococtfjgt\",\"name\":\"xrjvzuyturmlm\",\"type\":\"owolbaui\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - AvsManager manager = - AvsManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - WorkloadNetworkSegment response = - manager - .workloadNetworks() - .defineSegments("xoe") - .withExistingPrivateCloud("pzoyhlfbcg", "gcl") - .withDisplayName("njipnwjfujql") - .withConnectedGateway("cbahhpzpofoiy") - .withSubnet( - new WorkloadNetworkSegmentSubnet() - .withDhcpRanges(Arrays.asList("ilkmk", "holvdn", "viauogphua")) - .withGatewayAddress("vtiukyef")) - .withRevision(1819806073329112411L) - .create(); - - Assertions.assertEquals("bowsepd", response.displayName()); - Assertions.assertEquals("kmtdher", response.connectedGateway()); - Assertions.assertEquals("c", response.subnet().dhcpRanges().get(0)); - Assertions.assertEquals("hwpnulaiywzejywh", response.subnet().gatewayAddress()); - Assertions.assertEquals(5446103695513333706L, response.revision()); - } -} diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksCreateVMGroupMockTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksCreateVMGroupMockTests.java deleted file mode 100644 index 87a0dc0e5620c..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksCreateVMGroupMockTests.java +++ /dev/null @@ -1,77 +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.avs.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.avs.AvsManager; -import com.azure.resourcemanager.avs.models.WorkloadNetworkVMGroup; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class WorkloadNetworksCreateVMGroupMockTests { - @Test - public void testCreateVMGroup() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"properties\":{\"displayName\":\"zyjq\",\"members\":[\"wkpqhjpenuygbq\",\"qqekewvnqvcdlgu\"],\"status\":\"FAILURE\",\"provisioningState\":\"Succeeded\",\"revision\":6066393981630309590},\"id\":\"nlaxpunjqikcz\",\"name\":\"vitac\",\"type\":\"xmfcsserxhtv\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - AvsManager manager = - AvsManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - WorkloadNetworkVMGroup response = - manager - .workloadNetworks() - .defineVMGroup("m") - .withExistingPrivateCloud("razftxejwabmdujt", "vcopex") - .withDisplayName("buhhlkyqlt") - .withMembers(Arrays.asList("ogtu", "kffdjktsys")) - .withRevision(1114803493705852577L) - .create(); - - Assertions.assertEquals("zyjq", response.displayName()); - Assertions.assertEquals("wkpqhjpenuygbq", response.members().get(0)); - Assertions.assertEquals(6066393981630309590L, response.revision()); - } -} diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksDeleteDhcpMockTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksDeleteDhcpMockTests.java deleted file mode 100644 index bfd2257ed8b9e..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksDeleteDhcpMockTests.java +++ /dev/null @@ -1,63 +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.avs.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.avs.AvsManager; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class WorkloadNetworksDeleteDhcpMockTests { - @Test - public void testDeleteDhcp() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = "{}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - AvsManager manager = - AvsManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager - .workloadNetworks() - .deleteDhcp("nh", "vsqltnzoibgsxg", "xfyqonmpqoxwdo", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksDeleteDnsServiceMockTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksDeleteDnsServiceMockTests.java deleted file mode 100644 index 33b8aee856893..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksDeleteDnsServiceMockTests.java +++ /dev/null @@ -1,63 +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.avs.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.avs.AvsManager; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class WorkloadNetworksDeleteDnsServiceMockTests { - @Test - public void testDeleteDnsService() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = "{}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - AvsManager manager = - AvsManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager - .workloadNetworks() - .deleteDnsService("zqaclna", "xbiygnugjknfsmf", "ttuxuuyilflqoiqu", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksDeleteDnsZoneMockTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksDeleteDnsZoneMockTests.java deleted file mode 100644 index bccd7d4a6a787..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksDeleteDnsZoneMockTests.java +++ /dev/null @@ -1,63 +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.avs.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.avs.AvsManager; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class WorkloadNetworksDeleteDnsZoneMockTests { - @Test - public void testDeleteDnsZone() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = "{}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - AvsManager manager = - AvsManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager - .workloadNetworks() - .deleteDnsZone("hr", "mqgjsxvpq", "bfrmbodthsqqgvri", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksDeletePortMirroringMockTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksDeletePortMirroringMockTests.java deleted file mode 100644 index cc8d1442935b8..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksDeletePortMirroringMockTests.java +++ /dev/null @@ -1,61 +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.avs.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.avs.AvsManager; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class WorkloadNetworksDeletePortMirroringMockTests { - @Test - public void testDeletePortMirroring() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = "{}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - AvsManager manager = - AvsManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager.workloadNetworks().deletePortMirroring("tixo", "ffqyinlj", "epqw", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksDeletePublicIpMockTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksDeletePublicIpMockTests.java deleted file mode 100644 index c615d7c2aa560..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksDeletePublicIpMockTests.java +++ /dev/null @@ -1,61 +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.avs.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.avs.AvsManager; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class WorkloadNetworksDeletePublicIpMockTests { - @Test - public void testDeletePublicIp() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = "{}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - AvsManager manager = - AvsManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager.workloadNetworks().deletePublicIp("pqwjedm", "rrxxgewpktvq", "lkm", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksDeleteSegmentMockTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksDeleteSegmentMockTests.java deleted file mode 100644 index 352e2ac726cee..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksDeleteSegmentMockTests.java +++ /dev/null @@ -1,63 +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.avs.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.avs.AvsManager; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class WorkloadNetworksDeleteSegmentMockTests { - @Test - public void testDeleteSegment() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = "{}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - AvsManager manager = - AvsManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager - .workloadNetworks() - .deleteSegment("znmmaxrizkzobgo", "xlhslnel", "ieixynllxe", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksDeleteVMGroupMockTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksDeleteVMGroupMockTests.java deleted file mode 100644 index 545fda2019c5b..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksDeleteVMGroupMockTests.java +++ /dev/null @@ -1,63 +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.avs.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.avs.AvsManager; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class WorkloadNetworksDeleteVMGroupMockTests { - @Test - public void testDeleteVMGroup() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = "{}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - AvsManager manager = - AvsManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager - .workloadNetworks() - .deleteVMGroup("tgzpnpb", "wvefloccsrmoz", "hmipgawtxxpkyjc", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksGetDhcpWithResponseMockTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksGetDhcpWithResponseMockTests.java deleted file mode 100644 index 32afb88007d46..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksGetDhcpWithResponseMockTests.java +++ /dev/null @@ -1,71 +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.avs.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.avs.AvsManager; -import com.azure.resourcemanager.avs.models.WorkloadNetworkDhcp; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class WorkloadNetworksGetDhcpWithResponseMockTests { - @Test - public void testGetDhcpWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"properties\":{\"dhcpType\":\"WorkloadNetworkDhcpEntity\",\"displayName\":\"mwabzxrvxc\",\"segments\":[\"sphaivmxyasflvg\",\"gzwywak\",\"ihknsmjbl\"],\"provisioningState\":\"Deleting\",\"revision\":608023064762005271},\"id\":\"ymzotqyryuzcbmq\",\"name\":\"vxmvw\",\"type\":\"gtayxonsupeujlz\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - AvsManager manager = - AvsManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - WorkloadNetworkDhcp response = - manager - .workloadNetworks() - .getDhcpWithResponse("xm", "f", "kqscazuawxtzx", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("mwabzxrvxc", response.properties().displayName()); - Assertions.assertEquals(608023064762005271L, response.properties().revision()); - } -} diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksGetDnsServiceWithResponseMockTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksGetDnsServiceWithResponseMockTests.java deleted file mode 100644 index 51c78f426ed4f..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksGetDnsServiceWithResponseMockTests.java +++ /dev/null @@ -1,76 +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.avs.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.avs.AvsManager; -import com.azure.resourcemanager.avs.models.DnsServiceLogLevelEnum; -import com.azure.resourcemanager.avs.models.WorkloadNetworkDnsService; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class WorkloadNetworksGetDnsServiceWithResponseMockTests { - @Test - public void testGetDnsServiceWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"properties\":{\"displayName\":\"izruwnpqxpxiwfc\",\"dnsServiceIp\":\"jsa\",\"defaultDnsZone\":\"iixtmkzj\",\"fqdnZones\":[\"iirhgfgrwsd\",\"gratzvzbglbyvict\",\"tbrxkjz\"],\"logLevel\":\"ERROR\",\"status\":\"SUCCESS\",\"provisioningState\":\"Deleting\",\"revision\":5705580041199426767},\"id\":\"wfbkgozxwo\",\"name\":\"dby\",\"type\":\"p\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - AvsManager manager = - AvsManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - WorkloadNetworkDnsService response = - manager - .workloadNetworks() - .getDnsServiceWithResponse("wey", "rdhlis", "gwflq", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("izruwnpqxpxiwfc", response.displayName()); - Assertions.assertEquals("jsa", response.dnsServiceIp()); - Assertions.assertEquals("iixtmkzj", response.defaultDnsZone()); - Assertions.assertEquals("iirhgfgrwsd", response.fqdnZones().get(0)); - Assertions.assertEquals(DnsServiceLogLevelEnum.ERROR, response.logLevel()); - Assertions.assertEquals(5705580041199426767L, response.revision()); - } -} diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksGetDnsZoneWithResponseMockTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksGetDnsZoneWithResponseMockTests.java deleted file mode 100644 index 3c3ee2296349d..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksGetDnsZoneWithResponseMockTests.java +++ /dev/null @@ -1,75 +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.avs.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.avs.AvsManager; -import com.azure.resourcemanager.avs.models.WorkloadNetworkDnsZone; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class WorkloadNetworksGetDnsZoneWithResponseMockTests { - @Test - public void testGetDnsZoneWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"properties\":{\"displayName\":\"dibgqjxgpnrhgov\",\"domain\":[\"ik\",\"mhha\"],\"dnsServerIps\":[\"rmzvupo\",\"qzdfuydzvkfvxcn\",\"mx\"],\"sourceIp\":\"swokm\",\"dnsServices\":1866158858475312478,\"provisioningState\":\"Succeeded\",\"revision\":6332875207430967251},\"id\":\"em\",\"name\":\"qkzszuwiwtglxxh\",\"type\":\"jfpgpicrmn\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - AvsManager manager = - AvsManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - WorkloadNetworkDnsZone response = - manager - .workloadNetworks() - .getDnsZoneWithResponse("niypfpubcpzg", "xtiv", "j", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("dibgqjxgpnrhgov", response.displayName()); - Assertions.assertEquals("ik", response.domain().get(0)); - Assertions.assertEquals("rmzvupo", response.dnsServerIps().get(0)); - Assertions.assertEquals("swokm", response.sourceIp()); - Assertions.assertEquals(1866158858475312478L, response.dnsServices()); - Assertions.assertEquals(6332875207430967251L, response.revision()); - } -} diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksGetGatewayWithResponseMockTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksGetGatewayWithResponseMockTests.java deleted file mode 100644 index af72a4c4829db..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksGetGatewayWithResponseMockTests.java +++ /dev/null @@ -1,70 +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.avs.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.avs.AvsManager; -import com.azure.resourcemanager.avs.models.WorkloadNetworkGateway; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class WorkloadNetworksGetGatewayWithResponseMockTests { - @Test - public void testGetGatewayWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"properties\":{\"displayName\":\"spofapvuhry\",\"path\":\"iofrzgbzjedmstk\"},\"id\":\"nlvxbcuii\",\"name\":\"nktwfansnvpdibmi\",\"type\":\"ostbzbkiwb\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - AvsManager manager = - AvsManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - WorkloadNetworkGateway response = - manager - .workloadNetworks() - .getGatewayWithResponse("gbqi", "kxkbsazgakgacyr", "m", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("spofapvuhry", response.displayName()); - } -} diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksGetPortMirroringWithResponseMockTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksGetPortMirroringWithResponseMockTests.java deleted file mode 100644 index 205d6cace95ec..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksGetPortMirroringWithResponseMockTests.java +++ /dev/null @@ -1,75 +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.avs.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.avs.AvsManager; -import com.azure.resourcemanager.avs.models.PortMirroringDirectionEnum; -import com.azure.resourcemanager.avs.models.WorkloadNetworkPortMirroring; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class WorkloadNetworksGetPortMirroringWithResponseMockTests { - @Test - public void testGetPortMirroringWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"properties\":{\"displayName\":\"tf\",\"direction\":\"EGRESS\",\"source\":\"cg\",\"destination\":\"o\",\"status\":\"FAILURE\",\"provisioningState\":\"Canceled\",\"revision\":101208691571516004},\"id\":\"dewemxswv\",\"name\":\"uun\",\"type\":\"zjgehkfkim\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - AvsManager manager = - AvsManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - WorkloadNetworkPortMirroring response = - manager - .workloadNetworks() - .getPortMirroringWithResponse("ffmbmxzjrg", "wwp", "jx", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("tf", response.displayName()); - Assertions.assertEquals(PortMirroringDirectionEnum.EGRESS, response.direction()); - Assertions.assertEquals("cg", response.source()); - Assertions.assertEquals("o", response.destination()); - Assertions.assertEquals(101208691571516004L, response.revision()); - } -} diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksGetPublicIpWithResponseMockTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksGetPublicIpWithResponseMockTests.java deleted file mode 100644 index 3768c7d8929f4..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksGetPublicIpWithResponseMockTests.java +++ /dev/null @@ -1,71 +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.avs.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.avs.AvsManager; -import com.azure.resourcemanager.avs.models.WorkloadNetworkPublicIp; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class WorkloadNetworksGetPublicIpWithResponseMockTests { - @Test - public void testGetPublicIpWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"properties\":{\"displayName\":\"cuqudtcvclxy\",\"numberOfPublicIPs\":8353389332864775554,\"publicIPBlock\":\"gfabuiyjibuzphdu\",\"provisioningState\":\"Failed\"},\"id\":\"iknp\",\"name\":\"oxgjiuqhibt\",\"type\":\"z\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - AvsManager manager = - AvsManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - WorkloadNetworkPublicIp response = - manager - .workloadNetworks() - .getPublicIpWithResponse("fotang", "fhnykzcugs", "vxwlmzqwmvtxnj", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("cuqudtcvclxy", response.displayName()); - Assertions.assertEquals(8353389332864775554L, response.numberOfPublicIPs()); - } -} diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksGetSegmentWithResponseMockTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksGetSegmentWithResponseMockTests.java deleted file mode 100644 index 24c53028ba36d..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksGetSegmentWithResponseMockTests.java +++ /dev/null @@ -1,74 +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.avs.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.avs.AvsManager; -import com.azure.resourcemanager.avs.models.WorkloadNetworkSegment; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class WorkloadNetworksGetSegmentWithResponseMockTests { - @Test - public void testGetSegmentWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"properties\":{\"displayName\":\"btqwpwyawbzas\",\"connectedGateway\":\"ucljgkyexaoguya\",\"subnet\":{\"dhcpRanges\":[\"sdaultxij\",\"um\",\"qwazlnqnmcjngzq\",\"qxtbjwgnyf\"],\"gatewayAddress\":\"fzsvtuikzh\"},\"portVif\":[{\"portName\":\"lcfhmlrqryxy\"},{\"portName\":\"nzrdpsovwxz\"},{\"portName\":\"tgoe\"},{\"portName\":\"bbabp\"}],\"status\":\"SUCCESS\",\"provisioningState\":\"Failed\",\"revision\":9143914633435645680},\"id\":\"ntjlr\",\"name\":\"gjkskyrioov\",\"type\":\"idsxwaabzmifry\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - AvsManager manager = - AvsManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - WorkloadNetworkSegment response = - manager - .workloadNetworks() - .getSegmentWithResponse("kmfx", "pjwogqqno", "pud", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("btqwpwyawbzas", response.displayName()); - Assertions.assertEquals("ucljgkyexaoguya", response.connectedGateway()); - Assertions.assertEquals("sdaultxij", response.subnet().dhcpRanges().get(0)); - Assertions.assertEquals("fzsvtuikzh", response.subnet().gatewayAddress()); - Assertions.assertEquals(9143914633435645680L, response.revision()); - } -} diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksGetVMGroupWithResponseMockTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksGetVMGroupWithResponseMockTests.java deleted file mode 100644 index 0d324b29c0f3d..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksGetVMGroupWithResponseMockTests.java +++ /dev/null @@ -1,72 +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.avs.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.avs.AvsManager; -import com.azure.resourcemanager.avs.models.WorkloadNetworkVMGroup; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class WorkloadNetworksGetVMGroupWithResponseMockTests { - @Test - public void testGetVMGroupWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"properties\":{\"displayName\":\"znvfbycjsxjww\",\"members\":[\"vumwmxqh\"],\"status\":\"FAILURE\",\"provisioningState\":\"Canceled\",\"revision\":2852193462165954889},\"id\":\"dsehaohdjhhflzo\",\"name\":\"xcoxpelnjet\",\"type\":\"gltsxoat\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - AvsManager manager = - AvsManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - WorkloadNetworkVMGroup response = - manager - .workloadNetworks() - .getVMGroupWithResponse("rqbsmswziq", "fuhok", "ruswhv", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("znvfbycjsxjww", response.displayName()); - Assertions.assertEquals("vumwmxqh", response.members().get(0)); - Assertions.assertEquals(2852193462165954889L, response.revision()); - } -} diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksGetVirtualMachineWithResponseMockTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksGetVirtualMachineWithResponseMockTests.java deleted file mode 100644 index 042f604b7dcca..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksGetVirtualMachineWithResponseMockTests.java +++ /dev/null @@ -1,70 +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.avs.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.avs.AvsManager; -import com.azure.resourcemanager.avs.models.WorkloadNetworkVirtualMachine; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class WorkloadNetworksGetVirtualMachineWithResponseMockTests { - @Test - public void testGetVirtualMachineWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"properties\":{\"displayName\":\"katbhjm\",\"vmType\":\"EDGE\"},\"id\":\"bsoqeqala\",\"name\":\"vlagun\",\"type\":\"tgfebwln\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - AvsManager manager = - AvsManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - WorkloadNetworkVirtualMachine response = - manager - .workloadNetworks() - .getVirtualMachineWithResponse("tcqiosmg", "zah", "xqdlyrtltlapr", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("katbhjm", response.displayName()); - } -} diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksGetWithResponseMockTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksGetWithResponseMockTests.java deleted file mode 100644 index e89b7625a9947..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksGetWithResponseMockTests.java +++ /dev/null @@ -1,67 +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.avs.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.avs.AvsManager; -import com.azure.resourcemanager.avs.models.WorkloadNetwork; -import com.azure.resourcemanager.avs.models.WorkloadNetworkName; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class WorkloadNetworksGetWithResponseMockTests { - @Test - public void testGetWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = "{\"id\":\"qxeysko\",\"name\":\"qzinkfkbg\",\"type\":\"z\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - AvsManager manager = - AvsManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - WorkloadNetwork response = - manager - .workloadNetworks() - .getWithResponse("zlmcmuapcvhdb", "v", WorkloadNetworkName.DEFAULT, com.azure.core.util.Context.NONE) - .getValue(); - } -} diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksListDhcpMockTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksListDhcpMockTests.java deleted file mode 100644 index 0e99e94fba48e..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksListDhcpMockTests.java +++ /dev/null @@ -1,69 +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.avs.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.avs.AvsManager; -import com.azure.resourcemanager.avs.models.WorkloadNetworkDhcp; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class WorkloadNetworksListDhcpMockTests { - @Test - public void testListDhcp() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"value\":[{\"properties\":{\"dhcpType\":\"WorkloadNetworkDhcpEntity\",\"displayName\":\"dwfmvigorqjb\",\"segments\":[\"h\",\"aglkafhon\",\"juj\"],\"provisioningState\":\"Updating\",\"revision\":6687319297826159039},\"id\":\"vcpopmxe\",\"name\":\"nwcl\",\"type\":\"yjede\"}]}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - AvsManager manager = - AvsManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = - manager.workloadNetworks().listDhcp("wcrojphslhcaw", "u", com.azure.core.util.Context.NONE); - - Assertions.assertEquals("dwfmvigorqjb", response.iterator().next().properties().displayName()); - Assertions.assertEquals(6687319297826159039L, response.iterator().next().properties().revision()); - } -} diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksListDnsServicesMockTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksListDnsServicesMockTests.java deleted file mode 100644 index c87e7fdf6fe3d..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksListDnsServicesMockTests.java +++ /dev/null @@ -1,74 +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.avs.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.avs.AvsManager; -import com.azure.resourcemanager.avs.models.DnsServiceLogLevelEnum; -import com.azure.resourcemanager.avs.models.WorkloadNetworkDnsService; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class WorkloadNetworksListDnsServicesMockTests { - @Test - public void testListDnsServices() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"value\":[{\"properties\":{\"displayName\":\"qmjxlyyzglgouwtl\",\"dnsServiceIp\":\"jyuojqtobaxkjeyt\",\"defaultDnsZone\":\"lbfjkwr\",\"fqdnZones\":[\"kqbh\",\"y\",\"qunjqh\"],\"logLevel\":\"INFO\",\"status\":\"SUCCESS\",\"provisioningState\":\"Succeeded\",\"revision\":6042228062929468639},\"id\":\"kdk\",\"name\":\"fmjnnawtqa\",\"type\":\"pxuckpggq\"}]}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - AvsManager manager = - AvsManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = - manager.workloadNetworks().listDnsServices("mhyreeudz", "av", com.azure.core.util.Context.NONE); - - Assertions.assertEquals("qmjxlyyzglgouwtl", response.iterator().next().displayName()); - Assertions.assertEquals("jyuojqtobaxkjeyt", response.iterator().next().dnsServiceIp()); - Assertions.assertEquals("lbfjkwr", response.iterator().next().defaultDnsZone()); - Assertions.assertEquals("kqbh", response.iterator().next().fqdnZones().get(0)); - Assertions.assertEquals(DnsServiceLogLevelEnum.INFO, response.iterator().next().logLevel()); - Assertions.assertEquals(6042228062929468639L, response.iterator().next().revision()); - } -} diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksListDnsZonesMockTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksListDnsZonesMockTests.java deleted file mode 100644 index a4fb0b811b5cb..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksListDnsZonesMockTests.java +++ /dev/null @@ -1,73 +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.avs.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.avs.AvsManager; -import com.azure.resourcemanager.avs.models.WorkloadNetworkDnsZone; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class WorkloadNetworksListDnsZonesMockTests { - @Test - public void testListDnsZones() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"value\":[{\"properties\":{\"displayName\":\"w\",\"domain\":[\"unfprnjletlxs\",\"rpddouifamo\",\"aziynknlqwzdv\",\"iwhxqszdtmaajq\"],\"dnsServerIps\":[\"xylrjvmtygjbmz\",\"ospspshckf\",\"yjpmspbpssdfppyo\",\"tieyujtvczkcny\"],\"sourceIp\":\"x\",\"dnsServices\":4260501750556213722,\"provisioningState\":\"Failed\",\"revision\":3692931466815096213},\"id\":\"nkvxlxpaglqi\",\"name\":\"bgkc\",\"type\":\"khpzvuqdflv\"}]}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - AvsManager manager = - AvsManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = - manager.workloadNetworks().listDnsZones("rehmr", "jhvsujztczyt", com.azure.core.util.Context.NONE); - - Assertions.assertEquals("w", response.iterator().next().displayName()); - Assertions.assertEquals("unfprnjletlxs", response.iterator().next().domain().get(0)); - Assertions.assertEquals("xylrjvmtygjbmz", response.iterator().next().dnsServerIps().get(0)); - Assertions.assertEquals("x", response.iterator().next().sourceIp()); - Assertions.assertEquals(4260501750556213722L, response.iterator().next().dnsServices()); - Assertions.assertEquals(3692931466815096213L, response.iterator().next().revision()); - } -} diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksListGatewaysMockTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksListGatewaysMockTests.java deleted file mode 100644 index 68d8ce0c2cae0..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksListGatewaysMockTests.java +++ /dev/null @@ -1,68 +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.avs.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.avs.AvsManager; -import com.azure.resourcemanager.avs.models.WorkloadNetworkGateway; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class WorkloadNetworksListGatewaysMockTests { - @Test - public void testListGateways() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"value\":[{\"properties\":{\"displayName\":\"mwwinhehfqpofv\",\"path\":\"cblembnkbwv\"},\"id\":\"vxkdivqihebwtswb\",\"name\":\"uwfmduragegizvc\",\"type\":\"felisdjub\"}]}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - AvsManager manager = - AvsManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = - manager.workloadNetworks().listGateways("dbxiqx", "iiqbi", com.azure.core.util.Context.NONE); - - Assertions.assertEquals("mwwinhehfqpofv", response.iterator().next().displayName()); - } -} diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksListMockTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksListMockTests.java deleted file mode 100644 index 23e185e6756c5..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksListMockTests.java +++ /dev/null @@ -1,64 +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.avs.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.avs.AvsManager; -import com.azure.resourcemanager.avs.models.WorkloadNetwork; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class WorkloadNetworksListMockTests { - @Test - public void testList() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = "{\"value\":[{\"id\":\"jeokbzefezrxccz\",\"name\":\"rtle\",\"type\":\"pqxbkwvzgnzvdf\"}]}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - AvsManager manager = - AvsManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = - manager.workloadNetworks().list("owxeqocljmy", "vkzqk", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksListPortMirroringMockTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksListPortMirroringMockTests.java deleted file mode 100644 index 23493c5338c77..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksListPortMirroringMockTests.java +++ /dev/null @@ -1,73 +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.avs.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.avs.AvsManager; -import com.azure.resourcemanager.avs.models.PortMirroringDirectionEnum; -import com.azure.resourcemanager.avs.models.WorkloadNetworkPortMirroring; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class WorkloadNetworksListPortMirroringMockTests { - @Test - public void testListPortMirroring() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"value\":[{\"properties\":{\"displayName\":\"zelfwyfwl\",\"direction\":\"BIDIRECTIONAL\",\"source\":\"etnpsihcl\",\"destination\":\"zvaylptrsqqw\",\"status\":\"FAILURE\",\"provisioningState\":\"Updating\",\"revision\":7455956743778499737},\"id\":\"hcxwaxfewzjk\",\"name\":\"exfdeqvhpsylk\",\"type\":\"shk\"}]}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - AvsManager manager = - AvsManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = - manager.workloadNetworks().listPortMirroring("qnyophzfyls", "crpfbcunez", com.azure.core.util.Context.NONE); - - Assertions.assertEquals("zelfwyfwl", response.iterator().next().displayName()); - Assertions.assertEquals(PortMirroringDirectionEnum.BIDIRECTIONAL, response.iterator().next().direction()); - Assertions.assertEquals("etnpsihcl", response.iterator().next().source()); - Assertions.assertEquals("zvaylptrsqqw", response.iterator().next().destination()); - Assertions.assertEquals(7455956743778499737L, response.iterator().next().revision()); - } -} diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksListPublicIPsMockTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksListPublicIPsMockTests.java deleted file mode 100644 index c1ed8904876dd..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksListPublicIPsMockTests.java +++ /dev/null @@ -1,69 +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.avs.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.avs.AvsManager; -import com.azure.resourcemanager.avs.models.WorkloadNetworkPublicIp; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class WorkloadNetworksListPublicIPsMockTests { - @Test - public void testListPublicIPs() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"value\":[{\"properties\":{\"displayName\":\"vsg\",\"numberOfPublicIPs\":8376929795743898853,\"publicIPBlock\":\"fz\",\"provisioningState\":\"Failed\"},\"id\":\"uxmmkjsvthnwp\",\"name\":\"tekovmri\",\"type\":\"iattgplu\"}]}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - AvsManager manager = - AvsManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = - manager.workloadNetworks().listPublicIPs("bakclacjfrnxous", "au", com.azure.core.util.Context.NONE); - - Assertions.assertEquals("vsg", response.iterator().next().displayName()); - Assertions.assertEquals(8376929795743898853L, response.iterator().next().numberOfPublicIPs()); - } -} diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksListSegmentsMockTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksListSegmentsMockTests.java deleted file mode 100644 index b0d201f1326c2..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksListSegmentsMockTests.java +++ /dev/null @@ -1,72 +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.avs.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.avs.AvsManager; -import com.azure.resourcemanager.avs.models.WorkloadNetworkSegment; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class WorkloadNetworksListSegmentsMockTests { - @Test - public void testListSegments() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"value\":[{\"properties\":{\"displayName\":\"qhewj\",\"connectedGateway\":\"mcgsbostzelnd\",\"subnet\":{\"dhcpRanges\":[\"tmzlbiojlv\",\"hrbbpneqvcwwyy\",\"r\",\"ochpprpr\"],\"gatewayAddress\":\"mo\"},\"portVif\":[{\"portName\":\"ejnhlbkpb\"},{\"portName\":\"cpilj\"},{\"portName\":\"hzvechndbnwieho\"}],\"status\":\"SUCCESS\",\"provisioningState\":\"Deleting\",\"revision\":3643909152585347696},\"id\":\"bwefqsfapaqtfer\",\"name\":\"q\",\"type\":\"ex\"}]}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - AvsManager manager = - AvsManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = - manager.workloadNetworks().listSegments("zdix", "mqpnoda", com.azure.core.util.Context.NONE); - - Assertions.assertEquals("qhewj", response.iterator().next().displayName()); - Assertions.assertEquals("mcgsbostzelnd", response.iterator().next().connectedGateway()); - Assertions.assertEquals("tmzlbiojlv", response.iterator().next().subnet().dhcpRanges().get(0)); - Assertions.assertEquals("mo", response.iterator().next().subnet().gatewayAddress()); - Assertions.assertEquals(3643909152585347696L, response.iterator().next().revision()); - } -} diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksListVMGroupsMockTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksListVMGroupsMockTests.java deleted file mode 100644 index 5622f11427148..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksListVMGroupsMockTests.java +++ /dev/null @@ -1,70 +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.avs.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.avs.AvsManager; -import com.azure.resourcemanager.avs.models.WorkloadNetworkVMGroup; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class WorkloadNetworksListVMGroupsMockTests { - @Test - public void testListVMGroups() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"value\":[{\"properties\":{\"displayName\":\"ds\",\"members\":[\"cobiegstmninwjiz\",\"i\"],\"status\":\"FAILURE\",\"provisioningState\":\"Deleting\",\"revision\":1072358778361989846},\"id\":\"jjtbxqmuluxlxqz\",\"name\":\"nersb\",\"type\":\"cucrwnamikze\"}]}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - AvsManager manager = - AvsManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = - manager.workloadNetworks().listVMGroups("ixmonstshiyxg", "elfclducc", com.azure.core.util.Context.NONE); - - Assertions.assertEquals("ds", response.iterator().next().displayName()); - Assertions.assertEquals("cobiegstmninwjiz", response.iterator().next().members().get(0)); - Assertions.assertEquals(1072358778361989846L, response.iterator().next().revision()); - } -} diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksListVirtualMachinesMockTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksListVirtualMachinesMockTests.java deleted file mode 100644 index f587ed3562aec..0000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksListVirtualMachinesMockTests.java +++ /dev/null @@ -1,70 +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.avs.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.avs.AvsManager; -import com.azure.resourcemanager.avs.models.WorkloadNetworkVirtualMachine; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class WorkloadNetworksListVirtualMachinesMockTests { - @Test - public void testListVirtualMachines() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"value\":[{\"properties\":{\"displayName\":\"xu\",\"vmType\":\"EDGE\"},\"id\":\"ksxwpnd\",\"name\":\"cpfnznthjtwkja\",\"type\":\"srxuzvoam\"}]}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - AvsManager manager = - AvsManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = - manager - .workloadNetworks() - .listVirtualMachines("cjxgrytf", "pcycilrmcaykg", com.azure.core.util.Context.NONE); - - Assertions.assertEquals("xu", response.iterator().next().displayName()); - } -}