diff --git a/sdk/avs/azure-resourcemanager-avs/CHANGELOG.md b/sdk/avs/azure-resourcemanager-avs/CHANGELOG.md index 13a16b3e459b..c798197486f8 100644 --- a/sdk/avs/azure-resourcemanager-avs/CHANGELOG.md +++ b/sdk/avs/azure-resourcemanager-avs/CHANGELOG.md @@ -1,14 +1,148 @@ # Release History -## 1.3.0-beta.1 (Unreleased) +## 1.0.0-beta.1 (2025-04-29) -### Features Added +- 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-2024-09-01. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). ### Breaking Changes -### Bugs Fixed +#### `models.WorkloadNetworkDhcpRelay` was modified + +* `provisioningState()` was removed +* `segments()` was removed + +#### `models.AddonArcProperties` was modified + +* `provisioningState()` was removed + +#### `models.VmPlacementPolicyProperties` was modified + +* `provisioningState()` was removed + +#### `models.AddonVrProperties` was modified + +* `provisioningState()` was removed + +#### `models.VmHostPlacementPolicyProperties` was modified + +* `provisioningState()` was removed + +#### `models.AddonHcxProperties` was modified + +* `provisioningState()` was removed + +#### `models.AddonSrmProperties` was modified + +* `provisioningState()` was removed + +#### `models.WorkloadNetworkDhcpServer` was modified + +* `provisioningState()` was removed +* `segments()` was removed + +### Features Added + +* `models.ProvisionedNetworkListResult` was added + +* `models.HostKind` was added + +* `models.ProvisionedNetwork` was added + +* `models.ResourceSkuRestrictionInfo` was added + +* `models.PureStoragePolicies` was added + +* `models.SpecializedHostProperties` was added + +* `models.ResourceSkuLocationInfo` was added + +* `models.PureStoragePolicy$UpdateStages` was added + +* `models.HostProvisioningState` was added + +* `models.GeneralHostProperties` was added + +* `models.HostMaintenance` was added + +* `models.Skus` was added + +* `models.HostModel` was added + +* `models.HostProperties` was added + +* `models.ProvisionedNetworks` was added + +* `models.ResourceSku` was added + +* `models.ResourceSkuRestrictionsReasonCode` was added + +* `models.HostListResult` was added + +* `models.ResourceSkuZoneDetails` was added + +* `models.ResourceSkuRestrictionsType` was added + +* `models.PureStoragePolicy$DefinitionStages` was added + +* `models.ResourceSkuResourceType` was added + +* `models.ResourceSkuRestrictions` was added + +* `models.PureStoragePolicy` was added + +* `models.PureStoragePolicy$Definition` was added + +* `models.ProvisionedNetworkProvisioningState` was added + +* `models.PureStorageVolume` was added + +* `models.ResourceSkuCapabilities` was added + +* `models.Hosts` was added + +* `models.PureStoragePolicy$Update` was added + +* `models.PagedResourceSku` was added + +* `models.PureStoragePolicyProvisioningState` was added + +* `models.PureStoragePolicyListResult` was added + +* `models.ProvisionedNetworkTypes` was added + +#### `models.Datastore` was modified + +* `pureStorageVolume()` was added + +#### `models.Datastore$Definition` was modified + +* `withPureStorageVolume(models.PureStorageVolume)` was added + +#### `AvsManager` was modified + +* `hosts()` was added +* `provisionedNetworks()` was added +* `pureStoragePolicies()` was added +* `skus()` was added + +#### `models.PrivateCloud$Definition` was modified + +* `withZones(java.util.List)` was added + +#### `models.AddonHcxProperties` was modified + +* `withUplinkNetwork(java.lang.String)` was added +* `uplinkNetwork()` was added +* `withManagementNetwork(java.lang.String)` was added +* `managementNetwork()` was added + +#### `models.Datastore$Update` was modified + +* `withPureStorageVolume(models.PureStorageVolume)` was added + +#### `models.PrivateCloud` was modified -### Other Changes +* `zones()` was added ## 1.2.0 (2024-09-11) diff --git a/sdk/avs/azure-resourcemanager-avs/README.md b/sdk/avs/azure-resourcemanager-avs/README.md index 416361b2a4c2..473e824dbfdd 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-09-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-2024-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 @@ -52,7 +52,7 @@ Azure subscription ID can be configured via `AZURE_SUBSCRIPTION_ID` environment Assuming the use of the `DefaultAzureCredential` credential class, the client can be authenticated using the following code: ```java -AzureProfile profile = new AzureProfile(AzureEnvironment.AZURE); +AzureProfile profile = new AzureProfile(AzureCloud.AZURE_PUBLIC_CLOUD); TokenCredential credential = new DefaultAzureCredentialBuilder() .authorityHost(profile.getEnvironment().getActiveDirectoryEndpoint()) .build(); @@ -60,7 +60,7 @@ AvsManager manager = AvsManager .authenticate(credential, profile); ``` -The sample code assumes global Azure. Please change `AzureEnvironment.AZURE` variable if otherwise. +The sample code assumes global Azure. Please change the `AzureCloud.AZURE_PUBLIC_CLOUD` variable if otherwise. See [Authentication][authenticate] for more options. @@ -111,5 +111,3 @@ This project has adopted the [Microsoft Open Source Code of Conduct][coc]. For m [cg]: https://github.com/Azure/azure-sdk-for-java/blob/main/CONTRIBUTING.md [coc]: https://opensource.microsoft.com/codeofconduct/ [coc_faq]: https://opensource.microsoft.com/codeofconduct/faq/ - - diff --git a/sdk/avs/azure-resourcemanager-avs/SAMPLE.md b/sdk/avs/azure-resourcemanager-avs/SAMPLE.md index 7cc376ef9f14..d28bca64db91 100644 --- a/sdk/avs/azure-resourcemanager-avs/SAMPLE.md +++ b/sdk/avs/azure-resourcemanager-avs/SAMPLE.md @@ -52,6 +52,11 @@ - [Get](#hcxenterprisesites_get) - [List](#hcxenterprisesites_list) +## Hosts + +- [Get](#hosts_get) +- [List](#hosts_list) + ## IscsiPaths - [CreateOrUpdate](#iscsipaths_createorupdate) @@ -88,6 +93,18 @@ - [RotateVcenterPassword](#privateclouds_rotatevcenterpassword) - [Update](#privateclouds_update) +## ProvisionedNetworks + +- [Get](#provisionednetworks_get) +- [List](#provisionednetworks_list) + +## PureStoragePolicies + +- [CreateOrUpdate](#purestoragepolicies_createorupdate) +- [Delete](#purestoragepolicies_delete) +- [Get](#purestoragepolicies_get) +- [List](#purestoragepolicies_list) + ## ScriptCmdlets - [Get](#scriptcmdlets_get) @@ -106,6 +123,10 @@ - [Get](#scriptpackages_get) - [List](#scriptpackages_list) +## Skus + +- [List](#skus_list) + ## VirtualMachines - [Get](#virtualmachines_get) @@ -157,82 +178,22 @@ ### Addons_CreateOrUpdate ```java -import com.azure.resourcemanager.avs.models.AddonArcProperties; -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 GlobalReachConnections Get. */ -public final class AddonsCreateOrUpdateSamples { - /* - * 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(); - } - - /* - * 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(); - } - - /* - * x-ms-original-file: - * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/Addons_CreateOrUpdate_ArcReg.json - */ - /** - * Sample code: Addons_CreateOrUpdate_ArcReg. - * - * @param manager Entry point to AvsManager. - */ - 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(); - } - +public final class GlobalReachConnectionsGetSamples { /* * x-ms-original-file: - * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/Addons_CreateOrUpdate_VR.json + * specification/vmware/resource-manager/Microsoft.AVS/stable/2024-09-01/examples/GlobalReachConnections_Get.json */ /** - * Sample code: Addons_CreateOrUpdate_VR. + * Sample code: GlobalReachConnections_Get. * * @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(); + public static void globalReachConnectionsGet(com.azure.resourcemanager.avs.AvsManager manager) { + manager.globalReachConnections() + .getWithResponse("group1", "cloud1", "connection1", com.azure.core.util.Context.NONE); } } ``` @@ -241,20 +202,20 @@ public final class AddonsCreateOrUpdateSamples { ```java /** - * Samples for Addons Delete. + * Samples for IscsiPaths Get. */ -public final class AddonsDeleteSamples { +public final class IscsiPathsGetSamples { /* * x-ms-original-file: - * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/Addons_Delete.json + * specification/vmware/resource-manager/Microsoft.AVS/stable/2024-09-01/examples/IscsiPaths_Get.json */ /** - * Sample code: Addons_Delete. + * Sample code: IscsiPaths_Get. * * @param manager Entry point to AvsManager. */ - public static void addonsDelete(com.azure.resourcemanager.avs.AvsManager manager) { - manager.addons().delete("group1", "cloud1", "srm", com.azure.core.util.Context.NONE); + public static void iscsiPathsGet(com.azure.resourcemanager.avs.AvsManager manager) { + manager.iscsiPaths().getWithResponse("group1", "cloud1", com.azure.core.util.Context.NONE); } } ``` @@ -262,60 +223,25 @@ public final class AddonsDeleteSamples { ### Addons_Get ```java +import com.azure.resourcemanager.avs.fluent.models.IscsiPathInner; + /** - * Samples for Addons Get. + * Samples for IscsiPaths CreateOrUpdate. */ -public final class AddonsGetSamples { - /* - * 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) { - manager.addons().getWithResponse("group1", "cloud1", "srm", com.azure.core.util.Context.NONE); - } - - /* - * 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) { - manager.addons().getWithResponse("group1", "cloud1", "vr", com.azure.core.util.Context.NONE); - } - - /* - * 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) { - manager.addons().getWithResponse("group1", "cloud1", "hcx", com.azure.core.util.Context.NONE); - } - +public final class IscsiPathsCreateOrUpdateSamples { /* * x-ms-original-file: - * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/Addons_Get_ArcReg.json + * specification/vmware/resource-manager/Microsoft.AVS/stable/2024-09-01/examples/IscsiPaths_CreateOrUpdate.json */ /** - * Sample code: Addons_Get_ArcReg. + * Sample code: IscsiPaths_CreateOrUpdate. * * @param manager Entry point to AvsManager. */ - public static void addonsGetArcReg(com.azure.resourcemanager.avs.AvsManager manager) { - manager.addons().getWithResponse("group1", "cloud1", "arc", com.azure.core.util.Context.NONE); + 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); } } ``` @@ -324,20 +250,20 @@ public final class AddonsGetSamples { ```java /** - * Samples for Addons List. + * Samples for IscsiPaths Delete. */ -public final class AddonsListSamples { +public final class IscsiPathsDeleteSamples { /* * x-ms-original-file: - * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/Addons_List.json + * specification/vmware/resource-manager/Microsoft.AVS/stable/2024-09-01/examples/IscsiPaths_Delete.json */ /** - * Sample code: Addons_List. + * Sample code: IscsiPaths_Delete. * * @param manager Entry point to AvsManager. */ - public static void addonsList(com.azure.resourcemanager.avs.AvsManager manager) { - manager.addons().list("group1", "cloud1", com.azure.core.util.Context.NONE); + public static void iscsiPathsDelete(com.azure.resourcemanager.avs.AvsManager manager) { + manager.iscsiPaths().delete("group1", "cloud1", com.azure.core.util.Context.NONE); } } ``` @@ -346,20 +272,20 @@ public final class AddonsListSamples { ```java /** - * Samples for Authorizations CreateOrUpdate. + * Samples for WorkloadNetworks ListVirtualMachines. */ -public final class AuthorizationsCreateOrUpdateSamples { +public final class WorkloadNetworksListVirtualMachinesSamples { /* - * x-ms-original-file: - * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/Authorizations_CreateOrUpdate.json + * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2024-09-01/examples/ + * WorkloadNetworks_ListVirtualMachines.json */ /** - * Sample code: Authorizations_CreateOrUpdate. + * Sample code: WorkloadNetworks_ListVirtualMachines. * * @param manager Entry point to AvsManager. */ - public static void authorizationsCreateOrUpdate(com.azure.resourcemanager.avs.AvsManager manager) { - manager.authorizations().define("authorization1").withExistingPrivateCloud("group1", "cloud1").create(); + public static void workloadNetworksListVirtualMachines(com.azure.resourcemanager.avs.AvsManager manager) { + manager.workloadNetworks().listVirtualMachines("group1", "cloud1", com.azure.core.util.Context.NONE); } } ``` @@ -367,21 +293,30 @@ public final class AuthorizationsCreateOrUpdateSamples { ### Authorizations_Delete ```java +import java.util.Arrays; + /** - * Samples for Authorizations Delete. + * Samples for WorkloadNetworks CreateVMGroup. */ -public final class AuthorizationsDeleteSamples { +public final class WorkloadNetworksCreateVMGroupSamples { /* * x-ms-original-file: - * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/Authorizations_Delete.json + * specification/vmware/resource-manager/Microsoft.AVS/stable/2024-09-01/examples/WorkloadNetworks_CreateVMGroup. + * json */ /** - * Sample code: Authorizations_Delete. + * Sample code: WorkloadNetworks_CreateVMGroup. * * @param manager Entry point to AvsManager. */ - public static void authorizationsDelete(com.azure.resourcemanager.avs.AvsManager manager) { - manager.authorizations().delete("group1", "cloud1", "authorization1", com.azure.core.util.Context.NONE); + 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(); } } ``` @@ -390,21 +325,22 @@ public final class AuthorizationsDeleteSamples { ```java /** - * Samples for Authorizations Get. + * Samples for ScriptCmdlets Get. */ -public final class AuthorizationsGetSamples { +public final class ScriptCmdletsGetSamples { /* * x-ms-original-file: - * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/Authorizations_Get.json + * specification/vmware/resource-manager/Microsoft.AVS/stable/2024-09-01/examples/ScriptCmdlets_Get.json */ /** - * Sample code: Authorizations_Get. + * Sample code: ScriptCmdlets_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); + 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); } } ``` @@ -413,20 +349,20 @@ public final class AuthorizationsGetSamples { ```java /** - * Samples for Authorizations List. + * Samples for PureStoragePolicies List. */ -public final class AuthorizationsListSamples { +public final class PureStoragePoliciesListSamples { /* * x-ms-original-file: - * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/Authorizations_List.json + * specification/vmware/resource-manager/Microsoft.AVS/stable/2024-09-01/examples/PureStoragePolicies_List.json */ /** - * Sample code: Authorizations_List. + * Sample code: PureStoragePolicies_List. * * @param manager Entry point to AvsManager. */ - public static void authorizationsList(com.azure.resourcemanager.avs.AvsManager manager) { - manager.authorizations().list("group1", "cloud1", com.azure.core.util.Context.NONE); + public static void pureStoragePoliciesList(com.azure.resourcemanager.avs.AvsManager manager) { + manager.pureStoragePolicies().list("group1", "cloud1", com.azure.core.util.Context.NONE); } } ``` @@ -434,26 +370,34 @@ public final class AuthorizationsListSamples { ### CloudLinks_CreateOrUpdate ```java +import com.azure.resourcemanager.avs.models.WorkloadNetworkDnsZone; +import java.util.Arrays; + /** - * Samples for CloudLinks CreateOrUpdate. + * Samples for WorkloadNetworks UpdateDnsZone. */ -public final class CloudLinksCreateOrUpdateSamples { +public final class WorkloadNetworksUpdateDnsZoneSamples { /* * x-ms-original-file: - * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/CloudLinks_CreateOrUpdate.json + * specification/vmware/resource-manager/Microsoft.AVS/stable/2024-09-01/examples/WorkloadNetworks_UpdateDnsZone. + * json */ /** - * Sample code: CloudLinks_CreateOrUpdate. + * Sample code: WorkloadNetworks_UpdateDnsZone. * * @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") - .create(); + 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(); } } ``` @@ -462,20 +406,21 @@ public final class CloudLinksCreateOrUpdateSamples { ```java /** - * Samples for CloudLinks Delete. + * Samples for PrivateClouds ListAdminCredentials. */ -public final class CloudLinksDeleteSamples { +public final class PrivateCloudsListAdminCredentialsSamples { /* * x-ms-original-file: - * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/CloudLinks_Delete.json + * specification/vmware/resource-manager/Microsoft.AVS/stable/2024-09-01/examples/PrivateClouds_ListAdminCredentials + * .json */ /** - * Sample code: CloudLinks_Delete. + * Sample code: PrivateClouds_ListAdminCredentials. * * @param manager Entry point to AvsManager. */ - public static void cloudLinksDelete(com.azure.resourcemanager.avs.AvsManager manager) { - manager.cloudLinks().delete("group1", "cloud1", "cloudLink1", com.azure.core.util.Context.NONE); + public static void privateCloudsListAdminCredentials(com.azure.resourcemanager.avs.AvsManager manager) { + manager.privateClouds().listAdminCredentialsWithResponse("group1", "cloud1", com.azure.core.util.Context.NONE); } } ``` @@ -483,21 +428,32 @@ public final class CloudLinksDeleteSamples { ### CloudLinks_Get ```java +import java.util.Arrays; + /** - * Samples for CloudLinks Get. + * Samples for WorkloadNetworks CreateDnsZone. */ -public final class CloudLinksGetSamples { +public final class WorkloadNetworksCreateDnsZoneSamples { /* * x-ms-original-file: - * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/CloudLinks_Get.json + * specification/vmware/resource-manager/Microsoft.AVS/stable/2024-09-01/examples/WorkloadNetworks_CreateDnsZone. + * json */ /** - * Sample code: CloudLinks_Get. + * Sample code: WorkloadNetworks_CreateDnsZone. * * @param manager Entry point to AvsManager. */ - public static void cloudLinksGet(com.azure.resourcemanager.avs.AvsManager manager) { - manager.cloudLinks().getWithResponse("group1", "cloud1", "cloudLink1", com.azure.core.util.Context.NONE); + 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(); } } ``` @@ -505,21 +461,33 @@ public final class CloudLinksGetSamples { ### CloudLinks_List ```java +import com.azure.resourcemanager.avs.models.WorkloadNetworkSegmentSubnet; +import java.util.Arrays; + /** - * Samples for CloudLinks List. + * Samples for WorkloadNetworks CreateSegments. */ -public final class CloudLinksListSamples { +public final class WorkloadNetworksCreateSegmentsSamples { /* * x-ms-original-file: - * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/CloudLinks_List.json + * specification/vmware/resource-manager/Microsoft.AVS/stable/2024-09-01/examples/WorkloadNetworks_CreateSegments. + * json */ /** - * Sample code: CloudLinks_List. + * Sample code: WorkloadNetworks_CreateSegments. * * @param manager Entry point to AvsManager. */ - public static void cloudLinksList(com.azure.resourcemanager.avs.AvsManager manager) { - manager.cloudLinks().list("group1", "cloud1", com.azure.core.util.Context.NONE); + 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(); } } ``` @@ -527,28 +495,21 @@ public final class CloudLinksListSamples { ### Clusters_CreateOrUpdate ```java -import com.azure.resourcemanager.avs.models.Sku; - /** - * Samples for Clusters CreateOrUpdate. + * Samples for HcxEnterpriseSites Delete. */ -public final class ClustersCreateOrUpdateSamples { +public final class HcxEnterpriseSitesDeleteSamples { /* * x-ms-original-file: - * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/Clusters_CreateOrUpdate.json + * specification/vmware/resource-manager/Microsoft.AVS/stable/2024-09-01/examples/HcxEnterpriseSites_Delete.json */ /** - * Sample code: Clusters_CreateOrUpdate. + * Sample code: HcxEnterpriseSites_Delete. * * @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(); + public static void hcxEnterpriseSitesDelete(com.azure.resourcemanager.avs.AvsManager manager) { + manager.hcxEnterpriseSites().deleteWithResponse("group1", "cloud1", "site1", com.azure.core.util.Context.NONE); } } ``` @@ -557,20 +518,20 @@ public final class ClustersCreateOrUpdateSamples { ```java /** - * Samples for Clusters Delete. + * Samples for CloudLinks Get. */ -public final class ClustersDeleteSamples { +public final class CloudLinksGetSamples { /* * x-ms-original-file: - * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/Clusters_Delete.json + * specification/vmware/resource-manager/Microsoft.AVS/stable/2024-09-01/examples/CloudLinks_Get.json */ /** - * Sample code: Clusters_Delete. + * Sample code: CloudLinks_Get. * * @param manager Entry point to AvsManager. */ - public static void clustersDelete(com.azure.resourcemanager.avs.AvsManager manager) { - manager.clusters().delete("group1", "cloud1", "cluster1", com.azure.core.util.Context.NONE); + public static void cloudLinksGet(com.azure.resourcemanager.avs.AvsManager manager) { + manager.cloudLinks().getWithResponse("group1", "cloud1", "cloudLink1", com.azure.core.util.Context.NONE); } } ``` @@ -579,20 +540,20 @@ public final class ClustersDeleteSamples { ```java /** - * Samples for Clusters Get. + * Samples for ScriptExecutions Delete. */ -public final class ClustersGetSamples { +public final class ScriptExecutionsDeleteSamples { /* * x-ms-original-file: - * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/Clusters_Get.json + * specification/vmware/resource-manager/Microsoft.AVS/stable/2024-09-01/examples/ScriptExecutions_Delete.json */ /** - * Sample code: Clusters_Get. + * Sample code: ScriptExecutions_Delete. * * @param manager Entry point to AvsManager. */ - public static void clustersGet(com.azure.resourcemanager.avs.AvsManager manager) { - manager.clusters().getWithResponse("group1", "cloud1", "cluster1", com.azure.core.util.Context.NONE); + public static void scriptExecutionsDelete(com.azure.resourcemanager.avs.AvsManager manager) { + manager.scriptExecutions().delete("group1", "cloud1", "addSsoServer", com.azure.core.util.Context.NONE); } } ``` @@ -601,20 +562,20 @@ public final class ClustersGetSamples { ```java /** - * Samples for Clusters List. + * Samples for Datastores List. */ -public final class ClustersListSamples { +public final class DatastoresListSamples { /* * x-ms-original-file: - * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/Clusters_List.json + * specification/vmware/resource-manager/Microsoft.AVS/stable/2024-09-01/examples/Datastores_List.json */ /** - * Sample code: Clusters_List. + * Sample code: Datastores_List. * * @param manager Entry point to AvsManager. */ - public static void clustersList(com.azure.resourcemanager.avs.AvsManager manager) { - manager.clusters().list("group1", "cloud1", com.azure.core.util.Context.NONE); + public static void datastoresList(com.azure.resourcemanager.avs.AvsManager manager) { + manager.datastores().list("group1", "cloud1", "cluster1", com.azure.core.util.Context.NONE); } } ``` @@ -623,111 +584,118 @@ public final class ClustersListSamples { ```java /** - * Samples for Clusters ListZones. + * Samples for PlacementPolicies List. */ -public final class ClustersListZonesSamples { +public final class PlacementPoliciesListSamples { /* * x-ms-original-file: - * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/Clusters_ListZones.json + * specification/vmware/resource-manager/Microsoft.AVS/stable/2024-09-01/examples/PlacementPolicies_List.json */ /** - * Sample code: Clusters_ListZones. + * Sample code: PlacementPolicies_List. * * @param manager Entry point to AvsManager. */ - public static void clustersListZones(com.azure.resourcemanager.avs.AvsManager manager) { - manager.clusters().listZonesWithResponse("group1", "cloud1", "cluster1", com.azure.core.util.Context.NONE); + public static void placementPoliciesList(com.azure.resourcemanager.avs.AvsManager manager) { + manager.placementPolicies().list("group1", "cloud1", "cluster1", com.azure.core.util.Context.NONE); } +} +``` + +### Clusters_Update +```java +/** + * Samples for HcxEnterpriseSites CreateOrUpdate. + */ +public final class HcxEnterpriseSitesCreateOrUpdateSamples { /* * x-ms-original-file: - * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/Clusters_ListZones_Stretched.json + * specification/vmware/resource-manager/Microsoft.AVS/stable/2024-09-01/examples/HcxEnterpriseSites_CreateOrUpdate. + * json */ /** - * Sample code: Clusters_ListZones_Stretched. + * Sample code: HcxEnterpriseSites_CreateOrUpdate. * * @param manager Entry point to AvsManager. */ - public static void clustersListZonesStretched(com.azure.resourcemanager.avs.AvsManager manager) { - manager.clusters().listZonesWithResponse("group1", "cloud1", "cluster1", com.azure.core.util.Context.NONE); + public static void hcxEnterpriseSitesCreateOrUpdate(com.azure.resourcemanager.avs.AvsManager manager) { + manager.hcxEnterpriseSites().define("site1").withExistingPrivateCloud("group1", "cloud1").create(); } } ``` -### Clusters_Update +### Datastores_CreateOrUpdate ```java -import com.azure.resourcemanager.avs.models.Cluster; +import com.azure.resourcemanager.avs.models.AffinityStrength; +import com.azure.resourcemanager.avs.models.AzureHybridBenefitType; +import com.azure.resourcemanager.avs.models.PlacementPolicy; +import com.azure.resourcemanager.avs.models.PlacementPolicyState; +import java.util.Arrays; /** - * Samples for Clusters Update. + * Samples for PlacementPolicies Update. */ -public final class ClustersUpdateSamples { +public final class PlacementPoliciesUpdateSamples { /* * x-ms-original-file: - * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/Clusters_Update.json + * specification/vmware/resource-manager/Microsoft.AVS/stable/2024-09-01/examples/PlacementPolicies_Update.json */ /** - * Sample code: Clusters_Update. + * Sample code: PlacementPolicies_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) + 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().withClusterSize(4).apply(); + 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(); } } ``` -### Datastores_CreateOrUpdate +### Datastores_Delete ```java -import com.azure.resourcemanager.avs.models.NetAppVolume; - /** - * Samples for Datastores CreateOrUpdate. + * Samples for PrivateClouds ListByResourceGroup. */ -public final class DatastoresCreateOrUpdateSamples { +public final class PrivateCloudsListByResourceGroupSamples { /* * x-ms-original-file: - * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/Datastores_CreateOrUpdate.json + * specification/vmware/resource-manager/Microsoft.AVS/stable/2024-09-01/examples/PrivateClouds_List.json */ /** - * Sample code: Datastores_CreateOrUpdate. + * Sample code: PrivateClouds_List. * * @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")) - .create(); + public static void privateCloudsList(com.azure.resourcemanager.avs.AvsManager manager) { + manager.privateClouds().listByResourceGroup("group1", com.azure.core.util.Context.NONE); } -} -``` - -### Datastores_Delete -```java -/** - * Samples for Datastores Delete. - */ -public final class DatastoresDeleteSamples { /* * x-ms-original-file: - * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/Datastores_Delete.json + * specification/vmware/resource-manager/Microsoft.AVS/stable/2024-09-01/examples/PrivateClouds_List_Stretched.json */ /** - * Sample code: Datastores_Delete. + * Sample code: PrivateClouds_List_Stretched. * * @param manager Entry point to AvsManager. */ - public static void datastoresDelete(com.azure.resourcemanager.avs.AvsManager manager) { - manager.datastores().delete("group1", "cloud1", "cluster1", "datastore1", com.azure.core.util.Context.NONE); + public static void privateCloudsListStretched(com.azure.resourcemanager.avs.AvsManager manager) { + manager.privateClouds().listByResourceGroup("group1", com.azure.core.util.Context.NONE); } } ``` @@ -736,21 +704,20 @@ public final class DatastoresDeleteSamples { ```java /** - * Samples for Datastores Get. + * Samples for ProvisionedNetworks Get. */ -public final class DatastoresGetSamples { +public final class ProvisionedNetworksGetSamples { /* * x-ms-original-file: - * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/Datastores_Get.json + * specification/vmware/resource-manager/Microsoft.AVS/stable/2024-09-01/examples/ProvisionedNetworks_Get.json */ /** - * Sample code: Datastores_Get. + * Sample code: ProvisionedNetworks_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); + public static void provisionedNetworksGet(com.azure.resourcemanager.avs.AvsManager manager) { + manager.provisionedNetworks().getWithResponse("group1", "cloud1", "vsan", com.azure.core.util.Context.NONE); } } ``` @@ -758,21 +725,28 @@ public final class DatastoresGetSamples { ### Datastores_List ```java +import com.azure.resourcemanager.avs.models.Sku; + /** - * Samples for Datastores List. + * Samples for Clusters CreateOrUpdate. */ -public final class DatastoresListSamples { +public final class ClustersCreateOrUpdateSamples { /* * x-ms-original-file: - * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/Datastores_List.json + * specification/vmware/resource-manager/Microsoft.AVS/stable/2024-09-01/examples/Clusters_CreateOrUpdate.json */ /** - * Sample code: Datastores_List. + * Sample code: Clusters_CreateOrUpdate. * * @param manager Entry point to AvsManager. */ - public static void datastoresList(com.azure.resourcemanager.avs.AvsManager manager) { - manager.datastores().list("group1", "cloud1", "cluster1", com.azure.core.util.Context.NONE); + 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(); } } ``` @@ -781,26 +755,21 @@ public final class DatastoresListSamples { ```java /** - * Samples for GlobalReachConnections CreateOrUpdate. + * Samples for PureStoragePolicies Get. */ -public final class GlobalReachConnectionsCreateOrUpdateSamples { +public final class PureStoragePoliciesGetSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/ - * GlobalReachConnections_CreateOrUpdate.json + * x-ms-original-file: + * specification/vmware/resource-manager/Microsoft.AVS/stable/2024-09-01/examples/PureStoragePolicies_Get.json */ /** - * Sample code: GlobalReachConnections_CreateOrUpdate. + * Sample code: PureStoragePolicies_Get. * * @param manager Entry point to AvsManager. */ - public static void globalReachConnectionsCreateOrUpdate(com.azure.resourcemanager.avs.AvsManager manager) { - 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") - .create(); + public static void pureStoragePoliciesGet(com.azure.resourcemanager.avs.AvsManager manager) { + manager.pureStoragePolicies() + .getWithResponse("group1", "cloud1", "storagePolicy1", com.azure.core.util.Context.NONE); } } ``` @@ -809,20 +778,20 @@ public final class GlobalReachConnectionsCreateOrUpdateSamples { ```java /** - * Samples for GlobalReachConnections Delete. + * Samples for Clusters Get. */ -public final class GlobalReachConnectionsDeleteSamples { +public final class ClustersGetSamples { /* * x-ms-original-file: - * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/GlobalReachConnections_Delete.json + * specification/vmware/resource-manager/Microsoft.AVS/stable/2024-09-01/examples/Clusters_Get.json */ /** - * Sample code: GlobalReachConnections_Delete. + * Sample code: Clusters_Get. * * @param manager Entry point to AvsManager. */ - public static void globalReachConnectionsDelete(com.azure.resourcemanager.avs.AvsManager manager) { - manager.globalReachConnections().delete("group1", "cloud1", "connection1", com.azure.core.util.Context.NONE); + public static void clustersGet(com.azure.resourcemanager.avs.AvsManager manager) { + manager.clusters().getWithResponse("group1", "cloud1", "cluster1", com.azure.core.util.Context.NONE); } } ``` @@ -830,22 +799,34 @@ public final class GlobalReachConnectionsDeleteSamples { ### GlobalReachConnections_Get ```java +import com.azure.resourcemanager.avs.models.WorkloadNetworkSegment; +import com.azure.resourcemanager.avs.models.WorkloadNetworkSegmentSubnet; +import java.util.Arrays; + /** - * Samples for GlobalReachConnections Get. + * Samples for WorkloadNetworks UpdateSegments. */ -public final class GlobalReachConnectionsGetSamples { +public final class WorkloadNetworksUpdateSegmentsSamples { /* * x-ms-original-file: - * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/GlobalReachConnections_Get.json + * specification/vmware/resource-manager/Microsoft.AVS/stable/2024-09-01/examples/WorkloadNetworks_UpdateSegments. + * json */ /** - * Sample code: GlobalReachConnections_Get. + * Sample code: WorkloadNetworks_UpdateSegments. * * @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); + 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(); + 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(); } } ``` @@ -854,20 +835,20 @@ public final class GlobalReachConnectionsGetSamples { ```java /** - * Samples for GlobalReachConnections List. + * Samples for Authorizations CreateOrUpdate. */ -public final class GlobalReachConnectionsListSamples { +public final class AuthorizationsCreateOrUpdateSamples { /* * x-ms-original-file: - * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/GlobalReachConnections_List.json + * specification/vmware/resource-manager/Microsoft.AVS/stable/2024-09-01/examples/Authorizations_CreateOrUpdate.json */ /** - * Sample code: GlobalReachConnections_List. + * Sample code: Authorizations_CreateOrUpdate. * * @param manager Entry point to AvsManager. */ - public static void globalReachConnectionsList(com.azure.resourcemanager.avs.AvsManager manager) { - manager.globalReachConnections().list("group1", "cloud1", com.azure.core.util.Context.NONE); + public static void authorizationsCreateOrUpdate(com.azure.resourcemanager.avs.AvsManager manager) { + manager.authorizations().define("authorization1").withExistingPrivateCloud("group1", "cloud1").create(); } } ``` @@ -876,21 +857,21 @@ public final class GlobalReachConnectionsListSamples { ```java /** - * Samples for HcxEnterpriseSites CreateOrUpdate. + * Samples for WorkloadNetworks GetDnsZone. */ -public final class HcxEnterpriseSitesCreateOrUpdateSamples { +public final class WorkloadNetworksGetDnsZoneSamples { /* * x-ms-original-file: - * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/HcxEnterpriseSites_CreateOrUpdate. - * json + * specification/vmware/resource-manager/Microsoft.AVS/stable/2024-09-01/examples/WorkloadNetworks_GetDnsZone.json */ /** - * Sample code: HcxEnterpriseSites_CreateOrUpdate. + * Sample code: WorkloadNetworks_GetDnsZone. * * @param manager Entry point to AvsManager. */ - public static void hcxEnterpriseSitesCreateOrUpdate(com.azure.resourcemanager.avs.AvsManager manager) { - manager.hcxEnterpriseSites().define("site1").withExistingPrivateCloud("group1", "cloud1").create(); + public static void workloadNetworksGetDnsZone(com.azure.resourcemanager.avs.AvsManager manager) { + manager.workloadNetworks() + .getDnsZoneWithResponse("group1", "cloud1", "dnsZone1", com.azure.core.util.Context.NONE); } } ``` @@ -899,20 +880,20 @@ public final class HcxEnterpriseSitesCreateOrUpdateSamples { ```java /** - * Samples for HcxEnterpriseSites Delete. + * Samples for VirtualMachines List. */ -public final class HcxEnterpriseSitesDeleteSamples { +public final class VirtualMachinesListSamples { /* * x-ms-original-file: - * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/HcxEnterpriseSites_Delete.json + * specification/vmware/resource-manager/Microsoft.AVS/stable/2024-09-01/examples/VirtualMachines_List.json */ /** - * Sample code: HcxEnterpriseSites_Delete. + * Sample code: VirtualMachines_List. * * @param manager Entry point to AvsManager. */ - public static void hcxEnterpriseSitesDelete(com.azure.resourcemanager.avs.AvsManager manager) { - manager.hcxEnterpriseSites().deleteWithResponse("group1", "cloud1", "site1", com.azure.core.util.Context.NONE); + public static void virtualMachinesList(com.azure.resourcemanager.avs.AvsManager manager) { + manager.virtualMachines().list("group1", "cloud1", "cluster1", com.azure.core.util.Context.NONE); } } ``` @@ -920,21 +901,28 @@ public final class HcxEnterpriseSitesDeleteSamples { ### HcxEnterpriseSites_Get ```java +import com.azure.resourcemanager.avs.models.VirtualMachineRestrictMovement; +import com.azure.resourcemanager.avs.models.VirtualMachineRestrictMovementState; + /** - * Samples for HcxEnterpriseSites Get. + * Samples for VirtualMachines RestrictMovement. */ -public final class HcxEnterpriseSitesGetSamples { +public final class VirtualMachinesRestrictMovementSamples { /* * x-ms-original-file: - * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/HcxEnterpriseSites_Get.json + * specification/vmware/resource-manager/Microsoft.AVS/stable/2024-09-01/examples/VirtualMachines_RestrictMovement. + * json */ /** - * Sample code: HcxEnterpriseSites_Get. + * Sample code: VirtualMachines_RestrictMovement. * * @param manager Entry point to AvsManager. */ - public static void hcxEnterpriseSitesGet(com.azure.resourcemanager.avs.AvsManager manager) { - manager.hcxEnterpriseSites().getWithResponse("group1", "cloud1", "site1", 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); } } ``` @@ -943,482 +931,862 @@ public final class HcxEnterpriseSitesGetSamples { ```java /** - * Samples for HcxEnterpriseSites List. + * Samples for WorkloadNetworks DeleteVMGroup. */ -public final class HcxEnterpriseSitesListSamples { +public final class WorkloadNetworksDeleteVMGroupSamples { /* * x-ms-original-file: - * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/HcxEnterpriseSites_List.json + * specification/vmware/resource-manager/Microsoft.AVS/stable/2024-09-01/examples/WorkloadNetworks_DeleteVMGroup. + * json */ /** - * Sample code: HcxEnterpriseSites_List. + * Sample code: WorkloadNetworks_DeleteVMGroup. * * @param manager Entry point to AvsManager. */ - public static void hcxEnterpriseSitesList(com.azure.resourcemanager.avs.AvsManager manager) { - manager.hcxEnterpriseSites().list("group1", "cloud1", com.azure.core.util.Context.NONE); + public static void workloadNetworksDeleteVMGroup(com.azure.resourcemanager.avs.AvsManager manager) { + manager.workloadNetworks().deleteVMGroup("group1", "vmGroup1", "cloud1", com.azure.core.util.Context.NONE); } } ``` -### IscsiPaths_CreateOrUpdate +### Hosts_Get ```java -import com.azure.resourcemanager.avs.fluent.models.IscsiPathInner; - /** - * Samples for IscsiPaths CreateOrUpdate. + * Samples for PlacementPolicies Delete. */ -public final class IscsiPathsCreateOrUpdateSamples { +public final class PlacementPoliciesDeleteSamples { /* * x-ms-original-file: - * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/IscsiPaths_CreateOrUpdate.json + * specification/vmware/resource-manager/Microsoft.AVS/stable/2024-09-01/examples/PlacementPolicies_Delete.json */ /** - * Sample code: IscsiPaths_CreateOrUpdate. + * Sample code: PlacementPolicies_Delete. * * @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); + public static void placementPoliciesDelete(com.azure.resourcemanager.avs.AvsManager manager) { + manager.placementPolicies().delete("group1", "cloud1", "cluster1", "policy1", com.azure.core.util.Context.NONE); } } ``` -### IscsiPaths_Delete +### Hosts_List ```java /** - * Samples for IscsiPaths Delete. + * Samples for WorkloadNetworks ListSegments. */ -public final class IscsiPathsDeleteSamples { +public final class WorkloadNetworksListSegmentsSamples { /* * x-ms-original-file: - * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/IscsiPaths_Delete.json + * specification/vmware/resource-manager/Microsoft.AVS/stable/2024-09-01/examples/WorkloadNetworks_ListSegments.json */ /** - * Sample code: IscsiPaths_Delete. + * Sample code: WorkloadNetworks_ListSegments. * * @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); + public static void workloadNetworksListSegments(com.azure.resourcemanager.avs.AvsManager manager) { + manager.workloadNetworks().listSegments("group1", "cloud1", com.azure.core.util.Context.NONE); } } ``` -### IscsiPaths_Get +### IscsiPaths_CreateOrUpdate ```java /** - * Samples for IscsiPaths Get. + * Samples for Authorizations List. */ -public final class IscsiPathsGetSamples { +public final class AuthorizationsListSamples { /* * x-ms-original-file: - * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/IscsiPaths_Get.json + * specification/vmware/resource-manager/Microsoft.AVS/stable/2024-09-01/examples/Authorizations_List.json */ /** - * Sample code: IscsiPaths_Get. + * Sample code: Authorizations_List. * * @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); + public static void authorizationsList(com.azure.resourcemanager.avs.AvsManager manager) { + manager.authorizations().list("group1", "cloud1", com.azure.core.util.Context.NONE); } } ``` -### IscsiPaths_ListByPrivateCloud +### IscsiPaths_Delete ```java /** - * Samples for IscsiPaths ListByPrivateCloud. + * Samples for WorkloadNetworks GetDhcp. */ -public final class IscsiPathsListByPrivateCloudSamples { +public final class WorkloadNetworksGetDhcpSamples { /* * x-ms-original-file: - * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/IscsiPaths_List.json + * specification/vmware/resource-manager/Microsoft.AVS/stable/2024-09-01/examples/WorkloadNetworks_GetDhcp.json */ /** - * Sample code: IscsiPaths_ListByPrivateCloud. + * Sample code: WorkloadNetworks_GetDhcp. * * @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); + public static void workloadNetworksGetDhcp(com.azure.resourcemanager.avs.AvsManager manager) { + manager.workloadNetworks().getDhcpWithResponse("group1", "dhcp1", "cloud1", com.azure.core.util.Context.NONE); } } ``` -### Locations_CheckQuotaAvailability +### IscsiPaths_Get ```java /** - * Samples for Locations CheckQuotaAvailability. + * Samples for WorkloadNetworks ListDhcp. */ -public final class LocationsCheckQuotaAvailabilitySamples { +public final class WorkloadNetworksListDhcpSamples { /* * x-ms-original-file: - * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/Locations_CheckQuotaAvailability. - * json + * specification/vmware/resource-manager/Microsoft.AVS/stable/2024-09-01/examples/WorkloadNetworks_ListDhcp.json */ /** - * Sample code: Locations_CheckQuotaAvailability. + * Sample code: WorkloadNetworks_ListDhcp. * * @param manager Entry point to AvsManager. */ - public static void locationsCheckQuotaAvailability(com.azure.resourcemanager.avs.AvsManager manager) { - manager.locations().checkQuotaAvailabilityWithResponse("eastus", com.azure.core.util.Context.NONE); + public static void workloadNetworksListDhcp(com.azure.resourcemanager.avs.AvsManager manager) { + manager.workloadNetworks().listDhcp("group1", "cloud1", com.azure.core.util.Context.NONE); } } ``` -### Locations_CheckTrialAvailability +### IscsiPaths_ListByPrivateCloud ```java -import com.azure.resourcemanager.avs.models.Sku; - /** - * Samples for Locations CheckTrialAvailability. + * Samples for GlobalReachConnections List. */ -public final class LocationsCheckTrialAvailabilitySamples { +public final class GlobalReachConnectionsListSamples { /* * x-ms-original-file: - * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/Locations_CheckTrialAvailability. - * json + * specification/vmware/resource-manager/Microsoft.AVS/stable/2024-09-01/examples/GlobalReachConnections_List.json */ /** - * Sample code: Locations_CheckTrialAvailability. + * Sample code: GlobalReachConnections_List. * * @param manager Entry point to AvsManager. */ - public static void locationsCheckTrialAvailability(com.azure.resourcemanager.avs.AvsManager manager) { - manager.locations().checkTrialAvailabilityWithResponse("eastus", null, com.azure.core.util.Context.NONE); + public static void globalReachConnectionsList(com.azure.resourcemanager.avs.AvsManager manager) { + manager.globalReachConnections().list("group1", "cloud1", com.azure.core.util.Context.NONE); } +} +``` + +### Locations_CheckQuotaAvailability +```java +/** + * Samples for Datastores Get. + */ +public final class DatastoresGetSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/ - * Locations_CheckTrialAvailabilityWithSku.json + * x-ms-original-file: + * specification/vmware/resource-manager/Microsoft.AVS/stable/2024-09-01/examples/Datastores_Get.json */ /** - * Sample code: Locations_CheckTrialAvailabilityWithSku. + * Sample code: Datastores_Get. * * @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); + public static void datastoresGet(com.azure.resourcemanager.avs.AvsManager manager) { + manager.datastores() + .getWithResponse("group1", "cloud1", "cluster1", "datastore1", com.azure.core.util.Context.NONE); } } ``` -### Operations_List +### Locations_CheckTrialAvailability ```java /** - * Samples for Operations List. + * Samples for IscsiPaths ListByPrivateCloud. */ -public final class OperationsListSamples { +public final class IscsiPathsListByPrivateCloudSamples { /* * x-ms-original-file: - * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/Operations_List.json + * specification/vmware/resource-manager/Microsoft.AVS/stable/2024-09-01/examples/IscsiPaths_List.json */ /** - * Sample code: Operations_List. + * Sample code: IscsiPaths_ListByPrivateCloud. * * @param manager Entry point to AvsManager. */ - public static void operationsList(com.azure.resourcemanager.avs.AvsManager manager) { - manager.operations().list(com.azure.core.util.Context.NONE); + public static void iscsiPathsListByPrivateCloud(com.azure.resourcemanager.avs.AvsManager manager) { + manager.iscsiPaths().listByPrivateCloud("group1", "cloud1", com.azure.core.util.Context.NONE); } } ``` -### PlacementPolicies_CreateOrUpdate +### Operations_List ```java -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.VmHostPlacementPolicyProperties; -import java.util.Arrays; - /** - * Samples for PlacementPolicies CreateOrUpdate. + * Samples for Clusters ListZones. */ -public final class PlacementPoliciesCreateOrUpdateSamples { +public final class ClustersListZonesSamples { /* * x-ms-original-file: - * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/PlacementPolicies_CreateOrUpdate. - * json + * specification/vmware/resource-manager/Microsoft.AVS/stable/2024-09-01/examples/Clusters_ListZones.json */ /** - * Sample code: PlacementPolicies_CreateOrUpdate. + * Sample code: Clusters_ListZones. * * @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)) - .create(); + 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/2024-09-01/examples/Clusters_ListZones_Stretched.json + */ + /** + * Sample code: Clusters_ListZones_Stretched. + * + * @param manager Entry point to AvsManager. + */ + public static void clustersListZonesStretched(com.azure.resourcemanager.avs.AvsManager manager) { + manager.clusters().listZonesWithResponse("group1", "cloud1", "cluster1", com.azure.core.util.Context.NONE); } } ``` -### PlacementPolicies_Delete +### PlacementPolicies_CreateOrUpdate ```java /** - * Samples for PlacementPolicies Delete. + * Samples for GlobalReachConnections CreateOrUpdate. */ -public final class PlacementPoliciesDeleteSamples { +public final class GlobalReachConnectionsCreateOrUpdateSamples { /* - * x-ms-original-file: - * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/PlacementPolicies_Delete.json + * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2024-09-01/examples/ + * GlobalReachConnections_CreateOrUpdate.json */ /** - * Sample code: PlacementPolicies_Delete. + * Sample code: GlobalReachConnections_CreateOrUpdate. * * @param manager Entry point to AvsManager. */ - public static void placementPoliciesDelete(com.azure.resourcemanager.avs.AvsManager manager) { - manager.placementPolicies().delete("group1", "cloud1", "cluster1", "policy1", com.azure.core.util.Context.NONE); + public static void globalReachConnectionsCreateOrUpdate(com.azure.resourcemanager.avs.AvsManager manager) { + 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") + .create(); } } ``` -### PlacementPolicies_Get +### PlacementPolicies_Delete ```java /** - * Samples for PlacementPolicies Get. + * Samples for VirtualMachines Get. */ -public final class PlacementPoliciesGetSamples { +public final class VirtualMachinesGetSamples { /* * x-ms-original-file: - * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/PlacementPolicies_Get.json + * specification/vmware/resource-manager/Microsoft.AVS/stable/2024-09-01/examples/VirtualMachines_Get.json */ /** - * Sample code: PlacementPolicies_Get. + * Sample code: VirtualMachines_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); + public static void virtualMachinesGet(com.azure.resourcemanager.avs.AvsManager manager) { + manager.virtualMachines() + .getWithResponse("group1", "cloud1", "cluster1", "vm-209", com.azure.core.util.Context.NONE); } } ``` -### PlacementPolicies_List +### PlacementPolicies_Get ```java /** - * Samples for PlacementPolicies List. + * Samples for Authorizations Delete. */ -public final class PlacementPoliciesListSamples { +public final class AuthorizationsDeleteSamples { /* * x-ms-original-file: - * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/PlacementPolicies_List.json + * specification/vmware/resource-manager/Microsoft.AVS/stable/2024-09-01/examples/Authorizations_Delete.json */ /** - * Sample code: PlacementPolicies_List. + * Sample code: Authorizations_Delete. * * @param manager Entry point to AvsManager. */ - public static void placementPoliciesList(com.azure.resourcemanager.avs.AvsManager manager) { - manager.placementPolicies().list("group1", "cloud1", "cluster1", com.azure.core.util.Context.NONE); + public static void authorizationsDelete(com.azure.resourcemanager.avs.AvsManager manager) { + manager.authorizations().delete("group1", "cloud1", "authorization1", com.azure.core.util.Context.NONE); } } ``` -### PlacementPolicies_Update +### PlacementPolicies_List ```java -import com.azure.resourcemanager.avs.models.AffinityStrength; -import com.azure.resourcemanager.avs.models.AzureHybridBenefitType; -import com.azure.resourcemanager.avs.models.PlacementPolicy; -import com.azure.resourcemanager.avs.models.PlacementPolicyState; -import java.util.Arrays; +import com.azure.resourcemanager.avs.models.AddonArcProperties; +import com.azure.resourcemanager.avs.models.AddonHcxProperties; +import com.azure.resourcemanager.avs.models.AddonSrmProperties; +import com.azure.resourcemanager.avs.models.AddonVrProperties; /** - * Samples for PlacementPolicies Update. + * Samples for Addons CreateOrUpdate. */ -public final class PlacementPoliciesUpdateSamples { +public final class AddonsCreateOrUpdateSamples { /* * x-ms-original-file: - * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/PlacementPolicies_Update.json + * specification/vmware/resource-manager/Microsoft.AVS/stable/2024-09-01/examples/Addons_CreateOrUpdate_HCX.json */ /** - * Sample code: PlacementPolicies_Update. + * Sample code: Addons_CreateOrUpdate_HCX. * * @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) - .apply(); + 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(); + } + + /* + * x-ms-original-file: + * specification/vmware/resource-manager/Microsoft.AVS/stable/2024-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(); + } + + /* + * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2024-09-01/examples/ + * Addons_CreateOrUpdate_HCX_With_Networks.json + */ + /** + * Sample code: Addons_CreateOrUpdate_HCX_With_Networks. + * + * @param manager Entry point to AvsManager. + */ + public static void addonsCreateOrUpdateHCXWithNetworks(com.azure.resourcemanager.avs.AvsManager manager) { + manager.addons() + .define("hcx") + .withExistingPrivateCloud("group1", "cloud1") + .withProperties(new AddonHcxProperties().withOffer("VMware MaaS Cloud Provider (Enterprise)") + .withManagementNetwork("10.3.1.0/24") + .withUplinkNetwork("10.3.2.0/24")) + .create(); + } + + /* + * x-ms-original-file: + * specification/vmware/resource-manager/Microsoft.AVS/stable/2024-09-01/examples/Addons_CreateOrUpdate_ArcReg.json + */ + /** + * Sample code: Addons_CreateOrUpdate_ArcReg. + * + * @param manager Entry point to AvsManager. + */ + 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/2024-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(); + } +} +``` + +### PlacementPolicies_Update + +```java +/** + * Samples for WorkloadNetworks DeleteSegment. + */ +public final class WorkloadNetworksDeleteSegmentSamples { + /* + * x-ms-original-file: + * specification/vmware/resource-manager/Microsoft.AVS/stable/2024-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) { + manager.workloadNetworks().deleteSegment("group1", "cloud1", "segment1", com.azure.core.util.Context.NONE); + } +} +``` + +### PrivateClouds_CreateOrUpdate + +```java +/** + * Samples for Operations List. + */ +public final class OperationsListSamples { + /* + * x-ms-original-file: + * specification/vmware/resource-manager/Microsoft.AVS/stable/2024-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) { + manager.operations().list(com.azure.core.util.Context.NONE); + } +} +``` + +### PrivateClouds_Delete + +```java +/** + * Samples for ProvisionedNetworks List. + */ +public final class ProvisionedNetworksListSamples { + /* + * x-ms-original-file: + * specification/vmware/resource-manager/Microsoft.AVS/stable/2024-09-01/examples/ProvisionedNetworks_List.json + */ + /** + * Sample code: ProvisionedNetworks_List. + * + * @param manager Entry point to AvsManager. + */ + public static void provisionedNetworksList(com.azure.resourcemanager.avs.AvsManager manager) { + manager.provisionedNetworks().list("group1", "cloud1", com.azure.core.util.Context.NONE); + } +} +``` + +### PrivateClouds_GetByResourceGroup + +```java +/** + * Samples for WorkloadNetworks ListPublicIPs. + */ +public final class WorkloadNetworksListPublicIPsSamples { + /* + * x-ms-original-file: + * specification/vmware/resource-manager/Microsoft.AVS/stable/2024-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) { + manager.workloadNetworks().listPublicIPs("group1", "cloud1", com.azure.core.util.Context.NONE); + } +} +``` + +### PrivateClouds_List + +```java +/** + * Samples for WorkloadNetworks GetDnsService. + */ +public final class WorkloadNetworksGetDnsServiceSamples { + /* + * x-ms-original-file: + * specification/vmware/resource-manager/Microsoft.AVS/stable/2024-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); + } +} +``` + +### PrivateClouds_ListAdminCredentials + +```java +/** + * Samples for Authorizations Get. + */ +public final class AuthorizationsGetSamples { + /* + * x-ms-original-file: + * specification/vmware/resource-manager/Microsoft.AVS/stable/2024-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); + } +} +``` + +### PrivateClouds_ListByResourceGroup + +```java +/** + * Samples for ScriptCmdlets List. + */ +public final class ScriptCmdletsListSamples { + /* + * x-ms-original-file: + * specification/vmware/resource-manager/Microsoft.AVS/stable/2024-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) { + manager.scriptCmdlets().list("group1", "cloud1", "package@1.0.2", com.azure.core.util.Context.NONE); + } +} +``` + +### PrivateClouds_RotateNsxtPassword + +```java +/** + * Samples for WorkloadNetworks ListGateways. + */ +public final class WorkloadNetworksListGatewaysSamples { + /* + * x-ms-original-file: + * specification/vmware/resource-manager/Microsoft.AVS/stable/2024-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) { + manager.workloadNetworks().listGateways("group1", "cloud1", com.azure.core.util.Context.NONE); + } +} +``` + +### PrivateClouds_RotateVcenterPassword + +```java +/** + * Samples for PlacementPolicies Get. + */ +public final class PlacementPoliciesGetSamples { + /* + * x-ms-original-file: + * specification/vmware/resource-manager/Microsoft.AVS/stable/2024-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); + } +} +``` + +### PrivateClouds_Update + +```java +/** + * Samples for ScriptExecutions Get. + */ +public final class ScriptExecutionsGetSamples { + /* + * x-ms-original-file: + * specification/vmware/resource-manager/Microsoft.AVS/stable/2024-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); + } +} +``` + +### ProvisionedNetworks_Get + +```java +/** + * Samples for CloudLinks List. + */ +public final class CloudLinksListSamples { + /* + * x-ms-original-file: + * specification/vmware/resource-manager/Microsoft.AVS/stable/2024-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) { + manager.cloudLinks().list("group1", "cloud1", com.azure.core.util.Context.NONE); } } ``` -### PrivateClouds_CreateOrUpdate +### ProvisionedNetworks_List ```java -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 java.util.HashMap; -import java.util.Map; +/** + * Samples for Hosts Get. + */ +public final class HostsGetSamples { + /* + * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2024-09-01/examples/Hosts_Get.json + */ + /** + * Sample code: Hosts_Get. + * + * @param manager Entry point to AvsManager. + */ + public static void hostsGet(com.azure.resourcemanager.avs.AvsManager manager) { + manager.hosts() + .getWithResponse("group1", "cloud1", "cluster1", + "esx03-r52.1111111111111111111.westcentralus.prod.azure.com", com.azure.core.util.Context.NONE); + } +} +``` + +### PureStoragePolicies_CreateOrUpdate + +```java +import com.azure.resourcemanager.avs.models.NetAppVolume; /** - * Samples for PrivateClouds CreateOrUpdate. + * Samples for Datastores CreateOrUpdate. */ -public final class PrivateCloudsCreateOrUpdateSamples { +public final class DatastoresCreateOrUpdateSamples { /* * x-ms-original-file: - * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/PrivateClouds_CreateOrUpdate.json + * specification/vmware/resource-manager/Microsoft.AVS/stable/2024-09-01/examples/Datastores_CreateOrUpdate.json */ /** - * Sample code: PrivateClouds_CreateOrUpdate. + * Sample code: Datastores_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)) - .withManagementCluster(new ManagementCluster().withClusterSize(4)) - .withNetworkBlock("192.168.48.0/22") + 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")) .create(); } +} +``` +### PureStoragePolicies_Delete + +```java +/** + * Samples for PrivateClouds RotateNsxtPassword. + */ +public final class PrivateCloudsRotateNsxtPasswordSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/ - * PrivateClouds_CreateOrUpdate_Stretched.json + * x-ms-original-file: + * specification/vmware/resource-manager/Microsoft.AVS/stable/2024-09-01/examples/PrivateClouds_RotateNsxtPassword. + * json */ /** - * Sample code: PrivateClouds_CreateOrUpdate_Stretched. + * Sample code: PrivateClouds_RotateNsxtPassword. * * @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()) - .withManagementCluster(new ManagementCluster().withClusterSize(4)) - .withAvailability(new AvailabilityProperties().withStrategy(AvailabilityStrategy.DUAL_ZONE) - .withZone(1) - .withSecondaryZone(2)) - .withNetworkBlock("192.168.48.0/22") - .create(); + public static void privateCloudsRotateNsxtPassword(com.azure.resourcemanager.avs.AvsManager manager) { + manager.privateClouds().rotateNsxtPassword("group1", "cloud1", com.azure.core.util.Context.NONE); } +} +``` - // 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; +### PureStoragePolicies_Get + +```java +import com.azure.resourcemanager.avs.models.DnsServiceLogLevelEnum; +import com.azure.resourcemanager.avs.models.WorkloadNetworkDnsService; +import java.util.Arrays; + +/** + * Samples for WorkloadNetworks UpdateDnsService. + */ +public final class WorkloadNetworksUpdateDnsServiceSamples { + /* + * x-ms-original-file: + * specification/vmware/resource-manager/Microsoft.AVS/stable/2024-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(); } } ``` -### PrivateClouds_Delete +### PureStoragePolicies_List ```java /** - * Samples for PrivateClouds Delete. + * Samples for Datastores Delete. */ -public final class PrivateCloudsDeleteSamples { +public final class DatastoresDeleteSamples { /* * x-ms-original-file: - * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/PrivateClouds_Delete.json + * specification/vmware/resource-manager/Microsoft.AVS/stable/2024-09-01/examples/Datastores_Delete.json */ /** - * Sample code: PrivateClouds_Delete. + * Sample code: Datastores_Delete. * * @param manager Entry point to AvsManager. */ - public static void privateCloudsDelete(com.azure.resourcemanager.avs.AvsManager manager) { - manager.privateClouds().delete("group1", "cloud1", com.azure.core.util.Context.NONE); + public static void datastoresDelete(com.azure.resourcemanager.avs.AvsManager manager) { + manager.datastores().delete("group1", "cloud1", "cluster1", "datastore1", com.azure.core.util.Context.NONE); } } ``` -### PrivateClouds_GetByResourceGroup +### ScriptCmdlets_Get ```java /** - * Samples for PrivateClouds GetByResourceGroup. + * Samples for Clusters Delete. */ -public final class PrivateCloudsGetByResourceGroupSamples { +public final class ClustersDeleteSamples { /* * x-ms-original-file: - * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/PrivateClouds_Get.json + * specification/vmware/resource-manager/Microsoft.AVS/stable/2024-09-01/examples/Clusters_Delete.json */ /** - * Sample code: PrivateClouds_Get. + * Sample code: Clusters_Delete. * * @param manager Entry point to AvsManager. */ - public static void privateCloudsGet(com.azure.resourcemanager.avs.AvsManager manager) { - manager.privateClouds().getByResourceGroupWithResponse("group1", "cloud1", com.azure.core.util.Context.NONE); + public static void clustersDelete(com.azure.resourcemanager.avs.AvsManager manager) { + manager.clusters().delete("group1", "cloud1", "cluster1", com.azure.core.util.Context.NONE); } +} +``` +### ScriptCmdlets_List + +```java +/** + * Samples for Clusters List. + */ +public final class ClustersListSamples { /* * x-ms-original-file: - * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/PrivateClouds_Get_Stretched.json + * specification/vmware/resource-manager/Microsoft.AVS/stable/2024-09-01/examples/Clusters_List.json */ /** - * Sample code: PrivateClouds_Get_Stretched. + * Sample code: Clusters_List. * * @param manager Entry point to AvsManager. */ - public static void privateCloudsGetStretched(com.azure.resourcemanager.avs.AvsManager manager) { - manager.privateClouds().getByResourceGroupWithResponse("group1", "cloud1", com.azure.core.util.Context.NONE); + public static void clustersList(com.azure.resourcemanager.avs.AvsManager manager) { + manager.clusters().list("group1", "cloud1", com.azure.core.util.Context.NONE); } } ``` -### PrivateClouds_List +### ScriptExecutions_CreateOrUpdate + +```java +/** + * Samples for GlobalReachConnections Delete. + */ +public final class GlobalReachConnectionsDeleteSamples { + /* + * x-ms-original-file: + * specification/vmware/resource-manager/Microsoft.AVS/stable/2024-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) { + manager.globalReachConnections().delete("group1", "cloud1", "connection1", com.azure.core.util.Context.NONE); + } +} +``` + +### ScriptExecutions_Delete ```java /** @@ -1427,7 +1795,7 @@ public final class PrivateCloudsGetByResourceGroupSamples { public final class PrivateCloudsListSamples { /* * x-ms-original-file: - * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/PrivateClouds_ListInSubscription. + * specification/vmware/resource-manager/Microsoft.AVS/stable/2024-09-01/examples/PrivateClouds_ListInSubscription. * json */ /** @@ -1440,7 +1808,7 @@ public final class PrivateCloudsListSamples { } /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/ + * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2024-09-01/examples/ * PrivateClouds_ListInSubscription_Stretched.json */ /** @@ -1454,568 +1822,500 @@ public final class PrivateCloudsListSamples { } ``` -### PrivateClouds_ListAdminCredentials +### ScriptExecutions_Get ```java /** - * Samples for PrivateClouds ListAdminCredentials. + * Samples for WorkloadNetworks DeleteDnsZone. */ -public final class PrivateCloudsListAdminCredentialsSamples { +public final class WorkloadNetworksDeleteDnsZoneSamples { /* * x-ms-original-file: - * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/PrivateClouds_ListAdminCredentials - * .json + * specification/vmware/resource-manager/Microsoft.AVS/stable/2024-09-01/examples/WorkloadNetworks_DeleteDnsZone. + * json */ /** - * Sample code: PrivateClouds_ListAdminCredentials. + * Sample code: WorkloadNetworks_DeleteDnsZone. * * @param manager Entry point to AvsManager. */ - public static void privateCloudsListAdminCredentials(com.azure.resourcemanager.avs.AvsManager manager) { - manager.privateClouds().listAdminCredentialsWithResponse("group1", "cloud1", com.azure.core.util.Context.NONE); + public static void workloadNetworksDeleteDnsZone(com.azure.resourcemanager.avs.AvsManager manager) { + manager.workloadNetworks().deleteDnsZone("group1", "dnsZone1", "cloud1", com.azure.core.util.Context.NONE); } } ``` -### PrivateClouds_ListByResourceGroup +### ScriptExecutions_GetExecutionLogs ```java /** - * Samples for PrivateClouds ListByResourceGroup. + * Samples for Addons Delete. */ -public final class PrivateCloudsListByResourceGroupSamples { - /* - * 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) { - manager.privateClouds().listByResourceGroup("group1", com.azure.core.util.Context.NONE); - } - +public final class AddonsDeleteSamples { /* * x-ms-original-file: - * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/PrivateClouds_List_Stretched.json + * specification/vmware/resource-manager/Microsoft.AVS/stable/2024-09-01/examples/Addons_Delete.json */ /** - * Sample code: PrivateClouds_List_Stretched. + * Sample code: Addons_Delete. * * @param manager Entry point to AvsManager. */ - public static void privateCloudsListStretched(com.azure.resourcemanager.avs.AvsManager manager) { - manager.privateClouds().listByResourceGroup("group1", com.azure.core.util.Context.NONE); + public static void addonsDelete(com.azure.resourcemanager.avs.AvsManager manager) { + manager.addons().delete("group1", "cloud1", "srm", com.azure.core.util.Context.NONE); } } ``` -### PrivateClouds_RotateNsxtPassword +### ScriptExecutions_List ```java +import com.azure.resourcemanager.avs.models.DnsServiceLogLevelEnum; +import java.util.Arrays; + /** - * Samples for PrivateClouds RotateNsxtPassword. + * Samples for WorkloadNetworks CreateDnsService. */ -public final class PrivateCloudsRotateNsxtPasswordSamples { +public final class WorkloadNetworksCreateDnsServiceSamples { /* * x-ms-original-file: - * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/PrivateClouds_RotateNsxtPassword. + * specification/vmware/resource-manager/Microsoft.AVS/stable/2024-09-01/examples/WorkloadNetworks_CreateDnsService. * json */ /** - * Sample code: PrivateClouds_RotateNsxtPassword. + * Sample code: WorkloadNetworks_CreateDnsService. * * @param manager Entry point to AvsManager. */ - public static void privateCloudsRotateNsxtPassword(com.azure.resourcemanager.avs.AvsManager manager) { - manager.privateClouds().rotateNsxtPassword("group1", "cloud1", com.azure.core.util.Context.NONE); + 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) + .create(); } } ``` -### PrivateClouds_RotateVcenterPassword +### ScriptPackages_Get ```java /** - * Samples for PrivateClouds RotateVcenterPassword. + * Samples for WorkloadNetworks CreatePublicIp. */ -public final class PrivateCloudsRotateVcenterPasswordSamples { +public final class WorkloadNetworksCreatePublicIpSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/ - * PrivateClouds_RotateVcenterPassword.json + * x-ms-original-file: + * specification/vmware/resource-manager/Microsoft.AVS/stable/2024-09-01/examples/WorkloadNetworks_CreatePublicIP. + * json */ /** - * Sample code: PrivateClouds_RotateVcenterPassword. + * Sample code: WorkloadNetworks_CreatePublicIP. * * @param manager Entry point to AvsManager. - */ - public static void privateCloudsRotateVcenterPassword(com.azure.resourcemanager.avs.AvsManager manager) { - manager.privateClouds().rotateVcenterPassword("group1", "cloud1", com.azure.core.util.Context.NONE); + */ + public static void workloadNetworksCreatePublicIP(com.azure.resourcemanager.avs.AvsManager manager) { + manager.workloadNetworks() + .definePublicIp("publicIP1") + .withExistingPrivateCloud("group1", "cloud1") + .withDisplayName("publicIP1") + .withNumberOfPublicIPs(32L) + .create(); } } ``` -### PrivateClouds_Update +### ScriptPackages_List ```java -import com.azure.resourcemanager.avs.models.Encryption; -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; - /** - * Samples for PrivateClouds Update. + * Samples for Addons Get. */ -public final class PrivateCloudsUpdateSamples { +public final class AddonsGetSamples { /* * x-ms-original-file: - * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/PrivateClouds_Update.json + * specification/vmware/resource-manager/Microsoft.AVS/stable/2024-09-01/examples/Addons_Get_HCX_With_Networks.json */ /** - * Sample code: PrivateClouds_Update. + * Sample code: Addons_Get_HCX_With_Networks. * * @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)) - .withManagementCluster(new ManagementCluster().withClusterSize(4)) - .withEncryption(new Encryption().withStatus(EncryptionState.ENABLED) - .withKeyVaultProperties(new EncryptionKeyVaultProperties().withKeyName("fakeTokenPlaceholder") - .withKeyVersion("fakeTokenPlaceholder") - .withKeyVaultUrl("fakeTokenPlaceholder"))) - .apply(); + public static void addonsGetHCXWithNetworks(com.azure.resourcemanager.avs.AvsManager manager) { + manager.addons().getWithResponse("group1", "cloud1", "hcx", com.azure.core.util.Context.NONE); } /* * x-ms-original-file: - * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/PrivateClouds_Update_Stretched. - * json + * specification/vmware/resource-manager/Microsoft.AVS/stable/2024-09-01/examples/Addons_Get_SRM.json */ /** - * Sample code: PrivateClouds_Update_Stretched. + * Sample code: Addons_Get_SRM. * * @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(); - resource.update().withManagementCluster(new ManagementCluster().withClusterSize(4)).apply(); + public static void addonsGetSRM(com.azure.resourcemanager.avs.AvsManager manager) { + manager.addons().getWithResponse("group1", "cloud1", "srm", com.azure.core.util.Context.NONE); } -} -``` -### ScriptCmdlets_Get - -```java -/** - * Samples for ScriptCmdlets Get. - */ -public final class ScriptCmdletsGetSamples { /* * x-ms-original-file: - * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/ScriptCmdlets_Get.json + * specification/vmware/resource-manager/Microsoft.AVS/stable/2024-09-01/examples/Addons_Get_VR.json */ /** - * Sample code: ScriptCmdlets_Get. + * Sample code: Addons_Get_VR. * * @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); + public static void addonsGetVR(com.azure.resourcemanager.avs.AvsManager manager) { + manager.addons().getWithResponse("group1", "cloud1", "vr", com.azure.core.util.Context.NONE); } -} -``` - -### ScriptCmdlets_List -```java -/** - * Samples for ScriptCmdlets List. - */ -public final class ScriptCmdletsListSamples { /* * x-ms-original-file: - * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/ScriptCmdlets_List.json + * specification/vmware/resource-manager/Microsoft.AVS/stable/2024-09-01/examples/Addons_Get_HCX.json */ /** - * Sample code: ScriptCmdlets_List. + * Sample code: Addons_Get_HCX. * * @param manager Entry point to AvsManager. */ - public static void scriptCmdletsList(com.azure.resourcemanager.avs.AvsManager manager) { - manager.scriptCmdlets().list("group1", "cloud1", "package@1.0.2", com.azure.core.util.Context.NONE); + public static void addonsGetHCX(com.azure.resourcemanager.avs.AvsManager manager) { + manager.addons().getWithResponse("group1", "cloud1", "hcx", com.azure.core.util.Context.NONE); } -} -``` -### ScriptExecutions_CreateOrUpdate - -```java -import com.azure.resourcemanager.avs.models.ScriptSecureStringExecutionParameter; -import com.azure.resourcemanager.avs.models.ScriptStringExecutionParameter; -import java.util.Arrays; - -/** - * Samples for ScriptExecutions CreateOrUpdate. - */ -public final class ScriptExecutionsCreateOrUpdateSamples { /* * x-ms-original-file: - * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/ScriptExecutions_CreateOrUpdate. - * json + * specification/vmware/resource-manager/Microsoft.AVS/stable/2024-09-01/examples/Addons_Get_ArcReg.json */ /** - * Sample code: ScriptExecutions_CreateOrUpdate. + * Sample code: Addons_Get_ArcReg. * * @param manager Entry point to AvsManager. */ - public static void scriptExecutionsCreateOrUpdate(com.azure.resourcemanager.avs.AvsManager manager) { - 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(); + public static void addonsGetArcReg(com.azure.resourcemanager.avs.AvsManager manager) { + manager.addons().getWithResponse("group1", "cloud1", "arc", com.azure.core.util.Context.NONE); } } ``` -### ScriptExecutions_Delete +### Skus_List ```java /** - * Samples for ScriptExecutions Delete. + * Samples for WorkloadNetworks Get. */ -public final class ScriptExecutionsDeleteSamples { +public final class WorkloadNetworksGetSamples { /* * x-ms-original-file: - * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/ScriptExecutions_Delete.json + * specification/vmware/resource-manager/Microsoft.AVS/stable/2024-09-01/examples/WorkloadNetworks_Get.json */ /** - * Sample code: ScriptExecutions_Delete. + * Sample code: WorkloadNetworks_Get. * * @param manager Entry point to AvsManager. */ - public static void scriptExecutionsDelete(com.azure.resourcemanager.avs.AvsManager manager) { - manager.scriptExecutions().delete("group1", "cloud1", "addSsoServer", com.azure.core.util.Context.NONE); + public static void workloadNetworksGet(com.azure.resourcemanager.avs.AvsManager manager) { + manager.workloadNetworks().getWithResponse("group1", "cloud1", com.azure.core.util.Context.NONE); } } ``` -### ScriptExecutions_Get +### VirtualMachines_Get ```java /** - * Samples for ScriptExecutions Get. + * Samples for WorkloadNetworks DeletePublicIp. */ -public final class ScriptExecutionsGetSamples { +public final class WorkloadNetworksDeletePublicIpSamples { /* * x-ms-original-file: - * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/ScriptExecutions_Get.json + * specification/vmware/resource-manager/Microsoft.AVS/stable/2024-09-01/examples/WorkloadNetworks_DeletePublicIP. + * json */ /** - * Sample code: ScriptExecutions_Get. + * Sample code: WorkloadNetworks_DeletePublicIP. * * @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); + public static void workloadNetworksDeletePublicIP(com.azure.resourcemanager.avs.AvsManager manager) { + manager.workloadNetworks().deletePublicIp("group1", "publicIP1", "cloud1", com.azure.core.util.Context.NONE); } } ``` -### ScriptExecutions_GetExecutionLogs +### VirtualMachines_List ```java -import com.azure.resourcemanager.avs.models.ScriptOutputStreamType; -import java.util.Arrays; - /** - * Samples for ScriptExecutions GetExecutionLogs. + * Samples for Locations CheckQuotaAvailability. */ -public final class ScriptExecutionsGetExecutionLogsSamples { +public final class LocationsCheckQuotaAvailabilitySamples { /* * x-ms-original-file: - * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/ScriptExecutions_GetExecutionLogs. + * specification/vmware/resource-manager/Microsoft.AVS/stable/2024-09-01/examples/Locations_CheckQuotaAvailability. * json */ /** - * Sample code: ScriptExecutions_GetExecutionLogs. + * Sample code: Locations_CheckQuotaAvailability. * * @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); + public static void locationsCheckQuotaAvailability(com.azure.resourcemanager.avs.AvsManager manager) { + manager.locations().checkQuotaAvailabilityWithResponse("eastus", com.azure.core.util.Context.NONE); } } ``` -### ScriptExecutions_List +### VirtualMachines_RestrictMovement ```java /** - * Samples for ScriptExecutions List. + * Samples for Skus List. */ -public final class ScriptExecutionsListSamples { +public final class SkusListSamples { /* - * x-ms-original-file: - * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/ScriptExecutions_List.json + * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2024-09-01/examples/Skus_List.json */ /** - * Sample code: ScriptExecutions_List. + * Sample code: Skus_List. * * @param manager Entry point to AvsManager. */ - public static void scriptExecutionsList(com.azure.resourcemanager.avs.AvsManager manager) { - manager.scriptExecutions().list("group1", "cloud1", com.azure.core.util.Context.NONE); + public static void skusList(com.azure.resourcemanager.avs.AvsManager manager) { + manager.skus().list(com.azure.core.util.Context.NONE); } } ``` -### ScriptPackages_Get +### WorkloadNetworks_CreateDhcp ```java /** - * Samples for ScriptPackages Get. + * Samples for PureStoragePolicies CreateOrUpdate. */ -public final class ScriptPackagesGetSamples { +public final class PureStoragePoliciesCreateOrUpdateSamples { /* * x-ms-original-file: - * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/ScriptPackages_Get.json + * specification/vmware/resource-manager/Microsoft.AVS/stable/2024-09-01/examples/PureStoragePolicies_CreateOrUpdate + * .json */ /** - * Sample code: ScriptPackages_Get. + * Sample code: PureStoragePolicies_CreateOrUpdate. * * @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); + public static void pureStoragePoliciesCreateOrUpdate(com.azure.resourcemanager.avs.AvsManager manager) { + manager.pureStoragePolicies() + .define("storagePolicy1") + .withExistingPrivateCloud("group1", "cloud1") + .withStoragePolicyDefinition("storagePolicyDefinition1") + .withStoragePoolId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/PureStorage.Block/storagePools/storagePool1") + .create(); } } ``` -### ScriptPackages_List +### WorkloadNetworks_CreateDnsService ```java +import com.azure.resourcemanager.avs.models.WorkloadNetworkDhcpServer; + /** - * Samples for ScriptPackages List. + * Samples for WorkloadNetworks CreateDhcp. */ -public final class ScriptPackagesListSamples { +public final class WorkloadNetworksCreateDhcpSamples { /* * x-ms-original-file: - * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/ScriptPackages_List.json + * specification/vmware/resource-manager/Microsoft.AVS/stable/2024-09-01/examples/WorkloadNetworks_CreateDhcp.json */ /** - * Sample code: ScriptPackages_List. + * Sample code: WorkloadNetworks_CreateDhcp. * * @param manager Entry point to AvsManager. */ - public static void scriptPackagesList(com.azure.resourcemanager.avs.AvsManager manager) { - manager.scriptPackages().list("group1", "cloud1", com.azure.core.util.Context.NONE); + 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)) + .create(); } } ``` -### VirtualMachines_Get +### WorkloadNetworks_CreateDnsZone ```java +import com.azure.resourcemanager.avs.models.WorkloadNetworkDhcp; +import com.azure.resourcemanager.avs.models.WorkloadNetworkDhcpServer; + /** - * Samples for VirtualMachines Get. + * Samples for WorkloadNetworks UpdateDhcp. */ -public final class VirtualMachinesGetSamples { +public final class WorkloadNetworksUpdateDhcpSamples { /* * x-ms-original-file: - * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/VirtualMachines_Get.json + * specification/vmware/resource-manager/Microsoft.AVS/stable/2024-09-01/examples/WorkloadNetworks_UpdateDhcp.json */ /** - * Sample code: VirtualMachines_Get. + * Sample code: WorkloadNetworks_UpdateDhcp. * * @param manager Entry point to AvsManager. */ - public static void virtualMachinesGet(com.azure.resourcemanager.avs.AvsManager manager) { - manager.virtualMachines() - .getWithResponse("group1", "cloud1", "cluster1", "vm-209", com.azure.core.util.Context.NONE); + 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(); } } ``` -### VirtualMachines_List +### WorkloadNetworks_CreatePortMirroring ```java +import com.azure.resourcemanager.avs.models.Cluster; + /** - * Samples for VirtualMachines List. + * Samples for Clusters Update. */ -public final class VirtualMachinesListSamples { +public final class ClustersUpdateSamples { /* * x-ms-original-file: - * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/VirtualMachines_List.json + * specification/vmware/resource-manager/Microsoft.AVS/stable/2024-09-01/examples/Clusters_Update.json */ /** - * Sample code: VirtualMachines_List. + * Sample code: Clusters_Update. * * @param manager Entry point to AvsManager. */ - public static void virtualMachinesList(com.azure.resourcemanager.avs.AvsManager manager) { - manager.virtualMachines().list("group1", "cloud1", "cluster1", com.azure.core.util.Context.NONE); + 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(); + resource.update().withClusterSize(4).apply(); } } ``` -### VirtualMachines_RestrictMovement +### WorkloadNetworks_CreatePublicIp ```java -import com.azure.resourcemanager.avs.models.VirtualMachineRestrictMovement; -import com.azure.resourcemanager.avs.models.VirtualMachineRestrictMovementState; - /** - * Samples for VirtualMachines RestrictMovement. + * Samples for CloudLinks CreateOrUpdate. */ -public final class VirtualMachinesRestrictMovementSamples { +public final class CloudLinksCreateOrUpdateSamples { /* * x-ms-original-file: - * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/VirtualMachines_RestrictMovement. - * json + * specification/vmware/resource-manager/Microsoft.AVS/stable/2024-09-01/examples/CloudLinks_CreateOrUpdate.json */ /** - * Sample code: VirtualMachines_RestrictMovement. + * Sample code: CloudLinks_CreateOrUpdate. * * @param manager Entry point to AvsManager. */ - 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); + 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") + .create(); } } ``` -### WorkloadNetworks_CreateDhcp +### WorkloadNetworks_CreateSegments ```java -import com.azure.resourcemanager.avs.models.WorkloadNetworkDhcpServer; +import com.azure.resourcemanager.avs.models.PortMirroringDirectionEnum; +import com.azure.resourcemanager.avs.models.WorkloadNetworkPortMirroring; /** - * Samples for WorkloadNetworks CreateDhcp. + * Samples for WorkloadNetworks UpdatePortMirroring. */ -public final class WorkloadNetworksCreateDhcpSamples { +public final class WorkloadNetworksUpdatePortMirroringSamples { /* - * x-ms-original-file: - * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/WorkloadNetworks_CreateDhcp.json + * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2024-09-01/examples/ + * WorkloadNetworks_UpdatePortMirroring.json */ /** - * Sample code: WorkloadNetworks_CreateDhcp. + * Sample code: WorkloadNetworks_UpdatePortMirroring. * * @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)) - .create(); + 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(); } } ``` -### WorkloadNetworks_CreateDnsService +### WorkloadNetworks_CreateVMGroup ```java -import com.azure.resourcemanager.avs.models.DnsServiceLogLevelEnum; -import java.util.Arrays; - /** - * Samples for WorkloadNetworks CreateDnsService. + * Samples for CloudLinks Delete. */ -public final class WorkloadNetworksCreateDnsServiceSamples { +public final class CloudLinksDeleteSamples { /* * x-ms-original-file: - * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/WorkloadNetworks_CreateDnsService. - * json + * specification/vmware/resource-manager/Microsoft.AVS/stable/2024-09-01/examples/CloudLinks_Delete.json */ /** - * Sample code: WorkloadNetworks_CreateDnsService. + * Sample code: CloudLinks_Delete. * * @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) - .create(); + public static void cloudLinksDelete(com.azure.resourcemanager.avs.AvsManager manager) { + manager.cloudLinks().delete("group1", "cloud1", "cloudLink1", com.azure.core.util.Context.NONE); } } ``` -### WorkloadNetworks_CreateDnsZone +### WorkloadNetworks_DeleteDhcp ```java -import java.util.Arrays; - /** - * Samples for WorkloadNetworks CreateDnsZone. + * Samples for HcxEnterpriseSites List. */ -public final class WorkloadNetworksCreateDnsZoneSamples { +public final class HcxEnterpriseSitesListSamples { /* * x-ms-original-file: - * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/WorkloadNetworks_CreateDnsZone. - * json + * specification/vmware/resource-manager/Microsoft.AVS/stable/2024-09-01/examples/HcxEnterpriseSites_List.json */ /** - * Sample code: WorkloadNetworks_CreateDnsZone. + * Sample code: HcxEnterpriseSites_List. * * @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(); + public static void hcxEnterpriseSitesList(com.azure.resourcemanager.avs.AvsManager manager) { + manager.hcxEnterpriseSites().list("group1", "cloud1", com.azure.core.util.Context.NONE); } } ``` -### WorkloadNetworks_CreatePortMirroring +### WorkloadNetworks_DeleteDnsService ```java import com.azure.resourcemanager.avs.models.PortMirroringDirectionEnum; @@ -2025,7 +2325,7 @@ import com.azure.resourcemanager.avs.models.PortMirroringDirectionEnum; */ public final class WorkloadNetworksCreatePortMirroringSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/ + * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2024-09-01/examples/ * WorkloadNetworks_CreatePortMirroring.json */ /** @@ -2047,417 +2347,432 @@ public final class WorkloadNetworksCreatePortMirroringSamples { } ``` -### WorkloadNetworks_CreatePublicIp +### WorkloadNetworks_DeleteDnsZone ```java /** - * Samples for WorkloadNetworks CreatePublicIp. + * Samples for WorkloadNetworks GetPublicIp. */ -public final class WorkloadNetworksCreatePublicIpSamples { +public final class WorkloadNetworksGetPublicIpSamples { /* * x-ms-original-file: - * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/WorkloadNetworks_CreatePublicIP. - * json + * specification/vmware/resource-manager/Microsoft.AVS/stable/2024-09-01/examples/WorkloadNetworks_GetPublicIP.json */ /** - * Sample code: WorkloadNetworks_CreatePublicIP. + * Sample code: WorkloadNetworks_GetPublicIP. * * @param manager Entry point to AvsManager. */ - public static void workloadNetworksCreatePublicIP(com.azure.resourcemanager.avs.AvsManager manager) { + public static void workloadNetworksGetPublicIP(com.azure.resourcemanager.avs.AvsManager manager) { manager.workloadNetworks() - .definePublicIp("publicIP1") - .withExistingPrivateCloud("group1", "cloud1") - .withDisplayName("publicIP1") - .withNumberOfPublicIPs(32L) - .create(); + .getPublicIpWithResponse("group1", "cloud1", "publicIP1", com.azure.core.util.Context.NONE); } } ``` -### WorkloadNetworks_CreateSegments +### WorkloadNetworks_DeletePortMirroring ```java -import com.azure.resourcemanager.avs.models.WorkloadNetworkSegmentSubnet; -import java.util.Arrays; - /** - * Samples for WorkloadNetworks CreateSegments. + * Samples for PrivateClouds Delete. */ -public final class WorkloadNetworksCreateSegmentsSamples { +public final class PrivateCloudsDeleteSamples { /* * x-ms-original-file: - * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/WorkloadNetworks_CreateSegments. - * json + * specification/vmware/resource-manager/Microsoft.AVS/stable/2024-09-01/examples/PrivateClouds_Delete.json */ /** - * Sample code: WorkloadNetworks_CreateSegments. + * Sample code: PrivateClouds_Delete. * * @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(); + public static void privateCloudsDelete(com.azure.resourcemanager.avs.AvsManager manager) { + manager.privateClouds().delete("group1", "cloud1", com.azure.core.util.Context.NONE); } } ``` -### WorkloadNetworks_CreateVMGroup +### WorkloadNetworks_DeletePublicIp ```java -import java.util.Arrays; - /** - * Samples for WorkloadNetworks CreateVMGroup. + * Samples for WorkloadNetworks GetGateway. */ -public final class WorkloadNetworksCreateVMGroupSamples { +public final class WorkloadNetworksGetGatewaySamples { /* * x-ms-original-file: - * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/WorkloadNetworks_CreateVMGroup. - * json + * specification/vmware/resource-manager/Microsoft.AVS/stable/2024-09-01/examples/WorkloadNetworks_GetGateway.json */ /** - * Sample code: WorkloadNetworks_CreateVMGroup. + * Sample code: WorkloadNetworks_GetGateway. * * @param manager Entry point to AvsManager. */ - public static void workloadNetworksCreateVMGroup(com.azure.resourcemanager.avs.AvsManager manager) { + public static void workloadNetworksGetGateway(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(); + .getGatewayWithResponse("group1", "cloud1", "gateway1", com.azure.core.util.Context.NONE); } } ``` -### WorkloadNetworks_DeleteDhcp +### WorkloadNetworks_DeleteSegment ```java /** - * Samples for WorkloadNetworks DeleteDhcp. + * Samples for WorkloadNetworks ListDnsZones. */ -public final class WorkloadNetworksDeleteDhcpSamples { +public final class WorkloadNetworksListDnsZonesSamples { /* * x-ms-original-file: - * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/WorkloadNetworks_DeleteDhcp.json + * specification/vmware/resource-manager/Microsoft.AVS/stable/2024-09-01/examples/WorkloadNetworks_ListDnsZones.json */ /** - * Sample code: WorkloadNetworks_DeleteDhcp. + * Sample code: WorkloadNetworks_ListDnsZones. * * @param manager Entry point to AvsManager. */ - public static void workloadNetworksDeleteDhcp(com.azure.resourcemanager.avs.AvsManager manager) { - manager.workloadNetworks().deleteDhcp("group1", "cloud1", "dhcp1", com.azure.core.util.Context.NONE); + public static void workloadNetworksListDnsZones(com.azure.resourcemanager.avs.AvsManager manager) { + manager.workloadNetworks().listDnsZones("group1", "cloud1", com.azure.core.util.Context.NONE); } } ``` -### WorkloadNetworks_DeleteDnsService +### WorkloadNetworks_DeleteVMGroup ```java /** - * Samples for WorkloadNetworks DeleteDnsService. + * Samples for PrivateClouds RotateVcenterPassword. */ -public final class WorkloadNetworksDeleteDnsServiceSamples { +public final class PrivateCloudsRotateVcenterPasswordSamples { /* - * x-ms-original-file: - * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/WorkloadNetworks_DeleteDnsService. - * json + * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2024-09-01/examples/ + * PrivateClouds_RotateVcenterPassword.json */ /** - * Sample code: WorkloadNetworks_DeleteDnsService. + * Sample code: PrivateClouds_RotateVcenterPassword. * * @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); + public static void privateCloudsRotateVcenterPassword(com.azure.resourcemanager.avs.AvsManager manager) { + manager.privateClouds().rotateVcenterPassword("group1", "cloud1", com.azure.core.util.Context.NONE); } } ``` -### WorkloadNetworks_DeleteDnsZone +### WorkloadNetworks_Get ```java /** - * Samples for WorkloadNetworks DeleteDnsZone. + * Samples for WorkloadNetworks DeleteDhcp. */ -public final class WorkloadNetworksDeleteDnsZoneSamples { +public final class WorkloadNetworksDeleteDhcpSamples { /* * x-ms-original-file: - * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/WorkloadNetworks_DeleteDnsZone. - * json + * specification/vmware/resource-manager/Microsoft.AVS/stable/2024-09-01/examples/WorkloadNetworks_DeleteDhcp.json */ /** - * Sample code: WorkloadNetworks_DeleteDnsZone. + * Sample code: WorkloadNetworks_DeleteDhcp. * * @param manager Entry point to AvsManager. */ - public static void workloadNetworksDeleteDnsZone(com.azure.resourcemanager.avs.AvsManager manager) { - manager.workloadNetworks().deleteDnsZone("group1", "dnsZone1", "cloud1", com.azure.core.util.Context.NONE); + public static void workloadNetworksDeleteDhcp(com.azure.resourcemanager.avs.AvsManager manager) { + manager.workloadNetworks().deleteDhcp("group1", "cloud1", "dhcp1", com.azure.core.util.Context.NONE); } } ``` -### WorkloadNetworks_DeletePortMirroring +### WorkloadNetworks_GetDhcp ```java /** - * Samples for WorkloadNetworks DeletePortMirroring. + * Samples for WorkloadNetworks GetPortMirroring. */ -public final class WorkloadNetworksDeletePortMirroringSamples { +public final class WorkloadNetworksGetPortMirroringSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/ - * WorkloadNetworks_DeletePortMirroring.json + * x-ms-original-file: + * specification/vmware/resource-manager/Microsoft.AVS/stable/2024-09-01/examples/WorkloadNetworks_GetPortMirroring. + * json */ /** - * Sample code: WorkloadNetworks_DeletePortMirroring. + * Sample code: WorkloadNetworks_GetPortMirroring. * * @param manager Entry point to AvsManager. */ - public static void workloadNetworksDeletePortMirroring(com.azure.resourcemanager.avs.AvsManager manager) { + public static void workloadNetworksGetPortMirroring(com.azure.resourcemanager.avs.AvsManager manager) { manager.workloadNetworks() - .deletePortMirroring("group1", "portMirroring1", "cloud1", com.azure.core.util.Context.NONE); + .getPortMirroringWithResponse("group1", "cloud1", "portMirroring1", com.azure.core.util.Context.NONE); } } ``` -### WorkloadNetworks_DeletePublicIp +### WorkloadNetworks_GetDnsService ```java /** - * Samples for WorkloadNetworks DeletePublicIp. + * Samples for Addons List. */ -public final class WorkloadNetworksDeletePublicIpSamples { +public final class AddonsListSamples { /* * x-ms-original-file: - * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/WorkloadNetworks_DeletePublicIP. - * json + * specification/vmware/resource-manager/Microsoft.AVS/stable/2024-09-01/examples/Addons_List.json */ /** - * Sample code: WorkloadNetworks_DeletePublicIP. + * Sample code: Addons_List. * * @param manager Entry point to AvsManager. */ - public static void workloadNetworksDeletePublicIP(com.azure.resourcemanager.avs.AvsManager manager) { - manager.workloadNetworks().deletePublicIp("group1", "publicIP1", "cloud1", com.azure.core.util.Context.NONE); + public static void addonsList(com.azure.resourcemanager.avs.AvsManager manager) { + manager.addons().list("group1", "cloud1", com.azure.core.util.Context.NONE); } } ``` -### WorkloadNetworks_DeleteSegment +### WorkloadNetworks_GetDnsZone ```java +import com.azure.resourcemanager.avs.models.AvailabilityProperties; +import com.azure.resourcemanager.avs.models.AvailabilityStrategy; +import com.azure.resourcemanager.avs.models.DnsZoneType; +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 java.util.Arrays; +import java.util.HashMap; +import java.util.Map; + /** - * Samples for WorkloadNetworks DeleteSegment. + * Samples for PrivateClouds CreateOrUpdate. */ -public final class WorkloadNetworksDeleteSegmentSamples { +public final class PrivateCloudsCreateOrUpdateSamples { /* * x-ms-original-file: - * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/WorkloadNetworks_DeleteSegment. - * json + * specification/vmware/resource-manager/Microsoft.AVS/stable/2024-09-01/examples/PrivateClouds_CreateOrUpdate.json */ /** - * Sample code: WorkloadNetworks_DeleteSegment. + * Sample code: PrivateClouds_CreateOrUpdate. * * @param manager Entry point to AvsManager. */ - public static void workloadNetworksDeleteSegment(com.azure.resourcemanager.avs.AvsManager manager) { - manager.workloadNetworks().deleteSegment("group1", "cloud1", "segment1", com.azure.core.util.Context.NONE); + 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)) + .withManagementCluster(new ManagementCluster().withClusterSize(4)) + .withNetworkBlock("192.168.48.0/22") + .create(); } -} -``` - -### WorkloadNetworks_DeleteVMGroup - -```java -/** - * Samples for WorkloadNetworks DeleteVMGroup. - */ -public final class WorkloadNetworksDeleteVMGroupSamples { + /* - * x-ms-original-file: - * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/WorkloadNetworks_DeleteVMGroup. - * json + * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2024-09-01/examples/ + * PrivateClouds_CreateOrUpdate_StretchedZones.json */ /** - * Sample code: WorkloadNetworks_DeleteVMGroup. + * Sample code: PrivateClouds_CreateOrUpdate_StretchedZones. * * @param manager Entry point to AvsManager. */ - public static void workloadNetworksDeleteVMGroup(com.azure.resourcemanager.avs.AvsManager manager) { - manager.workloadNetworks().deleteVMGroup("group1", "vmGroup1", "cloud1", com.azure.core.util.Context.NONE); + public static void privateCloudsCreateOrUpdateStretchedZones(com.azure.resourcemanager.avs.AvsManager manager) { + manager.privateClouds() + .define("cloud1") + .withRegion("eastus2") + .withExistingResourceGroup("group1") + .withSku(new Sku().withName("AV36")) + .withTags(mapOf()) + .withZones(Arrays.asList("1", "2")) + .withManagementCluster(new ManagementCluster().withClusterSize(4)) + .withNetworkBlock("192.168.48.0/22") + .create(); } -} -``` - -### WorkloadNetworks_Get -```java -/** - * Samples for WorkloadNetworks Get. - */ -public final class WorkloadNetworksGetSamples { /* - * x-ms-original-file: - * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/WorkloadNetworks_Get.json + * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2024-09-01/examples/ + * PrivateClouds_CreateOrUpdate_FleetNative.json */ /** - * Sample code: WorkloadNetworks_Get. + * Sample code: PrivateClouds_CreateOrUpdate_FleetNative. * * @param manager Entry point to AvsManager. */ - public static void workloadNetworksGet(com.azure.resourcemanager.avs.AvsManager manager) { - manager.workloadNetworks().getWithResponse("group1", "cloud1", com.azure.core.util.Context.NONE); + public static void privateCloudsCreateOrUpdateFleetNative(com.azure.resourcemanager.avs.AvsManager manager) { + manager.privateClouds() + .define("cloud1") + .withRegion("eastus2") + .withExistingResourceGroup("group1") + .withSku(new Sku().withName("AV64")) + .withTags(mapOf()) + .withManagementCluster(new ManagementCluster().withClusterSize(4)) + .withNetworkBlock("192.168.48.0/22") + .withVirtualNetworkId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.Network/virtualNetworks/vnet") + .withDnsZoneType(DnsZoneType.PRIVATE) + .create(); } -} -``` - -### WorkloadNetworks_GetDhcp -```java -/** - * Samples for WorkloadNetworks GetDhcp. - */ -public final class WorkloadNetworksGetDhcpSamples { /* - * x-ms-original-file: - * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/WorkloadNetworks_GetDhcp.json + * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2024-09-01/examples/ + * PrivateClouds_CreateOrUpdate_Stretched.json */ /** - * Sample code: WorkloadNetworks_GetDhcp. + * Sample code: PrivateClouds_CreateOrUpdate_Stretched. * * @param manager Entry point to AvsManager. */ - public static void workloadNetworksGetDhcp(com.azure.resourcemanager.avs.AvsManager manager) { - manager.workloadNetworks().getDhcpWithResponse("group1", "dhcp1", "cloud1", com.azure.core.util.Context.NONE); + 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()) + .withManagementCluster(new ManagementCluster().withClusterSize(4)) + .withAvailability(new AvailabilityProperties().withStrategy(AvailabilityStrategy.DUAL_ZONE) + .withZone(1) + .withSecondaryZone(2)) + .withNetworkBlock("192.168.48.0/22") + .create(); + } + + // 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; } } ``` -### WorkloadNetworks_GetDnsService +### WorkloadNetworks_GetGateway ```java +import com.azure.resourcemanager.avs.models.Encryption; +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; + /** - * Samples for WorkloadNetworks GetDnsService. + * Samples for PrivateClouds Update. */ -public final class WorkloadNetworksGetDnsServiceSamples { +public final class PrivateCloudsUpdateSamples { /* * x-ms-original-file: - * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/WorkloadNetworks_GetDnsService. - * json + * specification/vmware/resource-manager/Microsoft.AVS/stable/2024-09-01/examples/PrivateClouds_Update.json */ /** - * Sample code: WorkloadNetworks_GetDnsService. + * Sample code: PrivateClouds_Update. * * @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); + 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)) + .withManagementCluster(new ManagementCluster().withClusterSize(4)) + .withEncryption(new Encryption().withStatus(EncryptionState.ENABLED) + .withKeyVaultProperties(new EncryptionKeyVaultProperties().withKeyName("fakeTokenPlaceholder") + .withKeyVersion("fakeTokenPlaceholder") + .withKeyVaultUrl("fakeTokenPlaceholder"))) + .apply(); } -} -``` - -### WorkloadNetworks_GetDnsZone -```java -/** - * Samples for WorkloadNetworks GetDnsZone. - */ -public final class WorkloadNetworksGetDnsZoneSamples { /* * x-ms-original-file: - * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/WorkloadNetworks_GetDnsZone.json + * specification/vmware/resource-manager/Microsoft.AVS/stable/2024-09-01/examples/PrivateClouds_Update_Stretched. + * json */ /** - * Sample code: WorkloadNetworks_GetDnsZone. + * Sample code: PrivateClouds_Update_Stretched. * * @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); + public static void privateCloudsUpdateStretched(com.azure.resourcemanager.avs.AvsManager manager) { + PrivateCloud resource = manager.privateClouds() + .getByResourceGroupWithResponse("group1", "cloud1", com.azure.core.util.Context.NONE) + .getValue(); + resource.update().withManagementCluster(new ManagementCluster().withClusterSize(4)).apply(); } } ``` -### WorkloadNetworks_GetGateway +### WorkloadNetworks_GetPortMirroring ```java +import com.azure.resourcemanager.avs.models.WorkloadNetworkVMGroup; +import java.util.Arrays; + /** - * Samples for WorkloadNetworks GetGateway. + * Samples for WorkloadNetworks UpdateVMGroup. */ -public final class WorkloadNetworksGetGatewaySamples { +public final class WorkloadNetworksUpdateVMGroupSamples { /* * x-ms-original-file: - * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/WorkloadNetworks_GetGateway.json + * specification/vmware/resource-manager/Microsoft.AVS/stable/2024-09-01/examples/WorkloadNetworks_UpdateVMGroup. + * json */ /** - * Sample code: WorkloadNetworks_GetGateway. + * Sample code: WorkloadNetworks_UpdateVMGroup. * * @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); + 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(); + resource.update().withMembers(Arrays.asList("564d43da-fefc-2a3b-1d92-42855622fa50")).withRevision(1L).apply(); } } ``` -### WorkloadNetworks_GetPortMirroring +### WorkloadNetworks_GetPublicIp ```java +import com.azure.resourcemanager.avs.models.Sku; + /** - * Samples for WorkloadNetworks GetPortMirroring. + * Samples for Locations CheckTrialAvailability. */ -public final class WorkloadNetworksGetPortMirroringSamples { +public final class LocationsCheckTrialAvailabilitySamples { /* * x-ms-original-file: - * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/WorkloadNetworks_GetPortMirroring. + * specification/vmware/resource-manager/Microsoft.AVS/stable/2024-09-01/examples/Locations_CheckTrialAvailability. * json */ /** - * Sample code: WorkloadNetworks_GetPortMirroring. + * Sample code: Locations_CheckTrialAvailability. * * @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); + public static void locationsCheckTrialAvailability(com.azure.resourcemanager.avs.AvsManager manager) { + manager.locations().checkTrialAvailabilityWithResponse("eastus", null, com.azure.core.util.Context.NONE); } -} -``` - -### WorkloadNetworks_GetPublicIp -```java -/** - * Samples for WorkloadNetworks GetPublicIp. - */ -public final class WorkloadNetworksGetPublicIpSamples { /* - * x-ms-original-file: - * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/WorkloadNetworks_GetPublicIP.json + * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2024-09-01/examples/ + * Locations_CheckTrialAvailabilityWithSku.json */ /** - * Sample code: WorkloadNetworks_GetPublicIP. + * Sample code: Locations_CheckTrialAvailabilityWithSku. * * @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); + public static void locationsCheckTrialAvailabilityWithSku(com.azure.resourcemanager.avs.AvsManager manager) { + manager.locations() + .checkTrialAvailabilityWithResponse("eastus", new Sku().withName("avs52t"), + com.azure.core.util.Context.NONE); } } ``` @@ -2466,21 +2781,20 @@ public final class WorkloadNetworksGetPublicIpSamples { ```java /** - * Samples for WorkloadNetworks GetSegment. + * Samples for HcxEnterpriseSites Get. */ -public final class WorkloadNetworksGetSegmentSamples { +public final class HcxEnterpriseSitesGetSamples { /* * x-ms-original-file: - * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/WorkloadNetworks_GetSegment.json + * specification/vmware/resource-manager/Microsoft.AVS/stable/2024-09-01/examples/HcxEnterpriseSites_Get.json */ /** - * Sample code: WorkloadNetworks_GetSegment. + * Sample code: HcxEnterpriseSites_Get. * * @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); + public static void hcxEnterpriseSitesGet(com.azure.resourcemanager.avs.AvsManager manager) { + manager.hcxEnterpriseSites().getWithResponse("group1", "cloud1", "site1", com.azure.core.util.Context.NONE); } } ``` @@ -2489,21 +2803,20 @@ public final class WorkloadNetworksGetSegmentSamples { ```java /** - * Samples for WorkloadNetworks GetVMGroup. + * Samples for Hosts List. */ -public final class WorkloadNetworksGetVMGroupSamples { +public final class HostsListSamples { /* * x-ms-original-file: - * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/WorkloadNetworks_GetVMGroup.json + * specification/vmware/resource-manager/Microsoft.AVS/stable/2024-09-01/examples/Hosts_List.json */ /** - * Sample code: WorkloadNetworks_GetVMGroup. + * Sample code: Hosts_List. * * @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); + public static void hostsList(com.azure.resourcemanager.avs.AvsManager manager) { + manager.hosts().list("group1", "cloud1", "cluster1", com.azure.core.util.Context.NONE); } } ``` @@ -2517,7 +2830,7 @@ public final class WorkloadNetworksGetVMGroupSamples { public final class WorkloadNetworksGetVirtualMachineSamples { /* * x-ms-original-file: - * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/WorkloadNetworks_GetVirtualMachine + * specification/vmware/resource-manager/Microsoft.AVS/stable/2024-09-01/examples/WorkloadNetworks_GetVirtualMachine * .json */ /** @@ -2536,20 +2849,20 @@ public final class WorkloadNetworksGetVirtualMachineSamples { ```java /** - * Samples for WorkloadNetworks List. + * Samples for ScriptExecutions List. */ -public final class WorkloadNetworksListSamples { +public final class ScriptExecutionsListSamples { /* * x-ms-original-file: - * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/WorkloadNetworks_List.json + * specification/vmware/resource-manager/Microsoft.AVS/stable/2024-09-01/examples/ScriptExecutions_List.json */ /** - * Sample code: WorkloadNetworks_List. + * Sample code: ScriptExecutions_List. * * @param manager Entry point to AvsManager. */ - public static void workloadNetworksList(com.azure.resourcemanager.avs.AvsManager manager) { - manager.workloadNetworks().list("group1", "cloud1", com.azure.core.util.Context.NONE); + public static void scriptExecutionsList(com.azure.resourcemanager.avs.AvsManager manager) { + manager.scriptExecutions().list("group1", "cloud1", com.azure.core.util.Context.NONE); } } ``` @@ -2558,110 +2871,143 @@ public final class WorkloadNetworksListSamples { ```java /** - * Samples for WorkloadNetworks ListDhcp. + * Samples for WorkloadNetworks DeleteDnsService. */ -public final class WorkloadNetworksListDhcpSamples { +public final class WorkloadNetworksDeleteDnsServiceSamples { /* * x-ms-original-file: - * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/WorkloadNetworks_ListDhcp.json + * specification/vmware/resource-manager/Microsoft.AVS/stable/2024-09-01/examples/WorkloadNetworks_DeleteDnsService. + * json */ /** - * Sample code: WorkloadNetworks_ListDhcp. + * Sample code: WorkloadNetworks_DeleteDnsService. * * @param manager Entry point to AvsManager. */ - public static void workloadNetworksListDhcp(com.azure.resourcemanager.avs.AvsManager manager) { - manager.workloadNetworks().listDhcp("group1", "cloud1", com.azure.core.util.Context.NONE); + public static void workloadNetworksDeleteDnsService(com.azure.resourcemanager.avs.AvsManager manager) { + manager.workloadNetworks() + .deleteDnsService("group1", "dnsService1", "cloud1", com.azure.core.util.Context.NONE); + } +} +``` + +### WorkloadNetworks_ListDnsServices + +```java +import com.azure.resourcemanager.avs.models.ScriptSecureStringExecutionParameter; +import com.azure.resourcemanager.avs.models.ScriptStringExecutionParameter; +import java.util.Arrays; + +/** + * Samples for ScriptExecutions CreateOrUpdate. + */ +public final class ScriptExecutionsCreateOrUpdateSamples { + /* + * x-ms-original-file: + * specification/vmware/resource-manager/Microsoft.AVS/stable/2024-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") + .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(); } } ``` -### WorkloadNetworks_ListDnsServices +### WorkloadNetworks_ListDnsZones ```java /** - * Samples for WorkloadNetworks ListDnsServices. + * Samples for WorkloadNetworks GetVMGroup. */ -public final class WorkloadNetworksListDnsServicesSamples { +public final class WorkloadNetworksGetVMGroupSamples { /* * x-ms-original-file: - * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/WorkloadNetworks_ListDnsServices. - * json + * specification/vmware/resource-manager/Microsoft.AVS/stable/2024-09-01/examples/WorkloadNetworks_GetVMGroup.json */ /** - * Sample code: WorkloadNetworks_ListDnsServices. + * Sample code: WorkloadNetworks_GetVMGroup. * * @param manager Entry point to AvsManager. */ - public static void workloadNetworksListDnsServices(com.azure.resourcemanager.avs.AvsManager manager) { - manager.workloadNetworks().listDnsServices("group1", "cloud1", com.azure.core.util.Context.NONE); + public static void workloadNetworksGetVMGroup(com.azure.resourcemanager.avs.AvsManager manager) { + manager.workloadNetworks() + .getVMGroupWithResponse("group1", "cloud1", "vmGroup1", com.azure.core.util.Context.NONE); } } ``` -### WorkloadNetworks_ListDnsZones +### WorkloadNetworks_ListGateways ```java /** - * Samples for WorkloadNetworks ListDnsZones. + * Samples for WorkloadNetworks GetSegment. */ -public final class WorkloadNetworksListDnsZonesSamples { +public final class WorkloadNetworksGetSegmentSamples { /* * x-ms-original-file: - * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/WorkloadNetworks_ListDnsZones.json + * specification/vmware/resource-manager/Microsoft.AVS/stable/2024-09-01/examples/WorkloadNetworks_GetSegment.json */ /** - * Sample code: WorkloadNetworks_ListDnsZones. + * Sample code: WorkloadNetworks_GetSegment. * * @param manager Entry point to AvsManager. */ - public static void workloadNetworksListDnsZones(com.azure.resourcemanager.avs.AvsManager manager) { - manager.workloadNetworks().listDnsZones("group1", "cloud1", com.azure.core.util.Context.NONE); + public static void workloadNetworksGetSegment(com.azure.resourcemanager.avs.AvsManager manager) { + manager.workloadNetworks() + .getSegmentWithResponse("group1", "cloud1", "segment1", com.azure.core.util.Context.NONE); } } ``` -### WorkloadNetworks_ListGateways +### WorkloadNetworks_ListPortMirroring ```java /** - * Samples for WorkloadNetworks ListGateways. + * Samples for PrivateClouds GetByResourceGroup. */ -public final class WorkloadNetworksListGatewaysSamples { +public final class PrivateCloudsGetByResourceGroupSamples { /* * x-ms-original-file: - * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/WorkloadNetworks_ListGateways.json + * specification/vmware/resource-manager/Microsoft.AVS/stable/2024-09-01/examples/PrivateClouds_Get.json */ /** - * Sample code: WorkloadNetworks_ListGateways. + * Sample code: PrivateClouds_Get. * * @param manager Entry point to AvsManager. */ - public static void workloadNetworksListGateways(com.azure.resourcemanager.avs.AvsManager manager) { - manager.workloadNetworks().listGateways("group1", "cloud1", com.azure.core.util.Context.NONE); + public static void privateCloudsGet(com.azure.resourcemanager.avs.AvsManager manager) { + manager.privateClouds().getByResourceGroupWithResponse("group1", "cloud1", com.azure.core.util.Context.NONE); } -} -``` - -### WorkloadNetworks_ListPortMirroring -```java -/** - * Samples for WorkloadNetworks ListPortMirroring. - */ -public final class WorkloadNetworksListPortMirroringSamples { /* * x-ms-original-file: - * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/WorkloadNetworks_ListPortMirroring - * .json + * specification/vmware/resource-manager/Microsoft.AVS/stable/2024-09-01/examples/PrivateClouds_Get_Stretched.json */ /** - * Sample code: WorkloadNetworks_ListPortMirroring. + * Sample code: PrivateClouds_Get_Stretched. * * @param manager Entry point to AvsManager. */ - public static void workloadNetworksListPortMirroring(com.azure.resourcemanager.avs.AvsManager manager) { - manager.workloadNetworks().listPortMirroring("group1", "cloud1", com.azure.core.util.Context.NONE); + public static void privateCloudsGetStretched(com.azure.resourcemanager.avs.AvsManager manager) { + manager.privateClouds().getByResourceGroupWithResponse("group1", "cloud1", com.azure.core.util.Context.NONE); } } ``` @@ -2670,21 +3016,21 @@ public final class WorkloadNetworksListPortMirroringSamples { ```java /** - * Samples for WorkloadNetworks ListPublicIPs. + * Samples for ScriptPackages Get. */ -public final class WorkloadNetworksListPublicIPsSamples { +public final class ScriptPackagesGetSamples { /* * x-ms-original-file: - * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/WorkloadNetworks_ListPublicIPs. - * json + * specification/vmware/resource-manager/Microsoft.AVS/stable/2024-09-01/examples/ScriptPackages_Get.json */ /** - * Sample code: WorkloadNetworks_ListPublicIPs. + * Sample code: ScriptPackages_Get. * * @param manager Entry point to AvsManager. */ - public static void workloadNetworksListPublicIPs(com.azure.resourcemanager.avs.AvsManager manager) { - manager.workloadNetworks().listPublicIPs("group1", "cloud1", com.azure.core.util.Context.NONE); + 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); } } ``` @@ -2693,20 +3039,20 @@ public final class WorkloadNetworksListPublicIPsSamples { ```java /** - * Samples for WorkloadNetworks ListSegments. + * Samples for WorkloadNetworks ListVMGroups. */ -public final class WorkloadNetworksListSegmentsSamples { +public final class WorkloadNetworksListVMGroupsSamples { /* * x-ms-original-file: - * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/WorkloadNetworks_ListSegments.json + * specification/vmware/resource-manager/Microsoft.AVS/stable/2024-09-01/examples/WorkloadNetworks_ListVMGroups.json */ /** - * Sample code: WorkloadNetworks_ListSegments. + * Sample code: WorkloadNetworks_ListVMGroups. * * @param manager Entry point to AvsManager. */ - public static void workloadNetworksListSegments(com.azure.resourcemanager.avs.AvsManager manager) { - manager.workloadNetworks().listSegments("group1", "cloud1", com.azure.core.util.Context.NONE); + public static void workloadNetworksListVMGroups(com.azure.resourcemanager.avs.AvsManager manager) { + manager.workloadNetworks().listVMGroups("group1", "cloud1", com.azure.core.util.Context.NONE); } } ``` @@ -2715,20 +3061,20 @@ public final class WorkloadNetworksListSegmentsSamples { ```java /** - * Samples for WorkloadNetworks ListVMGroups. + * Samples for ScriptPackages List. */ -public final class WorkloadNetworksListVMGroupsSamples { +public final class ScriptPackagesListSamples { /* * x-ms-original-file: - * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/WorkloadNetworks_ListVMGroups.json + * specification/vmware/resource-manager/Microsoft.AVS/stable/2024-09-01/examples/ScriptPackages_List.json */ /** - * Sample code: WorkloadNetworks_ListVMGroups. + * Sample code: ScriptPackages_List. * * @param manager Entry point to AvsManager. */ - public static void workloadNetworksListVMGroups(com.azure.resourcemanager.avs.AvsManager manager) { - manager.workloadNetworks().listVMGroups("group1", "cloud1", com.azure.core.util.Context.NONE); + public static void scriptPackagesList(com.azure.resourcemanager.avs.AvsManager manager) { + manager.scriptPackages().list("group1", "cloud1", com.azure.core.util.Context.NONE); } } ``` @@ -2736,21 +3082,29 @@ public final class WorkloadNetworksListVMGroupsSamples { ### WorkloadNetworks_ListVirtualMachines ```java +import com.azure.resourcemanager.avs.models.ScriptOutputStreamType; +import java.util.Arrays; + /** - * Samples for WorkloadNetworks ListVirtualMachines. + * Samples for ScriptExecutions GetExecutionLogs. */ -public final class WorkloadNetworksListVirtualMachinesSamples { +public final class ScriptExecutionsGetExecutionLogsSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/ - * WorkloadNetworks_ListVirtualMachines.json + * x-ms-original-file: + * specification/vmware/resource-manager/Microsoft.AVS/stable/2024-09-01/examples/ScriptExecutions_GetExecutionLogs. + * json */ /** - * Sample code: WorkloadNetworks_ListVirtualMachines. + * Sample code: ScriptExecutions_GetExecutionLogs. * * @param manager Entry point to AvsManager. */ - public static void workloadNetworksListVirtualMachines(com.azure.resourcemanager.avs.AvsManager manager) { - manager.workloadNetworks().listVirtualMachines("group1", "cloud1", com.azure.core.util.Context.NONE); + 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); } } ``` @@ -2758,30 +3112,21 @@ public final class WorkloadNetworksListVirtualMachinesSamples { ### WorkloadNetworks_UpdateDhcp ```java -import com.azure.resourcemanager.avs.models.WorkloadNetworkDhcp; -import com.azure.resourcemanager.avs.models.WorkloadNetworkDhcpServer; - /** - * Samples for WorkloadNetworks UpdateDhcp. + * Samples for WorkloadNetworks List. */ -public final class WorkloadNetworksUpdateDhcpSamples { +public final class WorkloadNetworksListSamples { /* * x-ms-original-file: - * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/WorkloadNetworks_UpdateDhcp.json + * specification/vmware/resource-manager/Microsoft.AVS/stable/2024-09-01/examples/WorkloadNetworks_List.json */ /** - * Sample code: WorkloadNetworks_UpdateDhcp. + * Sample code: WorkloadNetworks_List. * * @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(); + public static void workloadNetworksList(com.azure.resourcemanager.avs.AvsManager manager) { + manager.workloadNetworks().list("group1", "cloud1", com.azure.core.util.Context.NONE); } } ``` @@ -2789,36 +3134,22 @@ public final class WorkloadNetworksUpdateDhcpSamples { ### WorkloadNetworks_UpdateDnsService ```java -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 DeletePortMirroring. */ -public final class WorkloadNetworksUpdateDnsServiceSamples { +public final class WorkloadNetworksDeletePortMirroringSamples { /* - * x-ms-original-file: - * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/WorkloadNetworks_UpdateDnsService. - * json + * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2024-09-01/examples/ + * WorkloadNetworks_DeletePortMirroring.json */ /** - * Sample code: WorkloadNetworks_UpdateDnsService. + * Sample code: WorkloadNetworks_DeletePortMirroring. * * @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(); + public static void workloadNetworksDeletePortMirroring(com.azure.resourcemanager.avs.AvsManager manager) { + manager.workloadNetworks() + .deletePortMirroring("group1", "portMirroring1", "cloud1", com.azure.core.util.Context.NONE); } } ``` @@ -2826,34 +3157,22 @@ public final class WorkloadNetworksUpdateDnsServiceSamples { ### WorkloadNetworks_UpdateDnsZone ```java -import com.azure.resourcemanager.avs.models.WorkloadNetworkDnsZone; -import java.util.Arrays; - /** - * Samples for WorkloadNetworks UpdateDnsZone. + * Samples for WorkloadNetworks ListPortMirroring. */ -public final class WorkloadNetworksUpdateDnsZoneSamples { +public final class WorkloadNetworksListPortMirroringSamples { /* * x-ms-original-file: - * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/WorkloadNetworks_UpdateDnsZone. - * json + * specification/vmware/resource-manager/Microsoft.AVS/stable/2024-09-01/examples/WorkloadNetworks_ListPortMirroring + * .json */ /** - * Sample code: WorkloadNetworks_UpdateDnsZone. + * Sample code: WorkloadNetworks_ListPortMirroring. * * @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(); + public static void workloadNetworksListPortMirroring(com.azure.resourcemanager.avs.AvsManager manager) { + manager.workloadNetworks().listPortMirroring("group1", "cloud1", com.azure.core.util.Context.NONE); } } ``` @@ -2861,32 +3180,39 @@ public final class WorkloadNetworksUpdateDnsZoneSamples { ### WorkloadNetworks_UpdatePortMirroring ```java -import com.azure.resourcemanager.avs.models.PortMirroringDirectionEnum; -import com.azure.resourcemanager.avs.models.WorkloadNetworkPortMirroring; +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.VmHostPlacementPolicyProperties; +import java.util.Arrays; /** - * Samples for WorkloadNetworks UpdatePortMirroring. + * Samples for PlacementPolicies CreateOrUpdate. */ -public final class WorkloadNetworksUpdatePortMirroringSamples { +public final class PlacementPoliciesCreateOrUpdateSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/ - * WorkloadNetworks_UpdatePortMirroring.json + * x-ms-original-file: + * specification/vmware/resource-manager/Microsoft.AVS/stable/2024-09-01/examples/PlacementPolicies_CreateOrUpdate. + * json */ /** - * Sample code: WorkloadNetworks_UpdatePortMirroring. + * Sample code: PlacementPolicies_CreateOrUpdate. * * @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(); + 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)) + .create(); } } ``` @@ -2894,34 +3220,21 @@ public final class WorkloadNetworksUpdatePortMirroringSamples { ### WorkloadNetworks_UpdateSegments ```java -import com.azure.resourcemanager.avs.models.WorkloadNetworkSegment; -import com.azure.resourcemanager.avs.models.WorkloadNetworkSegmentSubnet; -import java.util.Arrays; - /** - * Samples for WorkloadNetworks UpdateSegments. + * Samples for PureStoragePolicies Delete. */ -public final class WorkloadNetworksUpdateSegmentsSamples { +public final class PureStoragePoliciesDeleteSamples { /* * x-ms-original-file: - * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/WorkloadNetworks_UpdateSegments. - * json + * specification/vmware/resource-manager/Microsoft.AVS/stable/2024-09-01/examples/PureStoragePolicies_Delete.json */ /** - * Sample code: WorkloadNetworks_UpdateSegments. + * Sample code: PureStoragePolicies_Delete. * * @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(); - 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(); + public static void pureStoragePoliciesDelete(com.azure.resourcemanager.avs.AvsManager manager) { + manager.pureStoragePolicies().delete("group1", "cloud1", "storagePolicy1", com.azure.core.util.Context.NONE); } } ``` @@ -2929,28 +3242,22 @@ public final class WorkloadNetworksUpdateSegmentsSamples { ### WorkloadNetworks_UpdateVMGroup ```java -import com.azure.resourcemanager.avs.models.WorkloadNetworkVMGroup; -import java.util.Arrays; - /** - * Samples for WorkloadNetworks UpdateVMGroup. + * Samples for WorkloadNetworks ListDnsServices. */ -public final class WorkloadNetworksUpdateVMGroupSamples { +public final class WorkloadNetworksListDnsServicesSamples { /* * x-ms-original-file: - * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/WorkloadNetworks_UpdateVMGroup. + * specification/vmware/resource-manager/Microsoft.AVS/stable/2024-09-01/examples/WorkloadNetworks_ListDnsServices. * json */ /** - * Sample code: WorkloadNetworks_UpdateVMGroup. + * Sample code: WorkloadNetworks_ListDnsServices. * * @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(); - resource.update().withMembers(Arrays.asList("564d43da-fefc-2a3b-1d92-42855622fa50")).withRevision(1L).apply(); + public static void workloadNetworksListDnsServices(com.azure.resourcemanager.avs.AvsManager manager) { + manager.workloadNetworks().listDnsServices("group1", "cloud1", com.azure.core.util.Context.NONE); } } ``` diff --git a/sdk/avs/azure-resourcemanager-avs/pom.xml b/sdk/avs/azure-resourcemanager-avs/pom.xml index 5570982cb3ae..3567596f52fa 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-09-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-2024-09-01. https://github.com/Azure/azure-sdk-for-java @@ -48,11 +48,6 @@ true - - com.azure - azure-json - 1.5.0 - com.azure azure-core @@ -63,6 +58,11 @@ azure-core-management 1.17.0 + + com.azure + azure-json + 1.5.0 + com.azure azure-core-test 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 43adf5e6af2e..488ad709dfa8 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 @@ -11,17 +11,18 @@ import com.azure.core.http.HttpPipelinePosition; import com.azure.core.http.policy.AddDatePolicy; import com.azure.core.http.policy.AddHeadersFromContextPolicy; -import com.azure.core.http.policy.HttpLoggingPolicy; +import com.azure.core.http.policy.BearerTokenAuthenticationPolicy; import com.azure.core.http.policy.HttpLogOptions; +import com.azure.core.http.policy.HttpLoggingPolicy; import com.azure.core.http.policy.HttpPipelinePolicy; import com.azure.core.http.policy.HttpPolicyProviders; import com.azure.core.http.policy.RequestIdPolicy; import com.azure.core.http.policy.RetryOptions; import com.azure.core.http.policy.RetryPolicy; import com.azure.core.http.policy.UserAgentPolicy; -import com.azure.core.management.http.policy.ArmChallengeAuthenticationPolicy; import com.azure.core.management.profile.AzureProfile; import com.azure.core.util.Configuration; +import com.azure.core.util.CoreUtils; import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.avs.fluent.AvsClient; import com.azure.resourcemanager.avs.implementation.AddonsImpl; @@ -32,14 +33,18 @@ 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.HostsImpl; 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; import com.azure.resourcemanager.avs.implementation.PrivateCloudsImpl; +import com.azure.resourcemanager.avs.implementation.ProvisionedNetworksImpl; +import com.azure.resourcemanager.avs.implementation.PureStoragePoliciesImpl; import com.azure.resourcemanager.avs.implementation.ScriptCmdletsImpl; import com.azure.resourcemanager.avs.implementation.ScriptExecutionsImpl; import com.azure.resourcemanager.avs.implementation.ScriptPackagesImpl; +import com.azure.resourcemanager.avs.implementation.SkusImpl; import com.azure.resourcemanager.avs.implementation.VirtualMachinesImpl; import com.azure.resourcemanager.avs.implementation.WorkloadNetworksImpl; import com.azure.resourcemanager.avs.models.Addons; @@ -49,20 +54,25 @@ 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.Hosts; 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; import com.azure.resourcemanager.avs.models.PrivateClouds; +import com.azure.resourcemanager.avs.models.ProvisionedNetworks; +import com.azure.resourcemanager.avs.models.PureStoragePolicies; import com.azure.resourcemanager.avs.models.ScriptCmdlets; import com.azure.resourcemanager.avs.models.ScriptExecutions; import com.azure.resourcemanager.avs.models.ScriptPackages; +import com.azure.resourcemanager.avs.models.Skus; import com.azure.resourcemanager.avs.models.VirtualMachines; import com.azure.resourcemanager.avs.models.WorkloadNetworks; import java.time.Duration; import java.time.temporal.ChronoUnit; import java.util.ArrayList; import java.util.List; +import java.util.Map; import java.util.Objects; import java.util.stream.Collectors; @@ -77,6 +87,8 @@ public final class AvsManager { private PrivateClouds privateClouds; + private Skus skus; + private Addons addons; private Authorizations authorizations; @@ -87,6 +99,8 @@ public final class AvsManager { private Datastores datastores; + private Hosts hosts; + private PlacementPolicies placementPolicies; private VirtualMachines virtualMachines; @@ -97,6 +111,10 @@ public final class AvsManager { private IscsiPaths iscsiPaths; + private ProvisionedNetworks provisionedNetworks; + + private PureStoragePolicies pureStoragePolicies; + private ScriptExecutions scriptExecutions; private ScriptPackages scriptPackages; @@ -157,6 +175,9 @@ public static Configurable configure() { */ public static final class Configurable { private static final ClientLogger LOGGER = new ClientLogger(Configurable.class); + private static final String SDK_VERSION = "version"; + private static final Map PROPERTIES + = CoreUtils.getProperties("azure-resourcemanager-avs.properties"); private HttpClient httpClient; private HttpLogOptions httpLogOptions; @@ -264,12 +285,14 @@ public AvsManager authenticate(TokenCredential credential, AzureProfile profile) Objects.requireNonNull(credential, "'credential' cannot be null."); Objects.requireNonNull(profile, "'profile' cannot be null."); + String clientVersion = PROPERTIES.getOrDefault(SDK_VERSION, "UnknownVersion"); + StringBuilder userAgentBuilder = new StringBuilder(); userAgentBuilder.append("azsdk-java") .append("-") .append("com.azure.resourcemanager.avs") .append("/") - .append("1.2.0"); + .append(clientVersion); if (!Configuration.getGlobalConfiguration().get("AZURE_TELEMETRY_DISABLED", false)) { userAgentBuilder.append(" (") .append(Configuration.getGlobalConfiguration().get("java.version")) @@ -302,7 +325,7 @@ public AvsManager authenticate(TokenCredential credential, AzureProfile profile) HttpPolicyProviders.addBeforeRetryPolicies(policies); policies.add(retryPolicy); policies.add(new AddDatePolicy()); - policies.add(new ArmChallengeAuthenticationPolicy(credential, scopes.toArray(new String[0]))); + policies.add(new BearerTokenAuthenticationPolicy(credential, scopes.toArray(new String[0]))); policies.addAll(this.policies.stream() .filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_RETRY) .collect(Collectors.toList())); @@ -351,6 +374,18 @@ public PrivateClouds privateClouds() { return privateClouds; } + /** + * Gets the resource collection API of Skus. + * + * @return Resource collection API of Skus. + */ + public Skus skus() { + if (this.skus == null) { + this.skus = new SkusImpl(clientObject.getSkus(), this); + } + return skus; + } + /** * Gets the resource collection API of Addons. It manages Addon. * @@ -411,6 +446,18 @@ public Datastores datastores() { return datastores; } + /** + * Gets the resource collection API of Hosts. + * + * @return Resource collection API of Hosts. + */ + public Hosts hosts() { + if (this.hosts == null) { + this.hosts = new HostsImpl(clientObject.getHosts(), this); + } + return hosts; + } + /** * Gets the resource collection API of PlacementPolicies. It manages PlacementPolicy. * @@ -472,6 +519,30 @@ public IscsiPaths iscsiPaths() { return iscsiPaths; } + /** + * Gets the resource collection API of ProvisionedNetworks. + * + * @return Resource collection API of ProvisionedNetworks. + */ + public ProvisionedNetworks provisionedNetworks() { + if (this.provisionedNetworks == null) { + this.provisionedNetworks = new ProvisionedNetworksImpl(clientObject.getProvisionedNetworks(), this); + } + return provisionedNetworks; + } + + /** + * Gets the resource collection API of PureStoragePolicies. It manages PureStoragePolicy. + * + * @return Resource collection API of PureStoragePolicies. + */ + public PureStoragePolicies pureStoragePolicies() { + if (this.pureStoragePolicies == null) { + this.pureStoragePolicies = new PureStoragePoliciesImpl(clientObject.getPureStoragePolicies(), this); + } + return pureStoragePolicies; + } + /** * Gets the resource collection API of ScriptExecutions. It manages ScriptExecution. * 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 c21c292eb9e4..1a5fd0c5f14d 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 @@ -67,6 +67,13 @@ public interface AvsClient { */ PrivateCloudsClient getPrivateClouds(); + /** + * Gets the SkusClient object to access its operations. + * + * @return the SkusClient object. + */ + SkusClient getSkus(); + /** * Gets the AddonsClient object to access its operations. * @@ -102,6 +109,13 @@ public interface AvsClient { */ DatastoresClient getDatastores(); + /** + * Gets the HostsClient object to access its operations. + * + * @return the HostsClient object. + */ + HostsClient getHosts(); + /** * Gets the PlacementPoliciesClient object to access its operations. * @@ -137,6 +151,20 @@ public interface AvsClient { */ IscsiPathsClient getIscsiPaths(); + /** + * Gets the ProvisionedNetworksClient object to access its operations. + * + * @return the ProvisionedNetworksClient object. + */ + ProvisionedNetworksClient getProvisionedNetworks(); + + /** + * Gets the PureStoragePoliciesClient object to access its operations. + * + * @return the PureStoragePoliciesClient object. + */ + PureStoragePoliciesClient getPureStoragePolicies(); + /** * Gets the ScriptExecutionsClient object to access its operations. * 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 4dcbd4af4e20..3c3176813062 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 @@ -148,7 +148,7 @@ ClusterInner createOrUpdate(String resourceGroupName, String privateCloudName, S * @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. - * @param clusterUpdate The cluster properties to be updated. + * @param clusterUpdate 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. @@ -164,7 +164,7 @@ SyncPoller, ClusterInner> beginUpdate(String resourceGr * @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. - * @param clusterUpdate The cluster properties to be updated. + * @param clusterUpdate 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. @@ -181,7 +181,7 @@ SyncPoller, ClusterInner> beginUpdate(String resourceGr * @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. - * @param clusterUpdate The cluster properties to be updated. + * @param clusterUpdate 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. @@ -197,7 +197,7 @@ ClusterInner update(String resourceGroupName, String privateCloudName, String cl * @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. - * @param clusterUpdate The cluster properties to be updated. + * @param clusterUpdate 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. diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/HostsClient.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/HostsClient.java new file mode 100644 index 000000000000..3bc44dff45d3 --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/HostsClient.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.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.util.Context; +import com.azure.resourcemanager.avs.fluent.models.HostModelInner; + +/** + * An instance of this class provides access to all the operations defined in HostsClient. + */ +public interface HostsClient { + /** + * List Host 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. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException 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 Host list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String privateCloudName, String clusterName); + + /** + * List Host 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. + * @param context The context to associate with this 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 Host list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String privateCloudName, String clusterName, + Context context); + + /** + * Get a Host. + * + * @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. + * @param hostId The host identifier. + * @param context The context to associate with this 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 Host along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse(String resourceGroupName, String privateCloudName, String clusterName, + String hostId, Context context); + + /** + * Get a Host. + * + * @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. + * @param hostId The host identifier. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a Host. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + HostModelInner get(String resourceGroupName, String privateCloudName, String clusterName, String hostId); +} 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 1053a2e7d306..646c357c9026 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 @@ -159,7 +159,7 @@ PlacementPolicyInner createOrUpdate(String resourceGroupName, String privateClou * @param privateCloudName Name of the private cloud. * @param clusterName Name of the cluster. * @param placementPolicyName Name of the placement policy. - * @param placementPolicyUpdate The placement policy properties to be updated. + * @param placementPolicyUpdate 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. @@ -177,7 +177,7 @@ SyncPoller, PlacementPolicyInner> beginUpdate(S * @param privateCloudName Name of the private cloud. * @param clusterName Name of the cluster. * @param placementPolicyName Name of the placement policy. - * @param placementPolicyUpdate The placement policy properties to be updated. + * @param placementPolicyUpdate 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. @@ -196,7 +196,7 @@ SyncPoller, PlacementPolicyInner> beginUpdate(S * @param privateCloudName Name of the private cloud. * @param clusterName Name of the cluster. * @param placementPolicyName Name of the placement policy. - * @param placementPolicyUpdate The placement policy properties to be updated. + * @param placementPolicyUpdate 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. @@ -213,7 +213,7 @@ PlacementPolicyInner update(String resourceGroupName, String privateCloudName, S * @param privateCloudName Name of the private cloud. * @param clusterName Name of the cluster. * @param placementPolicyName Name of the placement policy. - * @param placementPolicyUpdate The placement policy properties to be updated. + * @param placementPolicyUpdate 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. 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 749f3460f4f5..b58675a39d96 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 @@ -160,7 +160,7 @@ PrivateCloudInner createOrUpdate(String resourceGroupName, String privateCloudNa * * @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. + * @param privateCloudUpdate 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. @@ -175,7 +175,7 @@ SyncPoller, PrivateCloudInner> beginUpdate(String * * @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. + * @param privateCloudUpdate 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. @@ -191,7 +191,7 @@ SyncPoller, PrivateCloudInner> beginUpdate(String * * @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. + * @param privateCloudUpdate 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. @@ -205,7 +205,7 @@ SyncPoller, PrivateCloudInner> beginUpdate(String * * @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. + * @param privateCloudUpdate 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. diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/ProvisionedNetworksClient.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/ProvisionedNetworksClient.java new file mode 100644 index 000000000000..9a801bddc8dc --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/ProvisionedNetworksClient.java @@ -0,0 +1,74 @@ +// Copyright (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.util.Context; +import com.azure.resourcemanager.avs.fluent.models.ProvisionedNetworkInner; + +/** + * An instance of this class provides access to all the operations defined in ProvisionedNetworksClient. + */ +public interface ProvisionedNetworksClient { + /** + * List ProvisionedNetwork 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 ProvisionedNetwork list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String privateCloudName); + + /** + * List ProvisionedNetwork 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 ProvisionedNetwork list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String privateCloudName, Context context); + + /** + * Get a ProvisionedNetwork. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param provisionedNetworkName 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 a ProvisionedNetwork along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse(String resourceGroupName, String privateCloudName, + String provisionedNetworkName, Context context); + + /** + * Get a ProvisionedNetwork. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param provisionedNetworkName 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 a ProvisionedNetwork. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ProvisionedNetworkInner get(String resourceGroupName, String privateCloudName, String provisionedNetworkName); +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/PureStoragePoliciesClient.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/PureStoragePoliciesClient.java new file mode 100644 index 000000000000..835d2b2a0edb --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/PureStoragePoliciesClient.java @@ -0,0 +1,202 @@ +// Copyright (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.PureStoragePolicyInner; + +/** + * An instance of this class provides access to all the operations defined in PureStoragePoliciesClient. + */ +public interface PureStoragePoliciesClient { + /** + * List PureStoragePolicy 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 PureStoragePolicy list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String privateCloudName); + + /** + * List PureStoragePolicy 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 PureStoragePolicy list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String privateCloudName, Context context); + + /** + * Get a PureStoragePolicy. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param storagePolicyName Name of the storage 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 PureStoragePolicy along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse(String resourceGroupName, String privateCloudName, + String storagePolicyName, Context context); + + /** + * Get a PureStoragePolicy. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param storagePolicyName Name of the storage 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 PureStoragePolicy. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + PureStoragePolicyInner get(String resourceGroupName, String privateCloudName, String storagePolicyName); + + /** + * Create a PureStoragePolicy. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param storagePolicyName Name of the storage policy. + * @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 instance describing a Pure Storage Policy Based Management + * policy. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, PureStoragePolicyInner> beginCreateOrUpdate(String resourceGroupName, + String privateCloudName, String storagePolicyName, PureStoragePolicyInner resource); + + /** + * Create a PureStoragePolicy. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param storagePolicyName Name of the storage policy. + * @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 instance describing a Pure Storage Policy Based Management + * policy. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, PureStoragePolicyInner> beginCreateOrUpdate(String resourceGroupName, + String privateCloudName, String storagePolicyName, PureStoragePolicyInner resource, Context context); + + /** + * Create a PureStoragePolicy. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param storagePolicyName Name of the storage policy. + * @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 instance describing a Pure Storage Policy Based Management policy. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + PureStoragePolicyInner createOrUpdate(String resourceGroupName, String privateCloudName, String storagePolicyName, + PureStoragePolicyInner resource); + + /** + * Create a PureStoragePolicy. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param storagePolicyName Name of the storage policy. + * @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 instance describing a Pure Storage Policy Based Management policy. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + PureStoragePolicyInner createOrUpdate(String resourceGroupName, String privateCloudName, String storagePolicyName, + PureStoragePolicyInner resource, Context context); + + /** + * Delete a PureStoragePolicy. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param storagePolicyName Name of the storage 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 storagePolicyName); + + /** + * Delete a PureStoragePolicy. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param storagePolicyName Name of the storage 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 the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDelete(String resourceGroupName, String privateCloudName, + String storagePolicyName, Context context); + + /** + * Delete a PureStoragePolicy. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param storagePolicyName Name of the storage 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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String privateCloudName, String storagePolicyName); + + /** + * Delete a PureStoragePolicy. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param storagePolicyName Name of the storage 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 storagePolicyName, Context context); +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/SkusClient.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/SkusClient.java new file mode 100644 index 000000000000..a8c2e611f2d6 --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/SkusClient.java @@ -0,0 +1,38 @@ +// Copyright (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.util.Context; +import com.azure.resourcemanager.avs.fluent.models.ResourceSkuInner; + +/** + * An instance of this class provides access to all the operations defined in SkusClient. + */ +public interface SkusClient { + /** + * A list of SKUs. + * + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return paged collection of ResourceSku items as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(); + + /** + * A list of SKUs. + * + * @param context The context to associate with this 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 paged collection of ResourceSku items 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/VirtualMachinesClient.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/VirtualMachinesClient.java index 3b7548a5c8ec..e35bb020d82c 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 @@ -88,7 +88,7 @@ VirtualMachineInner get(String resourceGroupName, String privateCloudName, Strin * @param privateCloudName Name of the private cloud. * @param clusterName Name of the cluster. * @param virtualMachineId ID of the virtual machine. - * @param restrictMovement The body type of the operation request. + * @param restrictMovement The content of the action 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. @@ -105,7 +105,7 @@ SyncPoller, Void> beginRestrictMovement(String resourceGroupNam * @param privateCloudName Name of the private cloud. * @param clusterName Name of the cluster. * @param virtualMachineId ID of the virtual machine. - * @param restrictMovement The body type of the operation request. + * @param restrictMovement The content of the action 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. @@ -123,7 +123,7 @@ SyncPoller, Void> beginRestrictMovement(String resourceGroupNam * @param privateCloudName Name of the private cloud. * @param clusterName Name of the cluster. * @param virtualMachineId ID of the virtual machine. - * @param restrictMovement The body type of the operation request. + * @param restrictMovement The content of the action 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. @@ -139,7 +139,7 @@ void restrictMovement(String resourceGroupName, String privateCloudName, String * @param privateCloudName Name of the private cloud. * @param clusterName Name of the cluster. * @param virtualMachineId ID of the virtual machine. - * @param restrictMovement The body type of the operation request. + * @param restrictMovement The content of the action 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. 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 54139e75dc3c..99e702e1ad0c 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 @@ -19,8 +19,8 @@ import com.azure.resourcemanager.avs.fluent.models.WorkloadNetworkPortMirroringInner; import com.azure.resourcemanager.avs.fluent.models.WorkloadNetworkPublicIpInner; import com.azure.resourcemanager.avs.fluent.models.WorkloadNetworkSegmentInner; -import com.azure.resourcemanager.avs.fluent.models.WorkloadNetworkVirtualMachineInner; import com.azure.resourcemanager.avs.fluent.models.WorkloadNetworkVMGroupInner; +import com.azure.resourcemanager.avs.fluent.models.WorkloadNetworkVirtualMachineInner; /** * An instance of this class provides access to all the operations defined in WorkloadNetworksClient. 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 432d3df66946..1a2f815f3fd0 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 @@ -15,6 +15,7 @@ import com.azure.resourcemanager.avs.models.DiskPoolVolume; import com.azure.resourcemanager.avs.models.ElasticSanVolume; import com.azure.resourcemanager.avs.models.NetAppVolume; +import com.azure.resourcemanager.avs.models.PureStorageVolume; import java.io.IOException; /** @@ -179,6 +180,29 @@ public DatastoreInner withElasticSanVolume(ElasticSanVolume elasticSanVolume) { return this; } + /** + * Get the pureStorageVolume property: A Pure Storage volume. + * + * @return the pureStorageVolume value. + */ + public PureStorageVolume pureStorageVolume() { + return this.innerProperties() == null ? null : this.innerProperties().pureStorageVolume(); + } + + /** + * Set the pureStorageVolume property: A Pure Storage volume. + * + * @param pureStorageVolume the pureStorageVolume value to set. + * @return the DatastoreInner object itself. + */ + public DatastoreInner withPureStorageVolume(PureStorageVolume pureStorageVolume) { + if (this.innerProperties() == null) { + this.innerProperties = new DatastoreProperties(); + } + this.innerProperties().withPureStorageVolume(pureStorageVolume); + return this; + } + /** * Get the status property: The operational status of the datastore. * 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 09cb698a3b50..1c8e3bcfd248 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 @@ -14,6 +14,7 @@ import com.azure.resourcemanager.avs.models.DiskPoolVolume; import com.azure.resourcemanager.avs.models.ElasticSanVolume; import com.azure.resourcemanager.avs.models.NetAppVolume; +import com.azure.resourcemanager.avs.models.PureStorageVolume; import java.io.IOException; /** @@ -41,6 +42,11 @@ public final class DatastoreProperties implements JsonSerializable zones; + + /* + * The SKU (Stock Keeping Unit) assigned to this resource. + */ + private Sku sku; + + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + private SystemData systemData; + + /* + * The type of the resource. + */ + private String type; + + /* + * The name of the resource. + */ + private String name; + + /* + * Fully qualified resource Id for the resource. + */ + private String id; + + /** + * Creates an instance of HostModelInner class. + */ + public HostModelInner() { + } + + /** + * Get the properties property: The resource-specific properties for this resource. + * + * @return the properties value. + */ + public HostProperties properties() { + return this.properties; + } + + /** + * Set the properties property: The resource-specific properties for this resource. + * + * @param properties the properties value to set. + * @return the HostModelInner object itself. + */ + public HostModelInner withProperties(HostProperties properties) { + this.properties = properties; + return this; + } + + /** + * Get the zones property: The availability zones. + * + * @return the zones value. + */ + public List zones() { + return this.zones; + } + + /** + * Set the zones property: The availability zones. + * + * @param zones the zones value to set. + * @return the HostModelInner object itself. + */ + public HostModelInner withZones(List zones) { + this.zones = zones; + return this; + } + + /** + * 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 HostModelInner object itself. + */ + public HostModelInner withSku(Sku sku) { + this.sku = sku; + 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; + } + + /** + * Get the type property: The type of the resource. + * + * @return the type value. + */ + @Override + public String type() { + return this.type; + } + + /** + * Get the name property: The name of the resource. + * + * @return the name value. + */ + @Override + public String name() { + return this.name; + } + + /** + * Get the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + @Override + public String id() { + return this.id; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (properties() != null) { + properties().validate(); + } + if (sku() != null) { + sku().validate(); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("properties", this.properties); + jsonWriter.writeArrayField("zones", this.zones, (writer, element) -> writer.writeString(element)); + jsonWriter.writeJsonField("sku", this.sku); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of HostModelInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of HostModelInner if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the HostModelInner. + */ + public static HostModelInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + HostModelInner deserializedHostModelInner = new HostModelInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedHostModelInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedHostModelInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedHostModelInner.type = reader.getString(); + } else if ("properties".equals(fieldName)) { + deserializedHostModelInner.properties = HostProperties.fromJson(reader); + } else if ("zones".equals(fieldName)) { + List zones = reader.readArray(reader1 -> reader1.getString()); + deserializedHostModelInner.zones = zones; + } else if ("sku".equals(fieldName)) { + deserializedHostModelInner.sku = Sku.fromJson(reader); + } else if ("systemData".equals(fieldName)) { + deserializedHostModelInner.systemData = SystemData.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedHostModelInner; + }); + } +} 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 cc6606a1c003..559cadead472 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 @@ -47,6 +47,11 @@ public final class PrivateCloudInner extends Resource { */ private PrivateCloudIdentity identity; + /* + * The availability zones. + */ + private List zones; + /* * Azure Resource Manager metadata containing createdBy and modifiedBy information. */ @@ -122,6 +127,26 @@ public PrivateCloudInner withIdentity(PrivateCloudIdentity identity) { return this; } + /** + * Get the zones property: The availability zones. + * + * @return the zones value. + */ + public List zones() { + return this.zones; + } + + /** + * Set the zones property: The availability zones. + * + * @param zones the zones value to set. + * @return the PrivateCloudInner object itself. + */ + public PrivateCloudInner withZones(List zones) { + this.zones = zones; + return this; + } + /** * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. * @@ -593,10 +618,6 @@ public void validate() { if (identity() != null) { identity().validate(); } - if (location() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property location in model PrivateCloudInner")); - } } private static final ClientLogger LOGGER = new ClientLogger(PrivateCloudInner.class); @@ -612,6 +633,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeJsonField("sku", this.sku); jsonWriter.writeJsonField("properties", this.innerProperties); jsonWriter.writeJsonField("identity", this.identity); + jsonWriter.writeArrayField("zones", this.zones, (writer, element) -> writer.writeString(element)); return jsonWriter.writeEndObject(); } @@ -648,6 +670,9 @@ public static PrivateCloudInner fromJson(JsonReader jsonReader) throws IOExcepti deserializedPrivateCloudInner.innerProperties = PrivateCloudProperties.fromJson(reader); } else if ("identity".equals(fieldName)) { deserializedPrivateCloudInner.identity = PrivateCloudIdentity.fromJson(reader); + } else if ("zones".equals(fieldName)) { + List zones = reader.readArray(reader1 -> reader1.getString()); + deserializedPrivateCloudInner.zones = zones; } else if ("systemData".equals(fieldName)) { deserializedPrivateCloudInner.systemData = SystemData.fromJson(reader); } else { diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/ProvisionedNetworkInner.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/ProvisionedNetworkInner.java new file mode 100644 index 000000000000..14fe71626c82 --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/ProvisionedNetworkInner.java @@ -0,0 +1,183 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.avs.fluent.models; + +import com.azure.core.annotation.Immutable; +import com.azure.core.management.ProxyResource; +import com.azure.core.management.SystemData; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.avs.models.ProvisionedNetworkProvisioningState; +import com.azure.resourcemanager.avs.models.ProvisionedNetworkTypes; +import java.io.IOException; + +/** + * A provisioned network resource. + */ +@Immutable +public final class ProvisionedNetworkInner extends ProxyResource { + /* + * The resource-specific properties for this resource. + */ + private ProvisionedNetworkProperties innerProperties; + + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + private SystemData systemData; + + /* + * The type of the resource. + */ + private String type; + + /* + * The name of the resource. + */ + private String name; + + /* + * Fully qualified resource Id for the resource. + */ + private String id; + + /** + * Creates an instance of ProvisionedNetworkInner class. + */ + public ProvisionedNetworkInner() { + } + + /** + * Get the innerProperties property: The resource-specific properties for this resource. + * + * @return the innerProperties value. + */ + private ProvisionedNetworkProperties 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 type property: The type of the resource. + * + * @return the type value. + */ + @Override + public String type() { + return this.type; + } + + /** + * Get the name property: The name of the resource. + * + * @return the name value. + */ + @Override + public String name() { + return this.name; + } + + /** + * Get the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + @Override + public String id() { + return this.id; + } + + /** + * Get the provisioningState property: The provisioning state of the resource. + * + * @return the provisioningState value. + */ + public ProvisionedNetworkProvisioningState provisioningState() { + return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); + } + + /** + * Get the addressPrefix property: The address prefixes of the provisioned network in CIDR notation. + * + * @return the addressPrefix value. + */ + public String addressPrefix() { + return this.innerProperties() == null ? null : this.innerProperties().addressPrefix(); + } + + /** + * Get the networkType property: The type of network provisioned. + * + * @return the networkType value. + */ + public ProvisionedNetworkTypes networkType() { + return this.innerProperties() == null ? null : this.innerProperties().networkType(); + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (innerProperties() != null) { + innerProperties().validate(); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("properties", this.innerProperties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ProvisionedNetworkInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ProvisionedNetworkInner if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the ProvisionedNetworkInner. + */ + public static ProvisionedNetworkInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ProvisionedNetworkInner deserializedProvisionedNetworkInner = new ProvisionedNetworkInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedProvisionedNetworkInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedProvisionedNetworkInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedProvisionedNetworkInner.type = reader.getString(); + } else if ("properties".equals(fieldName)) { + deserializedProvisionedNetworkInner.innerProperties = ProvisionedNetworkProperties.fromJson(reader); + } else if ("systemData".equals(fieldName)) { + deserializedProvisionedNetworkInner.systemData = SystemData.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedProvisionedNetworkInner; + }); + } +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/ProvisionedNetworkProperties.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/ProvisionedNetworkProperties.java new file mode 100644 index 000000000000..987f1e31a925 --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/ProvisionedNetworkProperties.java @@ -0,0 +1,117 @@ +// Copyright (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.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.avs.models.ProvisionedNetworkProvisioningState; +import com.azure.resourcemanager.avs.models.ProvisionedNetworkTypes; +import java.io.IOException; + +/** + * The properties of a provisioned network. + */ +@Immutable +public final class ProvisionedNetworkProperties implements JsonSerializable { + /* + * The provisioning state of the resource. + */ + private ProvisionedNetworkProvisioningState provisioningState; + + /* + * The address prefixes of the provisioned network in CIDR notation. + */ + private String addressPrefix; + + /* + * The type of network provisioned. + */ + private ProvisionedNetworkTypes networkType; + + /** + * Creates an instance of ProvisionedNetworkProperties class. + */ + public ProvisionedNetworkProperties() { + } + + /** + * Get the provisioningState property: The provisioning state of the resource. + * + * @return the provisioningState value. + */ + public ProvisionedNetworkProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Get the addressPrefix property: The address prefixes of the provisioned network in CIDR notation. + * + * @return the addressPrefix value. + */ + public String addressPrefix() { + return this.addressPrefix; + } + + /** + * Get the networkType property: The type of network provisioned. + * + * @return the networkType value. + */ + public ProvisionedNetworkTypes networkType() { + return this.networkType; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ProvisionedNetworkProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ProvisionedNetworkProperties if the JsonReader was pointing to an instance of it, or null + * if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the ProvisionedNetworkProperties. + */ + public static ProvisionedNetworkProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ProvisionedNetworkProperties deserializedProvisionedNetworkProperties = new ProvisionedNetworkProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("provisioningState".equals(fieldName)) { + deserializedProvisionedNetworkProperties.provisioningState + = ProvisionedNetworkProvisioningState.fromString(reader.getString()); + } else if ("addressPrefix".equals(fieldName)) { + deserializedProvisionedNetworkProperties.addressPrefix = reader.getString(); + } else if ("networkType".equals(fieldName)) { + deserializedProvisionedNetworkProperties.networkType + = ProvisionedNetworkTypes.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedProvisionedNetworkProperties; + }); + } +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/PureStoragePolicyInner.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/PureStoragePolicyInner.java new file mode 100644 index 000000000000..00f15c29dd7f --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/PureStoragePolicyInner.java @@ -0,0 +1,210 @@ +// Copyright (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.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.avs.models.PureStoragePolicyProvisioningState; +import java.io.IOException; + +/** + * An instance describing a Pure Storage Policy Based Management policy. + */ +@Fluent +public final class PureStoragePolicyInner extends ProxyResource { + /* + * The resource-specific properties for this resource. + */ + private PureStoragePolicyProperties innerProperties; + + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + private SystemData systemData; + + /* + * The type of the resource. + */ + private String type; + + /* + * The name of the resource. + */ + private String name; + + /* + * Fully qualified resource Id for the resource. + */ + private String id; + + /** + * Creates an instance of PureStoragePolicyInner class. + */ + public PureStoragePolicyInner() { + } + + /** + * Get the innerProperties property: The resource-specific properties for this resource. + * + * @return the innerProperties value. + */ + private PureStoragePolicyProperties 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 type property: The type of the resource. + * + * @return the type value. + */ + @Override + public String type() { + return this.type; + } + + /** + * Get the name property: The name of the resource. + * + * @return the name value. + */ + @Override + public String name() { + return this.name; + } + + /** + * Get the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + @Override + public String id() { + return this.id; + } + + /** + * Get the storagePolicyDefinition property: Definition of a Pure Storage Policy Based Management policy. + * + * @return the storagePolicyDefinition value. + */ + public String storagePolicyDefinition() { + return this.innerProperties() == null ? null : this.innerProperties().storagePolicyDefinition(); + } + + /** + * Set the storagePolicyDefinition property: Definition of a Pure Storage Policy Based Management policy. + * + * @param storagePolicyDefinition the storagePolicyDefinition value to set. + * @return the PureStoragePolicyInner object itself. + */ + public PureStoragePolicyInner withStoragePolicyDefinition(String storagePolicyDefinition) { + if (this.innerProperties() == null) { + this.innerProperties = new PureStoragePolicyProperties(); + } + this.innerProperties().withStoragePolicyDefinition(storagePolicyDefinition); + return this; + } + + /** + * Get the storagePoolId property: Azure resource ID of the Pure Storage Pool associated with the storage policy. + * + * @return the storagePoolId value. + */ + public String storagePoolId() { + return this.innerProperties() == null ? null : this.innerProperties().storagePoolId(); + } + + /** + * Set the storagePoolId property: Azure resource ID of the Pure Storage Pool associated with the storage policy. + * + * @param storagePoolId the storagePoolId value to set. + * @return the PureStoragePolicyInner object itself. + */ + public PureStoragePolicyInner withStoragePoolId(String storagePoolId) { + if (this.innerProperties() == null) { + this.innerProperties = new PureStoragePolicyProperties(); + } + this.innerProperties().withStoragePoolId(storagePoolId); + return this; + } + + /** + * Get the provisioningState property: The state of the Pure Storage Policy Based Management policy provisioning. + * + * @return the provisioningState value. + */ + public PureStoragePolicyProvisioningState 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(); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("properties", this.innerProperties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of PureStoragePolicyInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of PureStoragePolicyInner if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the PureStoragePolicyInner. + */ + public static PureStoragePolicyInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + PureStoragePolicyInner deserializedPureStoragePolicyInner = new PureStoragePolicyInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedPureStoragePolicyInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedPureStoragePolicyInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedPureStoragePolicyInner.type = reader.getString(); + } else if ("properties".equals(fieldName)) { + deserializedPureStoragePolicyInner.innerProperties = PureStoragePolicyProperties.fromJson(reader); + } else if ("systemData".equals(fieldName)) { + deserializedPureStoragePolicyInner.systemData = SystemData.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedPureStoragePolicyInner; + }); + } +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/PureStoragePolicyProperties.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/PureStoragePolicyProperties.java new file mode 100644 index 000000000000..20d9cff8bf8f --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/PureStoragePolicyProperties.java @@ -0,0 +1,153 @@ +// Copyright (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.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.avs.models.PureStoragePolicyProvisioningState; +import java.io.IOException; + +/** + * Properties of a Pure Storage Policy Based Management policy. + */ +@Fluent +public final class PureStoragePolicyProperties implements JsonSerializable { + /* + * Definition of a Pure Storage Policy Based Management policy + */ + private String storagePolicyDefinition; + + /* + * Azure resource ID of the Pure Storage Pool associated with the storage policy + */ + private String storagePoolId; + + /* + * The state of the Pure Storage Policy Based Management policy provisioning + */ + private PureStoragePolicyProvisioningState provisioningState; + + /** + * Creates an instance of PureStoragePolicyProperties class. + */ + public PureStoragePolicyProperties() { + } + + /** + * Get the storagePolicyDefinition property: Definition of a Pure Storage Policy Based Management policy. + * + * @return the storagePolicyDefinition value. + */ + public String storagePolicyDefinition() { + return this.storagePolicyDefinition; + } + + /** + * Set the storagePolicyDefinition property: Definition of a Pure Storage Policy Based Management policy. + * + * @param storagePolicyDefinition the storagePolicyDefinition value to set. + * @return the PureStoragePolicyProperties object itself. + */ + public PureStoragePolicyProperties withStoragePolicyDefinition(String storagePolicyDefinition) { + this.storagePolicyDefinition = storagePolicyDefinition; + return this; + } + + /** + * Get the storagePoolId property: Azure resource ID of the Pure Storage Pool associated with the storage policy. + * + * @return the storagePoolId value. + */ + public String storagePoolId() { + return this.storagePoolId; + } + + /** + * Set the storagePoolId property: Azure resource ID of the Pure Storage Pool associated with the storage policy. + * + * @param storagePoolId the storagePoolId value to set. + * @return the PureStoragePolicyProperties object itself. + */ + public PureStoragePolicyProperties withStoragePoolId(String storagePoolId) { + this.storagePoolId = storagePoolId; + return this; + } + + /** + * Get the provisioningState property: The state of the Pure Storage Policy Based Management policy provisioning. + * + * @return the provisioningState value. + */ + public PureStoragePolicyProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (storagePolicyDefinition() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property storagePolicyDefinition in model PureStoragePolicyProperties")); + } + if (storagePoolId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property storagePoolId in model PureStoragePolicyProperties")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(PureStoragePolicyProperties.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("storagePolicyDefinition", this.storagePolicyDefinition); + jsonWriter.writeStringField("storagePoolId", this.storagePoolId); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of PureStoragePolicyProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of PureStoragePolicyProperties if the JsonReader was pointing to an instance of it, or null + * if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the PureStoragePolicyProperties. + */ + public static PureStoragePolicyProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + PureStoragePolicyProperties deserializedPureStoragePolicyProperties = new PureStoragePolicyProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("storagePolicyDefinition".equals(fieldName)) { + deserializedPureStoragePolicyProperties.storagePolicyDefinition = reader.getString(); + } else if ("storagePoolId".equals(fieldName)) { + deserializedPureStoragePolicyProperties.storagePoolId = reader.getString(); + } else if ("provisioningState".equals(fieldName)) { + deserializedPureStoragePolicyProperties.provisioningState + = PureStoragePolicyProvisioningState.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedPureStoragePolicyProperties; + }); + } +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/ResourceSkuInner.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/ResourceSkuInner.java new file mode 100644 index 000000000000..5088dcb648e3 --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/ResourceSkuInner.java @@ -0,0 +1,362 @@ +// Copyright (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.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.avs.models.ResourceSkuCapabilities; +import com.azure.resourcemanager.avs.models.ResourceSkuLocationInfo; +import com.azure.resourcemanager.avs.models.ResourceSkuResourceType; +import com.azure.resourcemanager.avs.models.ResourceSkuRestrictions; +import java.io.IOException; +import java.util.List; + +/** + * A SKU for a resource. + */ +@Fluent +public final class ResourceSkuInner implements JsonSerializable { + /* + * The type of resource the SKU applies to. + */ + private ResourceSkuResourceType resourceType; + + /* + * The name of the SKU. + */ + private String name; + + /* + * The tier of virtual machines in a scale set + */ + private String tier; + + /* + * The size of the SKU. + */ + private String size; + + /* + * The family of the SKU. + */ + private String family; + + /* + * The set of locations that the SKU is available. + */ + private List locations; + + /* + * A list of locations and availability zones in those locations where the SKU is available + */ + private List locationInfo; + + /* + * Name value pairs to describe the capability. + */ + private List capabilities; + + /* + * The restrictions of the SKU. + */ + private List restrictions; + + /** + * Creates an instance of ResourceSkuInner class. + */ + public ResourceSkuInner() { + } + + /** + * Get the resourceType property: The type of resource the SKU applies to. + * + * @return the resourceType value. + */ + public ResourceSkuResourceType resourceType() { + return this.resourceType; + } + + /** + * Set the resourceType property: The type of resource the SKU applies to. + * + * @param resourceType the resourceType value to set. + * @return the ResourceSkuInner object itself. + */ + public ResourceSkuInner withResourceType(ResourceSkuResourceType resourceType) { + this.resourceType = resourceType; + return this; + } + + /** + * Get the name property: The name of the SKU. + * + * @return the name value. + */ + public String name() { + return this.name; + } + + /** + * Set the name property: The name of the SKU. + * + * @param name the name value to set. + * @return the ResourceSkuInner object itself. + */ + public ResourceSkuInner withName(String name) { + this.name = name; + return this; + } + + /** + * Get the tier property: The tier of virtual machines in a scale set. + * + * @return the tier value. + */ + public String tier() { + return this.tier; + } + + /** + * Set the tier property: The tier of virtual machines in a scale set. + * + * @param tier the tier value to set. + * @return the ResourceSkuInner object itself. + */ + public ResourceSkuInner withTier(String tier) { + this.tier = tier; + return this; + } + + /** + * Get the size property: The size of the SKU. + * + * @return the size value. + */ + public String size() { + return this.size; + } + + /** + * Set the size property: The size of the SKU. + * + * @param size the size value to set. + * @return the ResourceSkuInner object itself. + */ + public ResourceSkuInner withSize(String size) { + this.size = size; + return this; + } + + /** + * Get the family property: The family of the SKU. + * + * @return the family value. + */ + public String family() { + return this.family; + } + + /** + * Set the family property: The family of the SKU. + * + * @param family the family value to set. + * @return the ResourceSkuInner object itself. + */ + public ResourceSkuInner withFamily(String family) { + this.family = family; + return this; + } + + /** + * Get the locations property: The set of locations that the SKU is available. + * + * @return the locations value. + */ + public List locations() { + return this.locations; + } + + /** + * Set the locations property: The set of locations that the SKU is available. + * + * @param locations the locations value to set. + * @return the ResourceSkuInner object itself. + */ + public ResourceSkuInner withLocations(List locations) { + this.locations = locations; + return this; + } + + /** + * Get the locationInfo property: A list of locations and availability zones in those locations where the SKU is + * available. + * + * @return the locationInfo value. + */ + public List locationInfo() { + return this.locationInfo; + } + + /** + * Set the locationInfo property: A list of locations and availability zones in those locations where the SKU is + * available. + * + * @param locationInfo the locationInfo value to set. + * @return the ResourceSkuInner object itself. + */ + public ResourceSkuInner withLocationInfo(List locationInfo) { + this.locationInfo = locationInfo; + return this; + } + + /** + * Get the capabilities property: Name value pairs to describe the capability. + * + * @return the capabilities value. + */ + public List capabilities() { + return this.capabilities; + } + + /** + * Set the capabilities property: Name value pairs to describe the capability. + * + * @param capabilities the capabilities value to set. + * @return the ResourceSkuInner object itself. + */ + public ResourceSkuInner withCapabilities(List capabilities) { + this.capabilities = capabilities; + return this; + } + + /** + * Get the restrictions property: The restrictions of the SKU. + * + * @return the restrictions value. + */ + public List restrictions() { + return this.restrictions; + } + + /** + * Set the restrictions property: The restrictions of the SKU. + * + * @param restrictions the restrictions value to set. + * @return the ResourceSkuInner object itself. + */ + public ResourceSkuInner withRestrictions(List restrictions) { + this.restrictions = restrictions; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (resourceType() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property resourceType in model ResourceSkuInner")); + } + if (name() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property name in model ResourceSkuInner")); + } + if (locations() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property locations in model ResourceSkuInner")); + } + if (locationInfo() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property locationInfo in model ResourceSkuInner")); + } else { + locationInfo().forEach(e -> e.validate()); + } + if (capabilities() != null) { + capabilities().forEach(e -> e.validate()); + } + if (restrictions() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property restrictions in model ResourceSkuInner")); + } else { + restrictions().forEach(e -> e.validate()); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(ResourceSkuInner.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("resourceType", this.resourceType == null ? null : this.resourceType.toString()); + jsonWriter.writeStringField("name", this.name); + jsonWriter.writeArrayField("locations", this.locations, (writer, element) -> writer.writeString(element)); + jsonWriter.writeArrayField("locationInfo", this.locationInfo, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeArrayField("restrictions", this.restrictions, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeStringField("tier", this.tier); + jsonWriter.writeStringField("size", this.size); + jsonWriter.writeStringField("family", this.family); + jsonWriter.writeArrayField("capabilities", this.capabilities, (writer, element) -> writer.writeJson(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ResourceSkuInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ResourceSkuInner if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the ResourceSkuInner. + */ + public static ResourceSkuInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ResourceSkuInner deserializedResourceSkuInner = new ResourceSkuInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("resourceType".equals(fieldName)) { + deserializedResourceSkuInner.resourceType = ResourceSkuResourceType.fromString(reader.getString()); + } else if ("name".equals(fieldName)) { + deserializedResourceSkuInner.name = reader.getString(); + } else if ("locations".equals(fieldName)) { + List locations = reader.readArray(reader1 -> reader1.getString()); + deserializedResourceSkuInner.locations = locations; + } else if ("locationInfo".equals(fieldName)) { + List locationInfo + = reader.readArray(reader1 -> ResourceSkuLocationInfo.fromJson(reader1)); + deserializedResourceSkuInner.locationInfo = locationInfo; + } else if ("restrictions".equals(fieldName)) { + List restrictions + = reader.readArray(reader1 -> ResourceSkuRestrictions.fromJson(reader1)); + deserializedResourceSkuInner.restrictions = restrictions; + } else if ("tier".equals(fieldName)) { + deserializedResourceSkuInner.tier = reader.getString(); + } else if ("size".equals(fieldName)) { + deserializedResourceSkuInner.size = reader.getString(); + } else if ("family".equals(fieldName)) { + deserializedResourceSkuInner.family = reader.getString(); + } else if ("capabilities".equals(fieldName)) { + List capabilities + = reader.readArray(reader1 -> ResourceSkuCapabilities.fromJson(reader1)); + deserializedResourceSkuInner.capabilities = capabilities; + } else { + reader.skipChildren(); + } + } + + return deserializedResourceSkuInner; + }); + } +} 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 dfff5a9f29c4..49a54e2fc729 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 @@ -117,7 +117,7 @@ public String displayName() { } /** - * Get the moRefId property: Virtual machine managed object reference id. + * Get the moRefId property: vCenter managed object reference ID of the virtual machine. * * @return the moRefId value. */ 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 3a1994e2bc3e..5e76ff31b84a 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 @@ -29,7 +29,7 @@ public final class VirtualMachineProperties implements JsonSerializable>> updateWithResponseAsync(String resource * @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. - * @param clusterUpdate The cluster properties to be updated. + * @param clusterUpdate 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. @@ -766,7 +766,7 @@ private Mono>> updateWithResponseAsync(String resource * @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. - * @param clusterUpdate The cluster properties to be updated. + * @param clusterUpdate 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. @@ -787,7 +787,7 @@ private PollerFlux, ClusterInner> beginUpdateAsync(Stri * @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. - * @param clusterUpdate The cluster properties to be updated. + * @param clusterUpdate 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. @@ -810,7 +810,7 @@ private PollerFlux, ClusterInner> beginUpdateAsync(Stri * @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. - * @param clusterUpdate The cluster properties to be updated. + * @param clusterUpdate 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. @@ -828,7 +828,7 @@ public SyncPoller, ClusterInner> beginUpdate(String res * @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. - * @param clusterUpdate The cluster properties to be updated. + * @param clusterUpdate 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. @@ -848,7 +848,7 @@ public SyncPoller, ClusterInner> beginUpdate(String res * @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. - * @param clusterUpdate The cluster properties to be updated. + * @param clusterUpdate 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. @@ -867,7 +867,7 @@ private Mono updateAsync(String resourceGroupName, String privateC * @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. - * @param clusterUpdate The cluster properties to be updated. + * @param clusterUpdate 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. @@ -887,7 +887,7 @@ private Mono updateAsync(String resourceGroupName, String privateC * @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. - * @param clusterUpdate The cluster properties to be updated. + * @param clusterUpdate 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. @@ -905,7 +905,7 @@ public ClusterInner update(String resourceGroupName, String privateCloudName, St * @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. - * @param clusterUpdate The cluster properties to be updated. + * @param clusterUpdate 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. 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 6f100e07c5e4..74dfa673057a 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 @@ -13,8 +13,8 @@ import com.azure.resourcemanager.avs.fluent.models.ClusterInner; import com.azure.resourcemanager.avs.fluent.models.ClusterZoneListInner; import com.azure.resourcemanager.avs.models.Cluster; -import com.azure.resourcemanager.avs.models.Clusters; import com.azure.resourcemanager.avs.models.ClusterZoneList; +import com.azure.resourcemanager.avs.models.Clusters; public final class ClustersImpl implements Clusters { private static final ClientLogger LOGGER = new ClientLogger(ClustersImpl.class); 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 22da4af4da4d..109014cb4462 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 @@ -13,6 +13,7 @@ import com.azure.resourcemanager.avs.models.DiskPoolVolume; import com.azure.resourcemanager.avs.models.ElasticSanVolume; import com.azure.resourcemanager.avs.models.NetAppVolume; +import com.azure.resourcemanager.avs.models.PureStorageVolume; public final class DatastoreImpl implements Datastore, Datastore.Definition, Datastore.Update { private DatastoreInner innerObject; @@ -51,6 +52,10 @@ public ElasticSanVolume elasticSanVolume() { return this.innerModel().elasticSanVolume(); } + public PureStorageVolume pureStorageVolume() { + return this.innerModel().pureStorageVolume(); + } + public DatastoreStatus status() { return this.innerModel().status(); } @@ -163,4 +168,9 @@ public DatastoreImpl withElasticSanVolume(ElasticSanVolume elasticSanVolume) { this.innerModel().withElasticSanVolume(elasticSanVolume); return this; } + + public DatastoreImpl withPureStorageVolume(PureStorageVolume pureStorageVolume) { + this.innerModel().withPureStorageVolume(pureStorageVolume); + return this; + } } diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/HostModelImpl.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/HostModelImpl.java new file mode 100644 index 000000000000..362a509abddc --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/HostModelImpl.java @@ -0,0 +1,65 @@ +// Copyright (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.HostModelInner; +import com.azure.resourcemanager.avs.models.HostModel; +import com.azure.resourcemanager.avs.models.HostProperties; +import com.azure.resourcemanager.avs.models.Sku; +import java.util.Collections; +import java.util.List; + +public final class HostModelImpl implements HostModel { + private HostModelInner innerObject; + + private final com.azure.resourcemanager.avs.AvsManager serviceManager; + + HostModelImpl(HostModelInner 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 HostProperties properties() { + return this.innerModel().properties(); + } + + public List zones() { + List inner = this.innerModel().zones(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + public Sku sku() { + return this.innerModel().sku(); + } + + public SystemData systemData() { + return this.innerModel().systemData(); + } + + public HostModelInner 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/HostsClientImpl.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/HostsClientImpl.java new file mode 100644 index 000000000000..b5f4335c0817 --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/HostsClientImpl.java @@ -0,0 +1,442 @@ +// Copyright (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.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.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.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.resourcemanager.avs.fluent.HostsClient; +import com.azure.resourcemanager.avs.fluent.models.HostModelInner; +import com.azure.resourcemanager.avs.models.HostListResult; +import reactor.core.publisher.Mono; + +/** + * An instance of this class provides access to all the operations defined in HostsClient. + */ +public final class HostsClientImpl implements HostsClient { + /** + * The proxy service used to perform REST calls. + */ + private final HostsService service; + + /** + * The service client containing this operation class. + */ + private final AvsClientImpl client; + + /** + * Initializes an instance of HostsClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + HostsClientImpl(AvsClientImpl client) { + this.service = RestProxy.create(HostsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for AvsClientHosts to be used by the proxy service to perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "AvsClientHosts") + public interface HostsService { + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters/{clusterName}/hosts") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + 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, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters/{clusterName}/hosts/{hostId}") + @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, @PathParam("clusterName") String clusterName, + @PathParam("hostId") String hostId, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listNext(@PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); + } + + /** + * List Host 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. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 Host 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) { + 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 (clusterName == null) { + return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .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 Host 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. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 Host 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) { + 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 (clusterName == null) { + return Mono.error(new IllegalArgumentException("Parameter clusterName 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(), 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 Host 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. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 Host 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), + nextLink -> listNextSinglePageAsync(nextLink)); + } + + /** + * List Host 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. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 Host 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), + nextLink -> listNextSinglePageAsync(nextLink, context)); + } + + /** + * List Host 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. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 Host list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String resourceGroupName, String privateCloudName, String clusterName) { + return new PagedIterable<>(listAsync(resourceGroupName, privateCloudName, clusterName)); + } + + /** + * List Host 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. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 Host list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String resourceGroupName, String privateCloudName, String clusterName, + Context context) { + return new PagedIterable<>(listAsync(resourceGroupName, privateCloudName, clusterName, context)); + } + + /** + * Get a Host. + * + * @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. + * @param hostId The host identifier. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a Host along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync(String resourceGroupName, String privateCloudName, + String clusterName, String hostId) { + 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 (clusterName == null) { + return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); + } + if (hostId == null) { + return Mono.error(new IllegalArgumentException("Parameter hostId 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, clusterName, hostId, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get a Host. + * + * @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. + * @param hostId The host identifier. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a Host along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync(String resourceGroupName, String privateCloudName, + String clusterName, String hostId, 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 (clusterName == null) { + return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); + } + if (hostId == null) { + return Mono.error(new IllegalArgumentException("Parameter hostId 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, clusterName, hostId, accept, context); + } + + /** + * Get a Host. + * + * @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. + * @param hostId The host identifier. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a Host on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getAsync(String resourceGroupName, String privateCloudName, String clusterName, + String hostId) { + return getWithResponseAsync(resourceGroupName, privateCloudName, clusterName, hostId) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Get a Host. + * + * @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. + * @param hostId The host identifier. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a Host along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse(String resourceGroupName, String privateCloudName, + String clusterName, String hostId, Context context) { + return getWithResponseAsync(resourceGroupName, privateCloudName, clusterName, hostId, context).block(); + } + + /** + * Get a Host. + * + * @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. + * @param hostId The host identifier. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a Host. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public HostModelInner get(String resourceGroupName, String privateCloudName, String clusterName, String hostId) { + return getWithResponse(resourceGroupName, privateCloudName, clusterName, hostId, Context.NONE).getValue(); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 Host list operation along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + 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.")); + } + 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)) + .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. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 Host list operation along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + 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.")); + } + 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)); + } +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/HostsImpl.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/HostsImpl.java new file mode 100644 index 000000000000..0249d7566104 --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/HostsImpl.java @@ -0,0 +1,70 @@ +// Copyright (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.HostsClient; +import com.azure.resourcemanager.avs.fluent.models.HostModelInner; +import com.azure.resourcemanager.avs.models.HostModel; +import com.azure.resourcemanager.avs.models.Hosts; + +public final class HostsImpl implements Hosts { + private static final ClientLogger LOGGER = new ClientLogger(HostsImpl.class); + + private final HostsClient innerClient; + + private final com.azure.resourcemanager.avs.AvsManager serviceManager; + + public HostsImpl(HostsClient 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 ResourceManagerUtils.mapPage(inner, inner1 -> new HostModelImpl(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 HostModelImpl(inner1, this.manager())); + } + + public Response getWithResponse(String resourceGroupName, String privateCloudName, String clusterName, + String hostId, Context context) { + Response inner + = this.serviceClient().getWithResponse(resourceGroupName, privateCloudName, clusterName, hostId, context); + if (inner != null) { + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new HostModelImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public HostModel get(String resourceGroupName, String privateCloudName, String clusterName, String hostId) { + HostModelInner inner = this.serviceClient().get(resourceGroupName, privateCloudName, clusterName, hostId); + if (inner != null) { + return new HostModelImpl(inner, this.manager()); + } else { + return null; + } + } + + private HostsClient 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/PlacementPoliciesClientImpl.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/PlacementPoliciesClientImpl.java index 315221c4b5fb..e2bcd20e9b0b 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 @@ -737,7 +737,7 @@ public PlacementPolicyInner createOrUpdate(String resourceGroupName, String priv * @param privateCloudName Name of the private cloud. * @param clusterName Name of the cluster. * @param placementPolicyName Name of the placement policy. - * @param placementPolicyUpdate The placement policy properties to be updated. + * @param placementPolicyUpdate 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. @@ -791,7 +791,7 @@ private Mono>> updateWithResponseAsync(String resource * @param privateCloudName Name of the private cloud. * @param clusterName Name of the cluster. * @param placementPolicyName Name of the placement policy. - * @param placementPolicyUpdate The placement policy properties to be updated. + * @param placementPolicyUpdate 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. @@ -845,7 +845,7 @@ private Mono>> updateWithResponseAsync(String resource * @param privateCloudName Name of the private cloud. * @param clusterName Name of the cluster. * @param placementPolicyName Name of the placement policy. - * @param placementPolicyUpdate The placement policy properties to be updated. + * @param placementPolicyUpdate 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. @@ -868,7 +868,7 @@ private PollerFlux, PlacementPolicyInner> begin * @param privateCloudName Name of the private cloud. * @param clusterName Name of the cluster. * @param placementPolicyName Name of the placement policy. - * @param placementPolicyUpdate The placement policy properties to be updated. + * @param placementPolicyUpdate 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. @@ -893,7 +893,7 @@ private PollerFlux, PlacementPolicyInner> begin * @param privateCloudName Name of the private cloud. * @param clusterName Name of the cluster. * @param placementPolicyName Name of the placement policy. - * @param placementPolicyUpdate The placement policy properties to be updated. + * @param placementPolicyUpdate 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. @@ -916,7 +916,7 @@ public SyncPoller, PlacementPolicyInner> beginU * @param privateCloudName Name of the private cloud. * @param clusterName Name of the cluster. * @param placementPolicyName Name of the placement policy. - * @param placementPolicyUpdate The placement policy properties to be updated. + * @param placementPolicyUpdate 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. @@ -940,7 +940,7 @@ public SyncPoller, PlacementPolicyInner> beginU * @param privateCloudName Name of the private cloud. * @param clusterName Name of the cluster. * @param placementPolicyName Name of the placement policy. - * @param placementPolicyUpdate The placement policy properties to be updated. + * @param placementPolicyUpdate 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. @@ -960,7 +960,7 @@ private Mono updateAsync(String resourceGroupName, String * @param privateCloudName Name of the private cloud. * @param clusterName Name of the cluster. * @param placementPolicyName Name of the placement policy. - * @param placementPolicyUpdate The placement policy properties to be updated. + * @param placementPolicyUpdate 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. @@ -981,7 +981,7 @@ private Mono updateAsync(String resourceGroupName, String * @param privateCloudName Name of the private cloud. * @param clusterName Name of the cluster. * @param placementPolicyName Name of the placement policy. - * @param placementPolicyUpdate The placement policy properties to be updated. + * @param placementPolicyUpdate 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. @@ -1001,7 +1001,7 @@ public PlacementPolicyInner update(String resourceGroupName, String privateCloud * @param privateCloudName Name of the private cloud. * @param clusterName Name of the cluster. * @param placementPolicyName Name of the placement policy. - * @param placementPolicyUpdate The placement policy properties to be updated. + * @param placementPolicyUpdate 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. 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 5faa5fd4dc6c..6a86228df513 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 @@ -66,6 +66,15 @@ public PrivateCloudIdentity identity() { return this.innerModel().identity(); } + public List zones() { + List inner = this.innerModel().zones(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + public SystemData systemData() { return this.innerModel().systemData(); } @@ -331,6 +340,11 @@ public PrivateCloudImpl withIdentity(PrivateCloudIdentity identity) { } } + public PrivateCloudImpl withZones(List zones) { + this.innerModel().withZones(zones); + return this; + } + public PrivateCloudImpl withManagementCluster(ManagementCluster managementCluster) { if (isInCreateMode()) { this.innerModel().withManagementCluster(managementCluster); 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 7e0ea1bb8cf7..39f58d3a9dea 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 @@ -776,7 +776,7 @@ public PrivateCloudInner createOrUpdate(String resourceGroupName, String private * * @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. + * @param privateCloudUpdate 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. @@ -818,7 +818,7 @@ private Mono>> updateWithResponseAsync(String resource * * @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. + * @param privateCloudUpdate 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. @@ -861,7 +861,7 @@ private Mono>> updateWithResponseAsync(String resource * * @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. + * @param privateCloudUpdate 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. @@ -881,7 +881,7 @@ private PollerFlux, PrivateCloudInner> beginUpdate * * @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. + * @param privateCloudUpdate 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. @@ -903,7 +903,7 @@ private PollerFlux, PrivateCloudInner> beginUpdate * * @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. + * @param privateCloudUpdate 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. @@ -920,7 +920,7 @@ public SyncPoller, PrivateCloudInner> beginUpdate( * * @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. + * @param privateCloudUpdate 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. @@ -938,7 +938,7 @@ public SyncPoller, PrivateCloudInner> beginUpdate( * * @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. + * @param privateCloudUpdate 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. @@ -956,7 +956,7 @@ private Mono updateAsync(String resourceGroupName, String pri * * @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. + * @param privateCloudUpdate 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. @@ -975,7 +975,7 @@ private Mono updateAsync(String resourceGroupName, String pri * * @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. + * @param privateCloudUpdate 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. @@ -992,7 +992,7 @@ public PrivateCloudInner update(String resourceGroupName, String privateCloudNam * * @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. + * @param privateCloudUpdate 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. diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/ProvisionedNetworkImpl.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/ProvisionedNetworkImpl.java new file mode 100644 index 000000000000..eb31196fd00c --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/ProvisionedNetworkImpl.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.implementation; + +import com.azure.core.management.SystemData; +import com.azure.resourcemanager.avs.fluent.models.ProvisionedNetworkInner; +import com.azure.resourcemanager.avs.models.ProvisionedNetwork; +import com.azure.resourcemanager.avs.models.ProvisionedNetworkProvisioningState; +import com.azure.resourcemanager.avs.models.ProvisionedNetworkTypes; + +public final class ProvisionedNetworkImpl implements ProvisionedNetwork { + private ProvisionedNetworkInner innerObject; + + private final com.azure.resourcemanager.avs.AvsManager serviceManager; + + ProvisionedNetworkImpl(ProvisionedNetworkInner 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 ProvisionedNetworkProvisioningState provisioningState() { + return this.innerModel().provisioningState(); + } + + public String addressPrefix() { + return this.innerModel().addressPrefix(); + } + + public ProvisionedNetworkTypes networkType() { + return this.innerModel().networkType(); + } + + public ProvisionedNetworkInner 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/ProvisionedNetworksClientImpl.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/ProvisionedNetworksClientImpl.java new file mode 100644 index 000000000000..47c896fe5ed4 --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/ProvisionedNetworksClientImpl.java @@ -0,0 +1,428 @@ +// Copyright (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.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.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.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.resourcemanager.avs.fluent.ProvisionedNetworksClient; +import com.azure.resourcemanager.avs.fluent.models.ProvisionedNetworkInner; +import com.azure.resourcemanager.avs.models.ProvisionedNetworkListResult; +import reactor.core.publisher.Mono; + +/** + * An instance of this class provides access to all the operations defined in ProvisionedNetworksClient. + */ +public final class ProvisionedNetworksClientImpl implements ProvisionedNetworksClient { + /** + * The proxy service used to perform REST calls. + */ + private final ProvisionedNetworksService service; + + /** + * The service client containing this operation class. + */ + private final AvsClientImpl client; + + /** + * Initializes an instance of ProvisionedNetworksClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + ProvisionedNetworksClientImpl(AvsClientImpl client) { + this.service = RestProxy.create(ProvisionedNetworksService.class, client.getHttpPipeline(), + client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for AvsClientProvisionedNetworks to be used by the proxy service to + * perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "AvsClientProvisioned") + public interface ProvisionedNetworksService { + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/provisionedNetworks") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> list(@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}/provisionedNetworks/{provisionedNetworkName}") + @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, + @PathParam("provisionedNetworkName") String provisionedNetworkName, @HeaderParam("Accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); + } + + /** + * List ProvisionedNetwork 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 ProvisionedNetwork 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.")); + } + 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.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 ProvisionedNetwork 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 ProvisionedNetwork 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) { + 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 + .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 ProvisionedNetwork 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 ProvisionedNetwork 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), + nextLink -> listNextSinglePageAsync(nextLink)); + } + + /** + * List ProvisionedNetwork 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 ProvisionedNetwork 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), + nextLink -> listNextSinglePageAsync(nextLink, context)); + } + + /** + * List ProvisionedNetwork 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 ProvisionedNetwork list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String resourceGroupName, String privateCloudName) { + return new PagedIterable<>(listAsync(resourceGroupName, privateCloudName)); + } + + /** + * List ProvisionedNetwork 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 ProvisionedNetwork 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)); + } + + /** + * Get a ProvisionedNetwork. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param provisionedNetworkName 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 a ProvisionedNetwork along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync(String resourceGroupName, + String privateCloudName, String provisionedNetworkName) { + 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 (provisionedNetworkName == null) { + return Mono.error( + new IllegalArgumentException("Parameter provisionedNetworkName 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, provisionedNetworkName, accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get a ProvisionedNetwork. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param provisionedNetworkName 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 a ProvisionedNetwork along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync(String resourceGroupName, + String privateCloudName, String provisionedNetworkName, 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 (provisionedNetworkName == null) { + return Mono.error( + new IllegalArgumentException("Parameter provisionedNetworkName 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, provisionedNetworkName, accept, context); + } + + /** + * Get a ProvisionedNetwork. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param provisionedNetworkName 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 a ProvisionedNetwork on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getAsync(String resourceGroupName, String privateCloudName, + String provisionedNetworkName) { + return getWithResponseAsync(resourceGroupName, privateCloudName, provisionedNetworkName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Get a ProvisionedNetwork. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param provisionedNetworkName 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 a ProvisionedNetwork along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse(String resourceGroupName, String privateCloudName, + String provisionedNetworkName, Context context) { + return getWithResponseAsync(resourceGroupName, privateCloudName, provisionedNetworkName, context).block(); + } + + /** + * Get a ProvisionedNetwork. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param provisionedNetworkName 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 a ProvisionedNetwork. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ProvisionedNetworkInner get(String resourceGroupName, String privateCloudName, + String provisionedNetworkName) { + return getWithResponse(resourceGroupName, privateCloudName, provisionedNetworkName, Context.NONE).getValue(); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 ProvisionedNetwork list operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + 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.")); + } + 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)) + .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. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 ProvisionedNetwork list operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + 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.")); + } + 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)); + } +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/ProvisionedNetworksImpl.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/ProvisionedNetworksImpl.java new file mode 100644 index 000000000000..b70c5affda85 --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/ProvisionedNetworksImpl.java @@ -0,0 +1,70 @@ +// Copyright (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.ProvisionedNetworksClient; +import com.azure.resourcemanager.avs.fluent.models.ProvisionedNetworkInner; +import com.azure.resourcemanager.avs.models.ProvisionedNetwork; +import com.azure.resourcemanager.avs.models.ProvisionedNetworks; + +public final class ProvisionedNetworksImpl implements ProvisionedNetworks { + private static final ClientLogger LOGGER = new ClientLogger(ProvisionedNetworksImpl.class); + + private final ProvisionedNetworksClient innerClient; + + private final com.azure.resourcemanager.avs.AvsManager serviceManager; + + public ProvisionedNetworksImpl(ProvisionedNetworksClient 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 ResourceManagerUtils.mapPage(inner, inner1 -> new ProvisionedNetworkImpl(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 ProvisionedNetworkImpl(inner1, this.manager())); + } + + public Response getWithResponse(String resourceGroupName, String privateCloudName, + String provisionedNetworkName, Context context) { + Response inner = this.serviceClient() + .getWithResponse(resourceGroupName, privateCloudName, provisionedNetworkName, context); + if (inner != null) { + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new ProvisionedNetworkImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public ProvisionedNetwork get(String resourceGroupName, String privateCloudName, String provisionedNetworkName) { + ProvisionedNetworkInner inner + = this.serviceClient().get(resourceGroupName, privateCloudName, provisionedNetworkName); + if (inner != null) { + return new ProvisionedNetworkImpl(inner, this.manager()); + } else { + return null; + } + } + + private ProvisionedNetworksClient 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/PureStoragePoliciesClientImpl.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/PureStoragePoliciesClientImpl.java new file mode 100644 index 000000000000..658460dc5c9e --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/PureStoragePoliciesClientImpl.java @@ -0,0 +1,948 @@ +// Copyright (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.PureStoragePoliciesClient; +import com.azure.resourcemanager.avs.fluent.models.PureStoragePolicyInner; +import com.azure.resourcemanager.avs.models.PureStoragePolicyListResult; +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 PureStoragePoliciesClient. + */ +public final class PureStoragePoliciesClientImpl implements PureStoragePoliciesClient { + /** + * The proxy service used to perform REST calls. + */ + private final PureStoragePoliciesService service; + + /** + * The service client containing this operation class. + */ + private final AvsClientImpl client; + + /** + * Initializes an instance of PureStoragePoliciesClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + PureStoragePoliciesClientImpl(AvsClientImpl client) { + this.service = RestProxy.create(PureStoragePoliciesService.class, client.getHttpPipeline(), + client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for AvsClientPureStoragePolicies to be used by the proxy service to + * perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "AvsClientPureStorage") + public interface PureStoragePoliciesService { + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/pureStoragePolicies") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> list(@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}/pureStoragePolicies/{storagePolicyName}") + @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, + @PathParam("storagePolicyName") String storagePolicyName, @HeaderParam("Accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/pureStoragePolicies/{storagePolicyName}") + @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, + @PathParam("storagePolicyName") String storagePolicyName, + @BodyParam("application/json") PureStoragePolicyInner resource, @HeaderParam("Accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/pureStoragePolicies/{storagePolicyName}") + @ExpectedResponses({ 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, + @PathParam("storagePolicyName") String storagePolicyName, @HeaderParam("Accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); + } + + /** + * List PureStoragePolicy 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 PureStoragePolicy 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.")); + } + 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.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 PureStoragePolicy 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 PureStoragePolicy 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) { + 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 + .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 PureStoragePolicy 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 PureStoragePolicy 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), + nextLink -> listNextSinglePageAsync(nextLink)); + } + + /** + * List PureStoragePolicy 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 PureStoragePolicy 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), + nextLink -> listNextSinglePageAsync(nextLink, context)); + } + + /** + * List PureStoragePolicy 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 PureStoragePolicy list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String resourceGroupName, String privateCloudName) { + return new PagedIterable<>(listAsync(resourceGroupName, privateCloudName)); + } + + /** + * List PureStoragePolicy 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 PureStoragePolicy 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)); + } + + /** + * Get a PureStoragePolicy. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param storagePolicyName Name of the storage 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 PureStoragePolicy along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync(String resourceGroupName, + String privateCloudName, String storagePolicyName) { + 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 (storagePolicyName == null) { + return Mono + .error(new IllegalArgumentException("Parameter storagePolicyName 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, storagePolicyName, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get a PureStoragePolicy. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param storagePolicyName Name of the storage 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 PureStoragePolicy along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync(String resourceGroupName, + String privateCloudName, String storagePolicyName, 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 (storagePolicyName == null) { + return Mono + .error(new IllegalArgumentException("Parameter storagePolicyName 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, storagePolicyName, accept, context); + } + + /** + * Get a PureStoragePolicy. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param storagePolicyName Name of the storage 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 PureStoragePolicy on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getAsync(String resourceGroupName, String privateCloudName, + String storagePolicyName) { + return getWithResponseAsync(resourceGroupName, privateCloudName, storagePolicyName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Get a PureStoragePolicy. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param storagePolicyName Name of the storage 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 PureStoragePolicy along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse(String resourceGroupName, String privateCloudName, + String storagePolicyName, Context context) { + return getWithResponseAsync(resourceGroupName, privateCloudName, storagePolicyName, context).block(); + } + + /** + * Get a PureStoragePolicy. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param storagePolicyName Name of the storage 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 PureStoragePolicy. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public PureStoragePolicyInner get(String resourceGroupName, String privateCloudName, String storagePolicyName) { + return getWithResponse(resourceGroupName, privateCloudName, storagePolicyName, Context.NONE).getValue(); + } + + /** + * Create a PureStoragePolicy. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param storagePolicyName Name of the storage policy. + * @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 instance describing a Pure Storage Policy Based Management policy along with {@link Response} on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String privateCloudName, String storagePolicyName, PureStoragePolicyInner 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 (storagePolicyName == null) { + return Mono + .error(new IllegalArgumentException("Parameter storagePolicyName 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, storagePolicyName, resource, + accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Create a PureStoragePolicy. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param storagePolicyName Name of the storage policy. + * @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 instance describing a Pure Storage Policy Based Management policy along with {@link Response} on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String privateCloudName, String storagePolicyName, PureStoragePolicyInner 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 (storagePolicyName == null) { + return Mono + .error(new IllegalArgumentException("Parameter storagePolicyName 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, storagePolicyName, resource, accept, + context); + } + + /** + * Create a PureStoragePolicy. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param storagePolicyName Name of the storage policy. + * @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 instance describing a Pure Storage Policy Based Management + * policy. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, PureStoragePolicyInner> beginCreateOrUpdateAsync( + String resourceGroupName, String privateCloudName, String storagePolicyName, PureStoragePolicyInner resource) { + Mono>> mono + = createOrUpdateWithResponseAsync(resourceGroupName, privateCloudName, storagePolicyName, resource); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), PureStoragePolicyInner.class, PureStoragePolicyInner.class, + this.client.getContext()); + } + + /** + * Create a PureStoragePolicy. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param storagePolicyName Name of the storage policy. + * @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 instance describing a Pure Storage Policy Based Management + * policy. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, PureStoragePolicyInner> beginCreateOrUpdateAsync( + String resourceGroupName, String privateCloudName, String storagePolicyName, PureStoragePolicyInner resource, + Context context) { + context = this.client.mergeContext(context); + Mono>> mono = createOrUpdateWithResponseAsync(resourceGroupName, privateCloudName, + storagePolicyName, resource, context); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), PureStoragePolicyInner.class, PureStoragePolicyInner.class, context); + } + + /** + * Create a PureStoragePolicy. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param storagePolicyName Name of the storage policy. + * @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 instance describing a Pure Storage Policy Based Management + * policy. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, PureStoragePolicyInner> beginCreateOrUpdate( + String resourceGroupName, String privateCloudName, String storagePolicyName, PureStoragePolicyInner resource) { + return this.beginCreateOrUpdateAsync(resourceGroupName, privateCloudName, storagePolicyName, resource) + .getSyncPoller(); + } + + /** + * Create a PureStoragePolicy. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param storagePolicyName Name of the storage policy. + * @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 instance describing a Pure Storage Policy Based Management + * policy. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, PureStoragePolicyInner> beginCreateOrUpdate( + String resourceGroupName, String privateCloudName, String storagePolicyName, PureStoragePolicyInner resource, + Context context) { + return this.beginCreateOrUpdateAsync(resourceGroupName, privateCloudName, storagePolicyName, resource, context) + .getSyncPoller(); + } + + /** + * Create a PureStoragePolicy. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param storagePolicyName Name of the storage policy. + * @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 instance describing a Pure Storage Policy Based Management policy on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync(String resourceGroupName, String privateCloudName, + String storagePolicyName, PureStoragePolicyInner resource) { + return beginCreateOrUpdateAsync(resourceGroupName, privateCloudName, storagePolicyName, resource).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Create a PureStoragePolicy. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param storagePolicyName Name of the storage policy. + * @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 instance describing a Pure Storage Policy Based Management policy on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync(String resourceGroupName, String privateCloudName, + String storagePolicyName, PureStoragePolicyInner resource, Context context) { + return beginCreateOrUpdateAsync(resourceGroupName, privateCloudName, storagePolicyName, resource, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Create a PureStoragePolicy. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param storagePolicyName Name of the storage policy. + * @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 instance describing a Pure Storage Policy Based Management policy. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public PureStoragePolicyInner createOrUpdate(String resourceGroupName, String privateCloudName, + String storagePolicyName, PureStoragePolicyInner resource) { + return createOrUpdateAsync(resourceGroupName, privateCloudName, storagePolicyName, resource).block(); + } + + /** + * Create a PureStoragePolicy. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param storagePolicyName Name of the storage policy. + * @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 instance describing a Pure Storage Policy Based Management policy. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public PureStoragePolicyInner createOrUpdate(String resourceGroupName, String privateCloudName, + String storagePolicyName, PureStoragePolicyInner resource, Context context) { + return createOrUpdateAsync(resourceGroupName, privateCloudName, storagePolicyName, resource, context).block(); + } + + /** + * Delete a PureStoragePolicy. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param storagePolicyName Name of the storage 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 storagePolicyName) { + 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 (storagePolicyName == null) { + return Mono + .error(new IllegalArgumentException("Parameter storagePolicyName 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, storagePolicyName, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Delete a PureStoragePolicy. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param storagePolicyName Name of the storage 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 the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> deleteWithResponseAsync(String resourceGroupName, String privateCloudName, + String storagePolicyName, 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 (storagePolicyName == null) { + return Mono + .error(new IllegalArgumentException("Parameter storagePolicyName 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, storagePolicyName, accept, context); + } + + /** + * Delete a PureStoragePolicy. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param storagePolicyName Name of the storage 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 storagePolicyName) { + Mono>> mono + = deleteWithResponseAsync(resourceGroupName, privateCloudName, storagePolicyName); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); + } + + /** + * Delete a PureStoragePolicy. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param storagePolicyName Name of the storage 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 the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String privateCloudName, + String storagePolicyName, Context context) { + context = this.client.mergeContext(context); + Mono>> mono + = deleteWithResponseAsync(resourceGroupName, privateCloudName, storagePolicyName, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + context); + } + + /** + * Delete a PureStoragePolicy. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param storagePolicyName Name of the storage 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 storagePolicyName) { + return this.beginDeleteAsync(resourceGroupName, privateCloudName, storagePolicyName).getSyncPoller(); + } + + /** + * Delete a PureStoragePolicy. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param storagePolicyName Name of the storage 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 the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDelete(String resourceGroupName, String privateCloudName, + String storagePolicyName, Context context) { + return this.beginDeleteAsync(resourceGroupName, privateCloudName, storagePolicyName, context).getSyncPoller(); + } + + /** + * Delete a PureStoragePolicy. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param storagePolicyName Name of the storage 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 storagePolicyName) { + return beginDeleteAsync(resourceGroupName, privateCloudName, storagePolicyName).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Delete a PureStoragePolicy. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param storagePolicyName Name of the storage 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 {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteAsync(String resourceGroupName, String privateCloudName, String storagePolicyName, + Context context) { + return beginDeleteAsync(resourceGroupName, privateCloudName, storagePolicyName, context).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Delete a PureStoragePolicy. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param storagePolicyName Name of the storage 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 storagePolicyName) { + deleteAsync(resourceGroupName, privateCloudName, storagePolicyName).block(); + } + + /** + * Delete a PureStoragePolicy. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param storagePolicyName Name of the storage 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 storagePolicyName, Context context) { + deleteAsync(resourceGroupName, privateCloudName, storagePolicyName, context).block(); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 PureStoragePolicy list operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + 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.")); + } + 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)) + .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. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 PureStoragePolicy list operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + 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.")); + } + 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)); + } +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/PureStoragePoliciesImpl.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/PureStoragePoliciesImpl.java new file mode 100644 index 000000000000..481be3f16c45 --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/PureStoragePoliciesImpl.java @@ -0,0 +1,157 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.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.PureStoragePoliciesClient; +import com.azure.resourcemanager.avs.fluent.models.PureStoragePolicyInner; +import com.azure.resourcemanager.avs.models.PureStoragePolicies; +import com.azure.resourcemanager.avs.models.PureStoragePolicy; + +public final class PureStoragePoliciesImpl implements PureStoragePolicies { + private static final ClientLogger LOGGER = new ClientLogger(PureStoragePoliciesImpl.class); + + private final PureStoragePoliciesClient innerClient; + + private final com.azure.resourcemanager.avs.AvsManager serviceManager; + + public PureStoragePoliciesImpl(PureStoragePoliciesClient 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 ResourceManagerUtils.mapPage(inner, inner1 -> new PureStoragePolicyImpl(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 PureStoragePolicyImpl(inner1, this.manager())); + } + + public Response getWithResponse(String resourceGroupName, String privateCloudName, + String storagePolicyName, Context context) { + Response inner + = this.serviceClient().getWithResponse(resourceGroupName, privateCloudName, storagePolicyName, context); + if (inner != null) { + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new PureStoragePolicyImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public PureStoragePolicy get(String resourceGroupName, String privateCloudName, String storagePolicyName) { + PureStoragePolicyInner inner = this.serviceClient().get(resourceGroupName, privateCloudName, storagePolicyName); + if (inner != null) { + return new PureStoragePolicyImpl(inner, this.manager()); + } else { + return null; + } + } + + public void delete(String resourceGroupName, String privateCloudName, String storagePolicyName) { + this.serviceClient().delete(resourceGroupName, privateCloudName, storagePolicyName); + } + + public void delete(String resourceGroupName, String privateCloudName, String storagePolicyName, Context context) { + this.serviceClient().delete(resourceGroupName, privateCloudName, storagePolicyName, context); + } + + public PureStoragePolicy getById(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))); + } + 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 storagePolicyName = ResourceManagerUtils.getValueFromIdByName(id, "pureStoragePolicies"); + if (storagePolicyName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'pureStoragePolicies'.", id))); + } + return this.getWithResponse(resourceGroupName, privateCloudName, storagePolicyName, Context.NONE).getValue(); + } + + public Response getByIdWithResponse(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))); + } + String storagePolicyName = ResourceManagerUtils.getValueFromIdByName(id, "pureStoragePolicies"); + if (storagePolicyName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'pureStoragePolicies'.", id))); + } + return this.getWithResponse(resourceGroupName, privateCloudName, storagePolicyName, context); + } + + public void deleteById(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))); + } + 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 storagePolicyName = ResourceManagerUtils.getValueFromIdByName(id, "pureStoragePolicies"); + if (storagePolicyName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'pureStoragePolicies'.", id))); + } + this.delete(resourceGroupName, privateCloudName, storagePolicyName, Context.NONE); + } + + public void deleteByIdWithResponse(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))); + } + String storagePolicyName = ResourceManagerUtils.getValueFromIdByName(id, "pureStoragePolicies"); + if (storagePolicyName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'pureStoragePolicies'.", id))); + } + this.delete(resourceGroupName, privateCloudName, storagePolicyName, context); + } + + private PureStoragePoliciesClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.avs.AvsManager manager() { + return this.serviceManager; + } + + public PureStoragePolicyImpl define(String name) { + return new PureStoragePolicyImpl(name, this.manager()); + } +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/PureStoragePolicyImpl.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/PureStoragePolicyImpl.java new file mode 100644 index 000000000000..32d17a8214ad --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/PureStoragePolicyImpl.java @@ -0,0 +1,142 @@ +// Copyright (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.core.util.Context; +import com.azure.resourcemanager.avs.fluent.models.PureStoragePolicyInner; +import com.azure.resourcemanager.avs.models.PureStoragePolicy; +import com.azure.resourcemanager.avs.models.PureStoragePolicyProvisioningState; + +public final class PureStoragePolicyImpl + implements PureStoragePolicy, PureStoragePolicy.Definition, PureStoragePolicy.Update { + private PureStoragePolicyInner innerObject; + + private final com.azure.resourcemanager.avs.AvsManager 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 String storagePolicyDefinition() { + return this.innerModel().storagePolicyDefinition(); + } + + public String storagePoolId() { + return this.innerModel().storagePoolId(); + } + + public PureStoragePolicyProvisioningState provisioningState() { + return this.innerModel().provisioningState(); + } + + public String resourceGroupName() { + return resourceGroupName; + } + + public PureStoragePolicyInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.avs.AvsManager manager() { + return this.serviceManager; + } + + private String resourceGroupName; + + private String privateCloudName; + + private String storagePolicyName; + + public PureStoragePolicyImpl withExistingPrivateCloud(String resourceGroupName, String privateCloudName) { + this.resourceGroupName = resourceGroupName; + this.privateCloudName = privateCloudName; + return this; + } + + public PureStoragePolicy create() { + this.innerObject = serviceManager.serviceClient() + .getPureStoragePolicies() + .createOrUpdate(resourceGroupName, privateCloudName, storagePolicyName, this.innerModel(), Context.NONE); + return this; + } + + public PureStoragePolicy create(Context context) { + this.innerObject = serviceManager.serviceClient() + .getPureStoragePolicies() + .createOrUpdate(resourceGroupName, privateCloudName, storagePolicyName, this.innerModel(), context); + return this; + } + + PureStoragePolicyImpl(String name, com.azure.resourcemanager.avs.AvsManager serviceManager) { + this.innerObject = new PureStoragePolicyInner(); + this.serviceManager = serviceManager; + this.storagePolicyName = name; + } + + public PureStoragePolicyImpl update() { + return this; + } + + public PureStoragePolicy apply() { + this.innerObject = serviceManager.serviceClient() + .getPureStoragePolicies() + .createOrUpdate(resourceGroupName, privateCloudName, storagePolicyName, this.innerModel(), Context.NONE); + return this; + } + + public PureStoragePolicy apply(Context context) { + this.innerObject = serviceManager.serviceClient() + .getPureStoragePolicies() + .createOrUpdate(resourceGroupName, privateCloudName, storagePolicyName, this.innerModel(), context); + return this; + } + + PureStoragePolicyImpl(PureStoragePolicyInner innerObject, com.azure.resourcemanager.avs.AvsManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); + this.privateCloudName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "privateClouds"); + this.storagePolicyName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "pureStoragePolicies"); + } + + public PureStoragePolicy refresh() { + this.innerObject = serviceManager.serviceClient() + .getPureStoragePolicies() + .getWithResponse(resourceGroupName, privateCloudName, storagePolicyName, Context.NONE) + .getValue(); + return this; + } + + public PureStoragePolicy refresh(Context context) { + this.innerObject = serviceManager.serviceClient() + .getPureStoragePolicies() + .getWithResponse(resourceGroupName, privateCloudName, storagePolicyName, context) + .getValue(); + return this; + } + + public PureStoragePolicyImpl withStoragePolicyDefinition(String storagePolicyDefinition) { + this.innerModel().withStoragePolicyDefinition(storagePolicyDefinition); + return this; + } + + public PureStoragePolicyImpl withStoragePoolId(String storagePoolId) { + this.innerModel().withStoragePoolId(storagePoolId); + return this; + } +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/ResourceSkuImpl.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/ResourceSkuImpl.java new file mode 100644 index 000000000000..26317ecebe39 --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/ResourceSkuImpl.java @@ -0,0 +1,89 @@ +// Copyright (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.resourcemanager.avs.fluent.models.ResourceSkuInner; +import com.azure.resourcemanager.avs.models.ResourceSku; +import com.azure.resourcemanager.avs.models.ResourceSkuCapabilities; +import com.azure.resourcemanager.avs.models.ResourceSkuLocationInfo; +import com.azure.resourcemanager.avs.models.ResourceSkuResourceType; +import com.azure.resourcemanager.avs.models.ResourceSkuRestrictions; +import java.util.Collections; +import java.util.List; + +public final class ResourceSkuImpl implements ResourceSku { + private ResourceSkuInner innerObject; + + private final com.azure.resourcemanager.avs.AvsManager serviceManager; + + ResourceSkuImpl(ResourceSkuInner innerObject, com.azure.resourcemanager.avs.AvsManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + } + + public ResourceSkuResourceType resourceType() { + return this.innerModel().resourceType(); + } + + public String name() { + return this.innerModel().name(); + } + + public String tier() { + return this.innerModel().tier(); + } + + public String size() { + return this.innerModel().size(); + } + + public String family() { + return this.innerModel().family(); + } + + public List locations() { + List inner = this.innerModel().locations(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + public List locationInfo() { + List inner = this.innerModel().locationInfo(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + public List capabilities() { + List inner = this.innerModel().capabilities(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + public List restrictions() { + List inner = this.innerModel().restrictions(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + public ResourceSkuInner 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/SkusClientImpl.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/SkusClientImpl.java new file mode 100644 index 000000000000..334b05c70d6a --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/SkusClientImpl.java @@ -0,0 +1,240 @@ +// Copyright (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.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.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.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.resourcemanager.avs.fluent.SkusClient; +import com.azure.resourcemanager.avs.fluent.models.ResourceSkuInner; +import com.azure.resourcemanager.avs.models.PagedResourceSku; +import reactor.core.publisher.Mono; + +/** + * An instance of this class provides access to all the operations defined in SkusClient. + */ +public final class SkusClientImpl implements SkusClient { + /** + * The proxy service used to perform REST calls. + */ + private final SkusService service; + + /** + * The service client containing this operation class. + */ + private final AvsClientImpl client; + + /** + * Initializes an instance of SkusClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + SkusClientImpl(AvsClientImpl client) { + this.service = RestProxy.create(SkusService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for AvsClientSkus to be used by the proxy service to perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "AvsClientSkus") + public interface SkusService { + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.AVS/skus") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + 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("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listNext(@PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); + } + + /** + * A list of SKUs. + * + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return paged collection of ResourceSku items along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync() { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.list(this.client.getEndpoint(), this.client.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())); + } + + /** + * A list of SKUs. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return paged collection of ResourceSku items along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync(Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .list(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), accept, + context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } + + /** + * A list of SKUs. + * + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return paged collection of ResourceSku items as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync() { + return new PagedFlux<>(() -> listSinglePageAsync(), nextLink -> listNextSinglePageAsync(nextLink)); + } + + /** + * A list of SKUs. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return paged collection of ResourceSku items as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(Context context) { + return new PagedFlux<>(() -> listSinglePageAsync(context), + nextLink -> listNextSinglePageAsync(nextLink, context)); + } + + /** + * A list of SKUs. + * + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return paged collection of ResourceSku items as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list() { + return new PagedIterable<>(listAsync()); + } + + /** + * A list of SKUs. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return paged collection of ResourceSku items as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(Context context) { + return new PagedIterable<>(listAsync(context)); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return paged collection of ResourceSku items along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + 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.")); + } + 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)) + .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. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return paged collection of ResourceSku items along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + 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.")); + } + 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)); + } +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/SkusImpl.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/SkusImpl.java new file mode 100644 index 000000000000..1eb2591c2f78 --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/SkusImpl.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.implementation; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.util.Context; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.avs.fluent.SkusClient; +import com.azure.resourcemanager.avs.fluent.models.ResourceSkuInner; +import com.azure.resourcemanager.avs.models.ResourceSku; +import com.azure.resourcemanager.avs.models.Skus; + +public final class SkusImpl implements Skus { + private static final ClientLogger LOGGER = new ClientLogger(SkusImpl.class); + + private final SkusClient innerClient; + + private final com.azure.resourcemanager.avs.AvsManager serviceManager; + + public SkusImpl(SkusClient innerClient, com.azure.resourcemanager.avs.AvsManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public PagedIterable list() { + PagedIterable inner = this.serviceClient().list(); + return ResourceManagerUtils.mapPage(inner, inner1 -> new ResourceSkuImpl(inner1, this.manager())); + } + + public PagedIterable list(Context context) { + PagedIterable inner = this.serviceClient().list(context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new ResourceSkuImpl(inner1, this.manager())); + } + + private SkusClient 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/VirtualMachinesClientImpl.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/VirtualMachinesClientImpl.java index 0ab9572552ee..35c4294958f7 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 @@ -426,7 +426,7 @@ public VirtualMachineInner get(String resourceGroupName, String privateCloudName * @param privateCloudName Name of the private cloud. * @param clusterName Name of the cluster. * @param virtualMachineId ID of the virtual machine. - * @param restrictMovement The body type of the operation request. + * @param restrictMovement The content of the action 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. @@ -480,7 +480,7 @@ private Mono>> restrictMovementWithResponseAsync(Strin * @param privateCloudName Name of the private cloud. * @param clusterName Name of the cluster. * @param virtualMachineId ID of the virtual machine. - * @param restrictMovement The body type of the operation request. + * @param restrictMovement The content of the action 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. @@ -534,7 +534,7 @@ private Mono>> restrictMovementWithResponseAsync(Strin * @param privateCloudName Name of the private cloud. * @param clusterName Name of the cluster. * @param virtualMachineId ID of the virtual machine. - * @param restrictMovement The body type of the operation request. + * @param restrictMovement The content of the action 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. @@ -557,7 +557,7 @@ private PollerFlux, Void> beginRestrictMovementAsync(String res * @param privateCloudName Name of the private cloud. * @param clusterName Name of the cluster. * @param virtualMachineId ID of the virtual machine. - * @param restrictMovement The body type of the operation request. + * @param restrictMovement The content of the action 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. @@ -582,7 +582,7 @@ private PollerFlux, Void> beginRestrictMovementAsync(String res * @param privateCloudName Name of the private cloud. * @param clusterName Name of the cluster. * @param virtualMachineId ID of the virtual machine. - * @param restrictMovement The body type of the operation request. + * @param restrictMovement The content of the action 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. @@ -604,7 +604,7 @@ public SyncPoller, Void> beginRestrictMovement(String resourceG * @param privateCloudName Name of the private cloud. * @param clusterName Name of the cluster. * @param virtualMachineId ID of the virtual machine. - * @param restrictMovement The body type of the operation request. + * @param restrictMovement The content of the action 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. @@ -627,7 +627,7 @@ public SyncPoller, Void> beginRestrictMovement(String resourceG * @param privateCloudName Name of the private cloud. * @param clusterName Name of the cluster. * @param virtualMachineId ID of the virtual machine. - * @param restrictMovement The body type of the operation request. + * @param restrictMovement The content of the action 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. @@ -647,7 +647,7 @@ private Mono restrictMovementAsync(String resourceGroupName, String privat * @param privateCloudName Name of the private cloud. * @param clusterName Name of the cluster. * @param virtualMachineId ID of the virtual machine. - * @param restrictMovement The body type of the operation request. + * @param restrictMovement The content of the action 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. @@ -668,7 +668,7 @@ private Mono restrictMovementAsync(String resourceGroupName, String privat * @param privateCloudName Name of the private cloud. * @param clusterName Name of the cluster. * @param virtualMachineId ID of the virtual machine. - * @param restrictMovement The body type of the operation request. + * @param restrictMovement The content of the action 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. @@ -687,7 +687,7 @@ public void restrictMovement(String resourceGroupName, String privateCloudName, * @param privateCloudName Name of the private cloud. * @param clusterName Name of the cluster. * @param virtualMachineId ID of the virtual machine. - * @param restrictMovement The body type of the operation request. + * @param restrictMovement The content of the action 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. 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 81accb80eb4f..c8f33b63a2b9 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 @@ -41,8 +41,8 @@ import com.azure.resourcemanager.avs.fluent.models.WorkloadNetworkPortMirroringInner; import com.azure.resourcemanager.avs.fluent.models.WorkloadNetworkPublicIpInner; import com.azure.resourcemanager.avs.fluent.models.WorkloadNetworkSegmentInner; -import com.azure.resourcemanager.avs.fluent.models.WorkloadNetworkVirtualMachineInner; 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; @@ -51,8 +51,8 @@ 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.WorkloadNetworkVirtualMachinesList; import com.azure.resourcemanager.avs.models.WorkloadNetworkVMGroupsList; +import com.azure.resourcemanager.avs.models.WorkloadNetworkVirtualMachinesList; import java.nio.ByteBuffer; import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; 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 1a23eb382cd5..77ee7ac49c56 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 @@ -18,8 +18,8 @@ import com.azure.resourcemanager.avs.fluent.models.WorkloadNetworkPortMirroringInner; import com.azure.resourcemanager.avs.fluent.models.WorkloadNetworkPublicIpInner; import com.azure.resourcemanager.avs.fluent.models.WorkloadNetworkSegmentInner; -import com.azure.resourcemanager.avs.fluent.models.WorkloadNetworkVirtualMachineInner; import com.azure.resourcemanager.avs.fluent.models.WorkloadNetworkVMGroupInner; +import com.azure.resourcemanager.avs.fluent.models.WorkloadNetworkVirtualMachineInner; import com.azure.resourcemanager.avs.models.WorkloadNetwork; import com.azure.resourcemanager.avs.models.WorkloadNetworkDhcp; import com.azure.resourcemanager.avs.models.WorkloadNetworkDnsService; @@ -27,10 +27,10 @@ import com.azure.resourcemanager.avs.models.WorkloadNetworkGateway; import com.azure.resourcemanager.avs.models.WorkloadNetworkPortMirroring; import com.azure.resourcemanager.avs.models.WorkloadNetworkPublicIp; -import com.azure.resourcemanager.avs.models.WorkloadNetworks; import com.azure.resourcemanager.avs.models.WorkloadNetworkSegment; -import com.azure.resourcemanager.avs.models.WorkloadNetworkVirtualMachine; import com.azure.resourcemanager.avs.models.WorkloadNetworkVMGroup; +import com.azure.resourcemanager.avs.models.WorkloadNetworkVirtualMachine; +import com.azure.resourcemanager.avs.models.WorkloadNetworks; public final class WorkloadNetworksImpl implements WorkloadNetworks { private static final ClientLogger LOGGER = new ClientLogger(WorkloadNetworksImpl.class); 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 48f86ecfd961..98b5ac5ea25f 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 @@ -25,11 +25,6 @@ public final class AddonArcProperties extends AddonProperties { */ private String vCenter; - /* - * The state of the addon provisioning - */ - private AddonProvisioningState provisioningState; - /** * Creates an instance of AddonArcProperties class. */ @@ -66,16 +61,6 @@ public AddonArcProperties withVCenter(String vCenter) { return this; } - /** - * Get the provisioningState property: The state of the addon provisioning. - * - * @return the provisioningState value. - */ - @Override - public AddonProvisioningState provisioningState() { - return this.provisioningState; - } - /** * Validates the instance. * @@ -112,8 +97,8 @@ public static AddonArcProperties fromJson(JsonReader jsonReader) throws IOExcept reader.nextToken(); if ("provisioningState".equals(fieldName)) { - deserializedAddonArcProperties.provisioningState - = AddonProvisioningState.fromString(reader.getString()); + deserializedAddonArcProperties + .withProvisioningState(AddonProvisioningState.fromString(reader.getString())); } else if ("addonType".equals(fieldName)) { deserializedAddonArcProperties.addonType = AddonType.fromString(reader.getString()); } else if ("vCenter".equals(fieldName)) { 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 bae6a536c8e6..16be49876d57 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 @@ -27,9 +27,14 @@ public final class AddonHcxProperties extends AddonProperties { private String offer; /* - * The state of the addon provisioning + * HCX management network. */ - private AddonProvisioningState provisioningState; + private String managementNetwork; + + /* + * HCX uplink network + */ + private String uplinkNetwork; /** * Creates an instance of AddonHcxProperties class. @@ -68,13 +73,43 @@ public AddonHcxProperties withOffer(String offer) { } /** - * Get the provisioningState property: The state of the addon provisioning. + * Get the managementNetwork property: HCX management network. * - * @return the provisioningState value. + * @return the managementNetwork value. */ - @Override - public AddonProvisioningState provisioningState() { - return this.provisioningState; + public String managementNetwork() { + return this.managementNetwork; + } + + /** + * Set the managementNetwork property: HCX management network. + * + * @param managementNetwork the managementNetwork value to set. + * @return the AddonHcxProperties object itself. + */ + public AddonHcxProperties withManagementNetwork(String managementNetwork) { + this.managementNetwork = managementNetwork; + return this; + } + + /** + * Get the uplinkNetwork property: HCX uplink network. + * + * @return the uplinkNetwork value. + */ + public String uplinkNetwork() { + return this.uplinkNetwork; + } + + /** + * Set the uplinkNetwork property: HCX uplink network. + * + * @param uplinkNetwork the uplinkNetwork value to set. + * @return the AddonHcxProperties object itself. + */ + public AddonHcxProperties withUplinkNetwork(String uplinkNetwork) { + this.uplinkNetwork = uplinkNetwork; + return this; } /** @@ -100,6 +135,8 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); jsonWriter.writeStringField("offer", this.offer); jsonWriter.writeStringField("addonType", this.addonType == null ? null : this.addonType.toString()); + jsonWriter.writeStringField("managementNetwork", this.managementNetwork); + jsonWriter.writeStringField("uplinkNetwork", this.uplinkNetwork); return jsonWriter.writeEndObject(); } @@ -120,12 +157,16 @@ public static AddonHcxProperties fromJson(JsonReader jsonReader) throws IOExcept reader.nextToken(); if ("provisioningState".equals(fieldName)) { - deserializedAddonHcxProperties.provisioningState - = AddonProvisioningState.fromString(reader.getString()); + deserializedAddonHcxProperties + .withProvisioningState(AddonProvisioningState.fromString(reader.getString())); } else if ("offer".equals(fieldName)) { deserializedAddonHcxProperties.offer = reader.getString(); } else if ("addonType".equals(fieldName)) { deserializedAddonHcxProperties.addonType = AddonType.fromString(reader.getString()); + } else if ("managementNetwork".equals(fieldName)) { + deserializedAddonHcxProperties.managementNetwork = reader.getString(); + } else if ("uplinkNetwork".equals(fieldName)) { + deserializedAddonHcxProperties.uplinkNetwork = reader.getString(); } else { reader.skipChildren(); } 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 0fac82ebd100..7d6746bc8f2f 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 @@ -25,11 +25,6 @@ public final class AddonSrmProperties extends AddonProperties { */ private String licenseKey; - /* - * The state of the addon provisioning - */ - private AddonProvisioningState provisioningState; - /** * Creates an instance of AddonSrmProperties class. */ @@ -66,16 +61,6 @@ public AddonSrmProperties withLicenseKey(String licenseKey) { return this; } - /** - * Get the provisioningState property: The state of the addon provisioning. - * - * @return the provisioningState value. - */ - @Override - public AddonProvisioningState provisioningState() { - return this.provisioningState; - } - /** * Validates the instance. * @@ -112,8 +97,8 @@ public static AddonSrmProperties fromJson(JsonReader jsonReader) throws IOExcept reader.nextToken(); if ("provisioningState".equals(fieldName)) { - deserializedAddonSrmProperties.provisioningState - = AddonProvisioningState.fromString(reader.getString()); + deserializedAddonSrmProperties + .withProvisioningState(AddonProvisioningState.fromString(reader.getString())); } else if ("addonType".equals(fieldName)) { deserializedAddonSrmProperties.addonType = AddonType.fromString(reader.getString()); } else if ("licenseKey".equals(fieldName)) { 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 5d23f53f7ff4..ac21b809fa61 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 @@ -25,11 +25,6 @@ public final class AddonVrProperties extends AddonProperties { */ private int vrsCount; - /* - * The state of the addon provisioning - */ - private AddonProvisioningState provisioningState; - /** * Creates an instance of AddonVrProperties class. */ @@ -66,16 +61,6 @@ public AddonVrProperties withVrsCount(int vrsCount) { return this; } - /** - * Get the provisioningState property: The state of the addon provisioning. - * - * @return the provisioningState value. - */ - @Override - public AddonProvisioningState provisioningState() { - return this.provisioningState; - } - /** * Validates the instance. * @@ -113,8 +98,8 @@ public static AddonVrProperties fromJson(JsonReader jsonReader) throws IOExcepti reader.nextToken(); if ("provisioningState".equals(fieldName)) { - deserializedAddonVrProperties.provisioningState - = AddonProvisioningState.fromString(reader.getString()); + deserializedAddonVrProperties + .withProvisioningState(AddonProvisioningState.fromString(reader.getString())); } else if ("vrsCount".equals(fieldName)) { deserializedAddonVrProperties.vrsCount = reader.getInt(); } else if ("addonType".equals(fieldName)) { 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 b98856d88579..b374e2066a8a 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 @@ -68,6 +68,13 @@ public interface Datastore { */ ElasticSanVolume elasticSanVolume(); + /** + * Gets the pureStorageVolume property: A Pure Storage volume. + * + * @return the pureStorageVolume value. + */ + PureStorageVolume pureStorageVolume(); + /** * Gets the status property: The operational status of the datastore. * @@ -126,7 +133,7 @@ interface WithParentResource { * be created, but also allows for any other optional properties to be specified. */ interface WithCreate extends DefinitionStages.WithNetAppVolume, DefinitionStages.WithDiskPoolVolume, - DefinitionStages.WithElasticSanVolume { + DefinitionStages.WithElasticSanVolume, DefinitionStages.WithPureStorageVolume { /** * Executes the create request. * @@ -181,6 +188,19 @@ interface WithElasticSanVolume { */ WithCreate withElasticSanVolume(ElasticSanVolume elasticSanVolume); } + + /** + * The stage of the Datastore definition allowing to specify pureStorageVolume. + */ + interface WithPureStorageVolume { + /** + * Specifies the pureStorageVolume property: A Pure Storage volume. + * + * @param pureStorageVolume A Pure Storage volume. + * @return the next definition stage. + */ + WithCreate withPureStorageVolume(PureStorageVolume pureStorageVolume); + } } /** @@ -193,8 +213,8 @@ interface WithElasticSanVolume { /** * The template for Datastore update. */ - interface Update - extends UpdateStages.WithNetAppVolume, UpdateStages.WithDiskPoolVolume, UpdateStages.WithElasticSanVolume { + interface Update extends UpdateStages.WithNetAppVolume, UpdateStages.WithDiskPoolVolume, + UpdateStages.WithElasticSanVolume, UpdateStages.WithPureStorageVolume { /** * Executes the update request. * @@ -253,6 +273,19 @@ interface WithElasticSanVolume { */ Update withElasticSanVolume(ElasticSanVolume elasticSanVolume); } + + /** + * The stage of the Datastore update allowing to specify pureStorageVolume. + */ + interface WithPureStorageVolume { + /** + * Specifies the pureStorageVolume property: A Pure Storage volume. + * + * @param pureStorageVolume A Pure Storage volume. + * @return the next definition stage. + */ + Update withPureStorageVolume(PureStorageVolume pureStorageVolume); + } } /** diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/GeneralHostProperties.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/GeneralHostProperties.java new file mode 100644 index 000000000000..5e5ee28ae4b9 --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/GeneralHostProperties.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.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * The properties of a general host. + */ +@Fluent +public final class GeneralHostProperties extends HostProperties { + /* + * The kind of host + */ + private HostKind kind = HostKind.GENERAL; + + /** + * Creates an instance of GeneralHostProperties class. + */ + public GeneralHostProperties() { + } + + /** + * Get the kind property: The kind of host. + * + * @return the kind value. + */ + @Override + public HostKind kind() { + return this.kind; + } + + /** + * {@inheritDoc} + */ + @Override + public GeneralHostProperties withDisplayName(String displayName) { + super.withDisplayName(displayName); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public GeneralHostProperties withMaintenance(HostMaintenance maintenance) { + super.withMaintenance(maintenance); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("displayName", displayName()); + jsonWriter.writeStringField("maintenance", maintenance() == null ? null : maintenance().toString()); + jsonWriter.writeStringField("kind", this.kind == null ? null : this.kind.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of GeneralHostProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of GeneralHostProperties if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IOException If an error occurs while reading the GeneralHostProperties. + */ + public static GeneralHostProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + GeneralHostProperties deserializedGeneralHostProperties = new GeneralHostProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("provisioningState".equals(fieldName)) { + deserializedGeneralHostProperties + .withProvisioningState(HostProvisioningState.fromString(reader.getString())); + } else if ("displayName".equals(fieldName)) { + deserializedGeneralHostProperties.withDisplayName(reader.getString()); + } else if ("moRefId".equals(fieldName)) { + deserializedGeneralHostProperties.withMoRefId(reader.getString()); + } else if ("fqdn".equals(fieldName)) { + deserializedGeneralHostProperties.withFqdn(reader.getString()); + } else if ("maintenance".equals(fieldName)) { + deserializedGeneralHostProperties.withMaintenance(HostMaintenance.fromString(reader.getString())); + } else if ("faultDomain".equals(fieldName)) { + deserializedGeneralHostProperties.withFaultDomain(reader.getString()); + } else if ("kind".equals(fieldName)) { + deserializedGeneralHostProperties.kind = HostKind.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedGeneralHostProperties; + }); + } +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/HostKind.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/HostKind.java new file mode 100644 index 000000000000..7d0501d786ad --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/HostKind.java @@ -0,0 +1,51 @@ +// Copyright (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 java.util.Collection; + +/** + * The kind of host. + */ +public final class HostKind extends ExpandableStringEnum { + /** + * Static value General for HostKind. + */ + public static final HostKind GENERAL = fromString("General"); + + /** + * Static value Specialized for HostKind. + */ + public static final HostKind SPECIALIZED = fromString("Specialized"); + + /** + * Creates a new instance of HostKind value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public HostKind() { + } + + /** + * Creates or finds a HostKind from its string representation. + * + * @param name a name to look for. + * @return the corresponding HostKind. + */ + public static HostKind fromString(String name) { + return fromString(name, HostKind.class); + } + + /** + * Gets known HostKind values. + * + * @return known HostKind values. + */ + public static Collection values() { + return values(HostKind.class); + } +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/HostListResult.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/HostListResult.java new file mode 100644 index 000000000000..2392daac10ba --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/HostListResult.java @@ -0,0 +1,134 @@ +// Copyright (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.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.avs.fluent.models.HostModelInner; +import java.io.IOException; +import java.util.List; + +/** + * The response of a Host list operation. + */ +@Fluent +public final class HostListResult implements JsonSerializable { + /* + * The Host items on this page + */ + private List value; + + /* + * The link to the next page of items + */ + private String nextLink; + + /** + * Creates an instance of HostListResult class. + */ + public HostListResult() { + } + + /** + * Get the value property: The Host items on this page. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Set the value property: The Host items on this page. + * + * @param value the value value to set. + * @return the HostListResult object itself. + */ + public HostListResult 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; + } + + /** + * Set the nextLink property: The link to the next page of items. + * + * @param nextLink the nextLink value to set. + * @return the HostListResult object itself. + */ + public HostListResult withNextLink(String nextLink) { + this.nextLink = nextLink; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property value in model HostListResult")); + } else { + value().forEach(e -> e.validate()); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(HostListResult.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeStringField("nextLink", this.nextLink); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of HostListResult from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of HostListResult if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the HostListResult. + */ + public static HostListResult fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + HostListResult deserializedHostListResult = new HostListResult(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value = reader.readArray(reader1 -> HostModelInner.fromJson(reader1)); + deserializedHostListResult.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedHostListResult.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedHostListResult; + }); + } +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/HostMaintenance.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/HostMaintenance.java new file mode 100644 index 000000000000..8b9196dbd9f9 --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/HostMaintenance.java @@ -0,0 +1,51 @@ +// Copyright (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 java.util.Collection; + +/** + * The reason for host maintenance. + */ +public final class HostMaintenance extends ExpandableStringEnum { + /** + * Static value Replacement for HostMaintenance. + */ + public static final HostMaintenance REPLACEMENT = fromString("Replacement"); + + /** + * Static value Upgrade for HostMaintenance. + */ + public static final HostMaintenance UPGRADE = fromString("Upgrade"); + + /** + * Creates a new instance of HostMaintenance value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public HostMaintenance() { + } + + /** + * Creates or finds a HostMaintenance from its string representation. + * + * @param name a name to look for. + * @return the corresponding HostMaintenance. + */ + public static HostMaintenance fromString(String name) { + return fromString(name, HostMaintenance.class); + } + + /** + * Gets known HostMaintenance values. + * + * @return known HostMaintenance values. + */ + public static Collection values() { + return values(HostMaintenance.class); + } +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/HostModel.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/HostModel.java new file mode 100644 index 000000000000..adde0cd15cdd --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/HostModel.java @@ -0,0 +1,70 @@ +// Copyright (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.HostModelInner; +import java.util.List; + +/** + * An immutable client-side representation of HostModel. + */ +public interface HostModel { + /** + * 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 resource-specific properties for this resource. + * + * @return the properties value. + */ + HostProperties properties(); + + /** + * Gets the zones property: The availability zones. + * + * @return the zones value. + */ + List zones(); + + /** + * 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 inner com.azure.resourcemanager.avs.fluent.models.HostModelInner object. + * + * @return the inner object. + */ + HostModelInner innerModel(); +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/HostProperties.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/HostProperties.java new file mode 100644 index 000000000000..b1edfdb44bdc --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/HostProperties.java @@ -0,0 +1,273 @@ +// Copyright (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.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * The properties of a host. + */ +@Fluent +public class HostProperties implements JsonSerializable { + /* + * The kind of host + */ + private HostKind kind = HostKind.fromString("HostProperties"); + + /* + * The state of the host provisioning. + */ + private HostProvisioningState provisioningState; + + /* + * Display name of the host in VMware vCenter. + */ + private String displayName; + + /* + * vCenter managed object reference ID of the host. + */ + private String moRefId; + + /* + * Fully qualified domain name of the host. + */ + private String fqdn; + + /* + * If provided, the host is in maintenance. The value is the reason for maintenance. + */ + private HostMaintenance maintenance; + + /* + * The faultDomain property. + */ + private String faultDomain; + + /** + * Creates an instance of HostProperties class. + */ + public HostProperties() { + } + + /** + * Get the kind property: The kind of host. + * + * @return the kind value. + */ + public HostKind kind() { + return this.kind; + } + + /** + * Get the provisioningState property: The state of the host provisioning. + * + * @return the provisioningState value. + */ + public HostProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Set the provisioningState property: The state of the host provisioning. + * + * @param provisioningState the provisioningState value to set. + * @return the HostProperties object itself. + */ + HostProperties withProvisioningState(HostProvisioningState provisioningState) { + this.provisioningState = provisioningState; + return this; + } + + /** + * Get the displayName property: Display name of the host in VMware vCenter. + * + * @return the displayName value. + */ + public String displayName() { + return this.displayName; + } + + /** + * Set the displayName property: Display name of the host in VMware vCenter. + * + * @param displayName the displayName value to set. + * @return the HostProperties object itself. + */ + public HostProperties withDisplayName(String displayName) { + this.displayName = displayName; + return this; + } + + /** + * Get the moRefId property: vCenter managed object reference ID of the host. + * + * @return the moRefId value. + */ + public String moRefId() { + return this.moRefId; + } + + /** + * Set the moRefId property: vCenter managed object reference ID of the host. + * + * @param moRefId the moRefId value to set. + * @return the HostProperties object itself. + */ + HostProperties withMoRefId(String moRefId) { + this.moRefId = moRefId; + return this; + } + + /** + * Get the fqdn property: Fully qualified domain name of the host. + * + * @return the fqdn value. + */ + public String fqdn() { + return this.fqdn; + } + + /** + * Set the fqdn property: Fully qualified domain name of the host. + * + * @param fqdn the fqdn value to set. + * @return the HostProperties object itself. + */ + HostProperties withFqdn(String fqdn) { + this.fqdn = fqdn; + return this; + } + + /** + * Get the maintenance property: If provided, the host is in maintenance. The value is the reason for maintenance. + * + * @return the maintenance value. + */ + public HostMaintenance maintenance() { + return this.maintenance; + } + + /** + * Set the maintenance property: If provided, the host is in maintenance. The value is the reason for maintenance. + * + * @param maintenance the maintenance value to set. + * @return the HostProperties object itself. + */ + public HostProperties withMaintenance(HostMaintenance maintenance) { + this.maintenance = maintenance; + return this; + } + + /** + * Get the faultDomain property: The faultDomain property. + * + * @return the faultDomain value. + */ + public String faultDomain() { + return this.faultDomain; + } + + /** + * Set the faultDomain property: The faultDomain property. + * + * @param faultDomain the faultDomain value to set. + * @return the HostProperties object itself. + */ + HostProperties withFaultDomain(String faultDomain) { + this.faultDomain = faultDomain; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("kind", this.kind == null ? null : this.kind.toString()); + jsonWriter.writeStringField("displayName", this.displayName); + jsonWriter.writeStringField("maintenance", this.maintenance == null ? null : this.maintenance.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of HostProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of HostProperties if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IOException If an error occurs while reading the HostProperties. + */ + public static HostProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + String discriminatorValue = null; + try (JsonReader readerToUse = reader.bufferObject()) { + readerToUse.nextToken(); // Prepare for reading + while (readerToUse.nextToken() != JsonToken.END_OBJECT) { + String fieldName = readerToUse.getFieldName(); + readerToUse.nextToken(); + if ("kind".equals(fieldName)) { + discriminatorValue = readerToUse.getString(); + break; + } else { + readerToUse.skipChildren(); + } + } + // Use the discriminator value to determine which subtype should be deserialized. + if ("General".equals(discriminatorValue)) { + return GeneralHostProperties.fromJson(readerToUse.reset()); + } else if ("Specialized".equals(discriminatorValue)) { + return SpecializedHostProperties.fromJson(readerToUse.reset()); + } else { + return fromJsonKnownDiscriminator(readerToUse.reset()); + } + } + }); + } + + static HostProperties fromJsonKnownDiscriminator(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + HostProperties deserializedHostProperties = new HostProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("kind".equals(fieldName)) { + deserializedHostProperties.kind = HostKind.fromString(reader.getString()); + } else if ("provisioningState".equals(fieldName)) { + deserializedHostProperties.provisioningState = HostProvisioningState.fromString(reader.getString()); + } else if ("displayName".equals(fieldName)) { + deserializedHostProperties.displayName = reader.getString(); + } else if ("moRefId".equals(fieldName)) { + deserializedHostProperties.moRefId = reader.getString(); + } else if ("fqdn".equals(fieldName)) { + deserializedHostProperties.fqdn = reader.getString(); + } else if ("maintenance".equals(fieldName)) { + deserializedHostProperties.maintenance = HostMaintenance.fromString(reader.getString()); + } else if ("faultDomain".equals(fieldName)) { + deserializedHostProperties.faultDomain = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedHostProperties; + }); + } +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/HostProvisioningState.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/HostProvisioningState.java new file mode 100644 index 000000000000..d8b51dd87ed9 --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/HostProvisioningState.java @@ -0,0 +1,56 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.avs.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * provisioning state of the host. + */ +public final class HostProvisioningState extends ExpandableStringEnum { + /** + * Static value Succeeded for HostProvisioningState. + */ + public static final HostProvisioningState SUCCEEDED = fromString("Succeeded"); + + /** + * Static value Failed for HostProvisioningState. + */ + public static final HostProvisioningState FAILED = fromString("Failed"); + + /** + * Static value Canceled for HostProvisioningState. + */ + public static final HostProvisioningState CANCELED = fromString("Canceled"); + + /** + * Creates a new instance of HostProvisioningState value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public HostProvisioningState() { + } + + /** + * Creates or finds a HostProvisioningState from its string representation. + * + * @param name a name to look for. + * @return the corresponding HostProvisioningState. + */ + public static HostProvisioningState fromString(String name) { + return fromString(name, HostProvisioningState.class); + } + + /** + * Gets known HostProvisioningState values. + * + * @return known HostProvisioningState values. + */ + public static Collection values() { + return values(HostProvisioningState.class); + } +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/Hosts.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/Hosts.java new file mode 100644 index 000000000000..a2d97e28c0d9 --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/Hosts.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.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; + +/** + * Resource collection API of Hosts. + */ +public interface Hosts { + /** + * List Host 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. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException 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 Host list operation as paginated response with {@link PagedIterable}. + */ + PagedIterable list(String resourceGroupName, String privateCloudName, String clusterName); + + /** + * List Host 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. + * @param context The context to associate with this 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 Host list operation as paginated response with {@link PagedIterable}. + */ + PagedIterable list(String resourceGroupName, String privateCloudName, String clusterName, + Context context); + + /** + * Get a Host. + * + * @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. + * @param hostId The host identifier. + * @param context The context to associate with this 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 Host along with {@link Response}. + */ + Response getWithResponse(String resourceGroupName, String privateCloudName, String clusterName, + String hostId, Context context); + + /** + * Get a Host. + * + * @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. + * @param hostId The host identifier. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a Host. + */ + HostModel get(String resourceGroupName, String privateCloudName, String clusterName, String hostId); +} 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 234c6af94168..6864915613db 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 @@ -27,7 +27,7 @@ public final class IdentitySource implements JsonSerializable { private String alias; /* - * The domain's dns name + * The domain's DNS name */ private String domain; @@ -115,7 +115,7 @@ public IdentitySource withAlias(String alias) { } /** - * Get the domain property: The domain's dns name. + * Get the domain property: The domain's DNS name. * * @return the domain value. */ @@ -124,7 +124,7 @@ public String domain() { } /** - * Set the domain property: The domain's dns name. + * Set the domain property: The domain's DNS name. * * @param domain the domain value to set. * @return the IdentitySource object itself. diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/PagedResourceSku.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/PagedResourceSku.java new file mode 100644 index 000000000000..f022313f461e --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/PagedResourceSku.java @@ -0,0 +1,134 @@ +// Copyright (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.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.avs.fluent.models.ResourceSkuInner; +import java.io.IOException; +import java.util.List; + +/** + * Paged collection of ResourceSku items. + */ +@Fluent +public final class PagedResourceSku implements JsonSerializable { + /* + * The ResourceSku items on this page + */ + private List value; + + /* + * The link to the next page of items + */ + private String nextLink; + + /** + * Creates an instance of PagedResourceSku class. + */ + public PagedResourceSku() { + } + + /** + * Get the value property: The ResourceSku items on this page. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Set the value property: The ResourceSku items on this page. + * + * @param value the value value to set. + * @return the PagedResourceSku object itself. + */ + public PagedResourceSku 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; + } + + /** + * Set the nextLink property: The link to the next page of items. + * + * @param nextLink the nextLink value to set. + * @return the PagedResourceSku object itself. + */ + public PagedResourceSku withNextLink(String nextLink) { + this.nextLink = nextLink; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property value in model PagedResourceSku")); + } else { + value().forEach(e -> e.validate()); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(PagedResourceSku.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeStringField("nextLink", this.nextLink); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of PagedResourceSku from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of PagedResourceSku if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the PagedResourceSku. + */ + public static PagedResourceSku fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + PagedResourceSku deserializedPagedResourceSku = new PagedResourceSku(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value = reader.readArray(reader1 -> ResourceSkuInner.fromJson(reader1)); + deserializedPagedResourceSku.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedPagedResourceSku.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedPagedResourceSku; + }); + } +} 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 39ac04103874..f335f21e3b00 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 @@ -65,6 +65,13 @@ public interface PrivateCloud { */ PrivateCloudIdentity identity(); + /** + * Gets the zones property: The availability zones. + * + * @return the zones value. + */ + List zones(); + /** * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. * @@ -331,11 +338,11 @@ interface WithSku { * The stage of the PrivateCloud 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.WithTags, DefinitionStages.WithIdentity, DefinitionStages.WithManagementCluster, - DefinitionStages.WithInternet, DefinitionStages.WithIdentitySources, DefinitionStages.WithAvailability, - DefinitionStages.WithEncryption, DefinitionStages.WithExtendedNetworkBlocks, DefinitionStages.WithCircuit, - DefinitionStages.WithNetworkBlock, DefinitionStages.WithVcenterPassword, DefinitionStages.WithNsxtPassword, + interface WithCreate extends DefinitionStages.WithTags, DefinitionStages.WithIdentity, + DefinitionStages.WithZones, 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 { /** @@ -380,6 +387,19 @@ interface WithIdentity { WithCreate withIdentity(PrivateCloudIdentity identity); } + /** + * The stage of the PrivateCloud definition allowing to specify zones. + */ + interface WithZones { + /** + * Specifies the zones property: The availability zones.. + * + * @param zones The availability zones. + * @return the next definition stage. + */ + WithCreate withZones(List zones); + } + /** * The stage of the PrivateCloud definition allowing to specify managementCluster. */ diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ProvisionedNetwork.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ProvisionedNetwork.java new file mode 100644 index 000000000000..00b7f3d6b8aa --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ProvisionedNetwork.java @@ -0,0 +1,69 @@ +// Copyright (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.ProvisionedNetworkInner; + +/** + * An immutable client-side representation of ProvisionedNetwork. + */ +public interface ProvisionedNetwork { + /** + * 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. + */ + ProvisionedNetworkProvisioningState provisioningState(); + + /** + * Gets the addressPrefix property: The address prefixes of the provisioned network in CIDR notation. + * + * @return the addressPrefix value. + */ + String addressPrefix(); + + /** + * Gets the networkType property: The type of network provisioned. + * + * @return the networkType value. + */ + ProvisionedNetworkTypes networkType(); + + /** + * Gets the inner com.azure.resourcemanager.avs.fluent.models.ProvisionedNetworkInner object. + * + * @return the inner object. + */ + ProvisionedNetworkInner innerModel(); +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ProvisionedNetworkListResult.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ProvisionedNetworkListResult.java new file mode 100644 index 000000000000..04b6338ca447 --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ProvisionedNetworkListResult.java @@ -0,0 +1,136 @@ +// Copyright (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.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.avs.fluent.models.ProvisionedNetworkInner; +import java.io.IOException; +import java.util.List; + +/** + * The response of a ProvisionedNetwork list operation. + */ +@Fluent +public final class ProvisionedNetworkListResult implements JsonSerializable { + /* + * The ProvisionedNetwork items on this page + */ + private List value; + + /* + * The link to the next page of items + */ + private String nextLink; + + /** + * Creates an instance of ProvisionedNetworkListResult class. + */ + public ProvisionedNetworkListResult() { + } + + /** + * Get the value property: The ProvisionedNetwork items on this page. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Set the value property: The ProvisionedNetwork items on this page. + * + * @param value the value value to set. + * @return the ProvisionedNetworkListResult object itself. + */ + public ProvisionedNetworkListResult 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; + } + + /** + * Set the nextLink property: The link to the next page of items. + * + * @param nextLink the nextLink value to set. + * @return the ProvisionedNetworkListResult object itself. + */ + public ProvisionedNetworkListResult withNextLink(String nextLink) { + this.nextLink = nextLink; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property value in model ProvisionedNetworkListResult")); + } else { + value().forEach(e -> e.validate()); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(ProvisionedNetworkListResult.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeStringField("nextLink", this.nextLink); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ProvisionedNetworkListResult from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ProvisionedNetworkListResult if the JsonReader was pointing to an instance of it, or null + * if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the ProvisionedNetworkListResult. + */ + public static ProvisionedNetworkListResult fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ProvisionedNetworkListResult deserializedProvisionedNetworkListResult = new ProvisionedNetworkListResult(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value + = reader.readArray(reader1 -> ProvisionedNetworkInner.fromJson(reader1)); + deserializedProvisionedNetworkListResult.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedProvisionedNetworkListResult.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedProvisionedNetworkListResult; + }); + } +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ProvisionedNetworkProvisioningState.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ProvisionedNetworkProvisioningState.java new file mode 100644 index 000000000000..753de3164899 --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ProvisionedNetworkProvisioningState.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.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * provisioned network provisioning state. + */ +public final class ProvisionedNetworkProvisioningState + extends ExpandableStringEnum { + /** + * Static value Succeeded for ProvisionedNetworkProvisioningState. + */ + public static final ProvisionedNetworkProvisioningState SUCCEEDED = fromString("Succeeded"); + + /** + * Static value Failed for ProvisionedNetworkProvisioningState. + */ + public static final ProvisionedNetworkProvisioningState FAILED = fromString("Failed"); + + /** + * Static value Canceled for ProvisionedNetworkProvisioningState. + */ + public static final ProvisionedNetworkProvisioningState CANCELED = fromString("Canceled"); + + /** + * Creates a new instance of ProvisionedNetworkProvisioningState value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ProvisionedNetworkProvisioningState() { + } + + /** + * Creates or finds a ProvisionedNetworkProvisioningState from its string representation. + * + * @param name a name to look for. + * @return the corresponding ProvisionedNetworkProvisioningState. + */ + public static ProvisionedNetworkProvisioningState fromString(String name) { + return fromString(name, ProvisionedNetworkProvisioningState.class); + } + + /** + * Gets known ProvisionedNetworkProvisioningState values. + * + * @return known ProvisionedNetworkProvisioningState values. + */ + public static Collection values() { + return values(ProvisionedNetworkProvisioningState.class); + } +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ProvisionedNetworkTypes.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ProvisionedNetworkTypes.java new file mode 100644 index 000000000000..ad9dde23a8bd --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ProvisionedNetworkTypes.java @@ -0,0 +1,76 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.avs.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * The type of network provisioned. + */ +public final class ProvisionedNetworkTypes extends ExpandableStringEnum { + /** + * Static value esxManagement for ProvisionedNetworkTypes. + */ + public static final ProvisionedNetworkTypes ESX_MANAGEMENT = fromString("esxManagement"); + + /** + * Static value esxReplication for ProvisionedNetworkTypes. + */ + public static final ProvisionedNetworkTypes ESX_REPLICATION = fromString("esxReplication"); + + /** + * Static value hcxManagement for ProvisionedNetworkTypes. + */ + public static final ProvisionedNetworkTypes HCX_MANAGEMENT = fromString("hcxManagement"); + + /** + * Static value hcxUplink for ProvisionedNetworkTypes. + */ + public static final ProvisionedNetworkTypes HCX_UPLINK = fromString("hcxUplink"); + + /** + * Static value vcenterManagement for ProvisionedNetworkTypes. + */ + public static final ProvisionedNetworkTypes VCENTER_MANAGEMENT = fromString("vcenterManagement"); + + /** + * Static value vmotion for ProvisionedNetworkTypes. + */ + public static final ProvisionedNetworkTypes VMOTION = fromString("vmotion"); + + /** + * Static value vsan for ProvisionedNetworkTypes. + */ + public static final ProvisionedNetworkTypes VSAN = fromString("vsan"); + + /** + * Creates a new instance of ProvisionedNetworkTypes value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ProvisionedNetworkTypes() { + } + + /** + * Creates or finds a ProvisionedNetworkTypes from its string representation. + * + * @param name a name to look for. + * @return the corresponding ProvisionedNetworkTypes. + */ + public static ProvisionedNetworkTypes fromString(String name) { + return fromString(name, ProvisionedNetworkTypes.class); + } + + /** + * Gets known ProvisionedNetworkTypes values. + * + * @return known ProvisionedNetworkTypes values. + */ + public static Collection values() { + return values(ProvisionedNetworkTypes.class); + } +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ProvisionedNetworks.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ProvisionedNetworks.java new file mode 100644 index 000000000000..5ff4cc03e211 --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ProvisionedNetworks.java @@ -0,0 +1,67 @@ +// Copyright (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; + +/** + * Resource collection API of ProvisionedNetworks. + */ +public interface ProvisionedNetworks { + /** + * List ProvisionedNetwork 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 ProvisionedNetwork list operation as paginated response with {@link PagedIterable}. + */ + PagedIterable list(String resourceGroupName, String privateCloudName); + + /** + * List ProvisionedNetwork 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 ProvisionedNetwork list operation as paginated response with {@link PagedIterable}. + */ + PagedIterable list(String resourceGroupName, String privateCloudName, Context context); + + /** + * Get a ProvisionedNetwork. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param provisionedNetworkName 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 a ProvisionedNetwork along with {@link Response}. + */ + Response getWithResponse(String resourceGroupName, String privateCloudName, + String provisionedNetworkName, Context context); + + /** + * Get a ProvisionedNetwork. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param provisionedNetworkName 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 a ProvisionedNetwork. + */ + ProvisionedNetwork get(String resourceGroupName, String privateCloudName, String provisionedNetworkName); +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/PureStoragePolicies.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/PureStoragePolicies.java new file mode 100644 index 000000000000..0cffcc861355 --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/PureStoragePolicies.java @@ -0,0 +1,144 @@ +// Copyright (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; + +/** + * Resource collection API of PureStoragePolicies. + */ +public interface PureStoragePolicies { + /** + * List PureStoragePolicy 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 PureStoragePolicy list operation as paginated response with {@link PagedIterable}. + */ + PagedIterable list(String resourceGroupName, String privateCloudName); + + /** + * List PureStoragePolicy 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 PureStoragePolicy list operation as paginated response with {@link PagedIterable}. + */ + PagedIterable list(String resourceGroupName, String privateCloudName, Context context); + + /** + * Get a PureStoragePolicy. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param storagePolicyName Name of the storage 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 PureStoragePolicy along with {@link Response}. + */ + Response getWithResponse(String resourceGroupName, String privateCloudName, + String storagePolicyName, Context context); + + /** + * Get a PureStoragePolicy. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param storagePolicyName Name of the storage 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 PureStoragePolicy. + */ + PureStoragePolicy get(String resourceGroupName, String privateCloudName, String storagePolicyName); + + /** + * Delete a PureStoragePolicy. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param storagePolicyName Name of the storage 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. + */ + void delete(String resourceGroupName, String privateCloudName, String storagePolicyName); + + /** + * Delete a PureStoragePolicy. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud. + * @param storagePolicyName Name of the storage 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 storagePolicyName, Context context); + + /** + * Get a PureStoragePolicy. + * + * @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 PureStoragePolicy along with {@link Response}. + */ + PureStoragePolicy getById(String id); + + /** + * Get a PureStoragePolicy. + * + * @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 PureStoragePolicy along with {@link Response}. + */ + Response getByIdWithResponse(String id, Context context); + + /** + * Delete a PureStoragePolicy. + * + * @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 deleteById(String id); + + /** + * Delete a PureStoragePolicy. + * + * @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 deleteByIdWithResponse(String id, Context context); + + /** + * Begins definition for a new PureStoragePolicy resource. + * + * @param name resource name. + * @return the first stage of the new PureStoragePolicy definition. + */ + PureStoragePolicy.DefinitionStages.Blank define(String name); +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/PureStoragePolicy.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/PureStoragePolicy.java new file mode 100644 index 000000000000..3e7db96b90f6 --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/PureStoragePolicy.java @@ -0,0 +1,233 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.avs.models; + +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.avs.fluent.models.PureStoragePolicyInner; + +/** + * An immutable client-side representation of PureStoragePolicy. + */ +public interface PureStoragePolicy { + /** + * 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 storagePolicyDefinition property: Definition of a Pure Storage Policy Based Management policy. + * + * @return the storagePolicyDefinition value. + */ + String storagePolicyDefinition(); + + /** + * Gets the storagePoolId property: Azure resource ID of the Pure Storage Pool associated with the storage policy. + * + * @return the storagePoolId value. + */ + String storagePoolId(); + + /** + * Gets the provisioningState property: The state of the Pure Storage Policy Based Management policy provisioning. + * + * @return the provisioningState value. + */ + PureStoragePolicyProvisioningState provisioningState(); + + /** + * 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.PureStoragePolicyInner object. + * + * @return the inner object. + */ + PureStoragePolicyInner innerModel(); + + /** + * The entirety of the PureStoragePolicy definition. + */ + interface Definition + extends DefinitionStages.Blank, DefinitionStages.WithParentResource, DefinitionStages.WithCreate { + } + + /** + * The PureStoragePolicy definition stages. + */ + interface DefinitionStages { + /** + * The first stage of the PureStoragePolicy definition. + */ + interface Blank extends WithParentResource { + } + + /** + * The stage of the PureStoragePolicy 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. + */ + WithCreate withExistingPrivateCloud(String resourceGroupName, String privateCloudName); + } + + /** + * The stage of the PureStoragePolicy 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.WithStoragePolicyDefinition, DefinitionStages.WithStoragePoolId { + /** + * Executes the create request. + * + * @return the created resource. + */ + PureStoragePolicy create(); + + /** + * Executes the create request. + * + * @param context The context to associate with this operation. + * @return the created resource. + */ + PureStoragePolicy create(Context context); + } + + /** + * The stage of the PureStoragePolicy definition allowing to specify storagePolicyDefinition. + */ + interface WithStoragePolicyDefinition { + /** + * Specifies the storagePolicyDefinition property: Definition of a Pure Storage Policy Based Management + * policy. + * + * @param storagePolicyDefinition Definition of a Pure Storage Policy Based Management policy. + * @return the next definition stage. + */ + WithCreate withStoragePolicyDefinition(String storagePolicyDefinition); + } + + /** + * The stage of the PureStoragePolicy definition allowing to specify storagePoolId. + */ + interface WithStoragePoolId { + /** + * Specifies the storagePoolId property: Azure resource ID of the Pure Storage Pool associated with the + * storage policy. + * + * @param storagePoolId Azure resource ID of the Pure Storage Pool associated with the storage policy. + * @return the next definition stage. + */ + WithCreate withStoragePoolId(String storagePoolId); + } + } + + /** + * Begins update for the PureStoragePolicy resource. + * + * @return the stage of resource update. + */ + PureStoragePolicy.Update update(); + + /** + * The template for PureStoragePolicy update. + */ + interface Update extends UpdateStages.WithStoragePolicyDefinition, UpdateStages.WithStoragePoolId { + /** + * Executes the update request. + * + * @return the updated resource. + */ + PureStoragePolicy apply(); + + /** + * Executes the update request. + * + * @param context The context to associate with this operation. + * @return the updated resource. + */ + PureStoragePolicy apply(Context context); + } + + /** + * The PureStoragePolicy update stages. + */ + interface UpdateStages { + /** + * The stage of the PureStoragePolicy update allowing to specify storagePolicyDefinition. + */ + interface WithStoragePolicyDefinition { + /** + * Specifies the storagePolicyDefinition property: Definition of a Pure Storage Policy Based Management + * policy. + * + * @param storagePolicyDefinition Definition of a Pure Storage Policy Based Management policy. + * @return the next definition stage. + */ + Update withStoragePolicyDefinition(String storagePolicyDefinition); + } + + /** + * The stage of the PureStoragePolicy update allowing to specify storagePoolId. + */ + interface WithStoragePoolId { + /** + * Specifies the storagePoolId property: Azure resource ID of the Pure Storage Pool associated with the + * storage policy. + * + * @param storagePoolId Azure resource ID of the Pure Storage Pool associated with the storage policy. + * @return the next definition stage. + */ + Update withStoragePoolId(String storagePoolId); + } + } + + /** + * Refreshes the resource to sync with Azure. + * + * @return the refreshed resource. + */ + PureStoragePolicy refresh(); + + /** + * Refreshes the resource to sync with Azure. + * + * @param context The context to associate with this operation. + * @return the refreshed resource. + */ + PureStoragePolicy refresh(Context context); +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/PureStoragePolicyListResult.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/PureStoragePolicyListResult.java new file mode 100644 index 000000000000..640f2fedf099 --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/PureStoragePolicyListResult.java @@ -0,0 +1,136 @@ +// Copyright (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.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.avs.fluent.models.PureStoragePolicyInner; +import java.io.IOException; +import java.util.List; + +/** + * The response of a PureStoragePolicy list operation. + */ +@Fluent +public final class PureStoragePolicyListResult implements JsonSerializable { + /* + * The PureStoragePolicy items on this page + */ + private List value; + + /* + * The link to the next page of items + */ + private String nextLink; + + /** + * Creates an instance of PureStoragePolicyListResult class. + */ + public PureStoragePolicyListResult() { + } + + /** + * Get the value property: The PureStoragePolicy items on this page. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Set the value property: The PureStoragePolicy items on this page. + * + * @param value the value value to set. + * @return the PureStoragePolicyListResult object itself. + */ + public PureStoragePolicyListResult 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; + } + + /** + * Set the nextLink property: The link to the next page of items. + * + * @param nextLink the nextLink value to set. + * @return the PureStoragePolicyListResult object itself. + */ + public PureStoragePolicyListResult withNextLink(String nextLink) { + this.nextLink = nextLink; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property value in model PureStoragePolicyListResult")); + } else { + value().forEach(e -> e.validate()); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(PureStoragePolicyListResult.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeStringField("nextLink", this.nextLink); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of PureStoragePolicyListResult from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of PureStoragePolicyListResult if the JsonReader was pointing to an instance of it, or null + * if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the PureStoragePolicyListResult. + */ + public static PureStoragePolicyListResult fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + PureStoragePolicyListResult deserializedPureStoragePolicyListResult = new PureStoragePolicyListResult(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value + = reader.readArray(reader1 -> PureStoragePolicyInner.fromJson(reader1)); + deserializedPureStoragePolicyListResult.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedPureStoragePolicyListResult.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedPureStoragePolicyListResult; + }); + } +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/PureStoragePolicyProvisioningState.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/PureStoragePolicyProvisioningState.java new file mode 100644 index 000000000000..ebf6f559e4e7 --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/PureStoragePolicyProvisioningState.java @@ -0,0 +1,66 @@ +// Copyright (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 java.util.Collection; + +/** + * Pure Storage Policy Based Management policy provisioning state. + */ +public final class PureStoragePolicyProvisioningState extends ExpandableStringEnum { + /** + * Static value Succeeded for PureStoragePolicyProvisioningState. + */ + public static final PureStoragePolicyProvisioningState SUCCEEDED = fromString("Succeeded"); + + /** + * Static value Failed for PureStoragePolicyProvisioningState. + */ + public static final PureStoragePolicyProvisioningState FAILED = fromString("Failed"); + + /** + * Static value Canceled for PureStoragePolicyProvisioningState. + */ + public static final PureStoragePolicyProvisioningState CANCELED = fromString("Canceled"); + + /** + * Static value Deleting for PureStoragePolicyProvisioningState. + */ + public static final PureStoragePolicyProvisioningState DELETING = fromString("Deleting"); + + /** + * Static value Updating for PureStoragePolicyProvisioningState. + */ + public static final PureStoragePolicyProvisioningState UPDATING = fromString("Updating"); + + /** + * Creates a new instance of PureStoragePolicyProvisioningState value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public PureStoragePolicyProvisioningState() { + } + + /** + * Creates or finds a PureStoragePolicyProvisioningState from its string representation. + * + * @param name a name to look for. + * @return the corresponding PureStoragePolicyProvisioningState. + */ + public static PureStoragePolicyProvisioningState fromString(String name) { + return fromString(name, PureStoragePolicyProvisioningState.class); + } + + /** + * Gets known PureStoragePolicyProvisioningState values. + * + * @return known PureStoragePolicyProvisioningState values. + */ + public static Collection values() { + return values(PureStoragePolicyProvisioningState.class); + } +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/PureStorageVolume.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/PureStorageVolume.java new file mode 100644 index 000000000000..594099680c55 --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/PureStorageVolume.java @@ -0,0 +1,130 @@ +// Copyright (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.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * A Pure Storage volume from PureStorage.Block provider. + */ +@Fluent +public final class PureStorageVolume implements JsonSerializable { + /* + * Azure resource ID of the Pure Storage Pool + */ + private String storagePoolId; + + /* + * Volume size to be used to create a Virtual Volumes (vVols) datastore + */ + private int sizeGb; + + /** + * Creates an instance of PureStorageVolume class. + */ + public PureStorageVolume() { + } + + /** + * Get the storagePoolId property: Azure resource ID of the Pure Storage Pool. + * + * @return the storagePoolId value. + */ + public String storagePoolId() { + return this.storagePoolId; + } + + /** + * Set the storagePoolId property: Azure resource ID of the Pure Storage Pool. + * + * @param storagePoolId the storagePoolId value to set. + * @return the PureStorageVolume object itself. + */ + public PureStorageVolume withStoragePoolId(String storagePoolId) { + this.storagePoolId = storagePoolId; + return this; + } + + /** + * Get the sizeGb property: Volume size to be used to create a Virtual Volumes (vVols) datastore. + * + * @return the sizeGb value. + */ + public int sizeGb() { + return this.sizeGb; + } + + /** + * Set the sizeGb property: Volume size to be used to create a Virtual Volumes (vVols) datastore. + * + * @param sizeGb the sizeGb value to set. + * @return the PureStorageVolume object itself. + */ + public PureStorageVolume withSizeGb(int sizeGb) { + this.sizeGb = sizeGb; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (storagePoolId() == null) { + throw LOGGER.atError() + .log( + new IllegalArgumentException("Missing required property storagePoolId in model PureStorageVolume")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(PureStorageVolume.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("storagePoolId", this.storagePoolId); + jsonWriter.writeIntField("sizeGb", this.sizeGb); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of PureStorageVolume from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of PureStorageVolume if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the PureStorageVolume. + */ + public static PureStorageVolume fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + PureStorageVolume deserializedPureStorageVolume = new PureStorageVolume(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("storagePoolId".equals(fieldName)) { + deserializedPureStorageVolume.storagePoolId = reader.getString(); + } else if ("sizeGb".equals(fieldName)) { + deserializedPureStorageVolume.sizeGb = reader.getInt(); + } else { + reader.skipChildren(); + } + } + + return deserializedPureStorageVolume; + }); + } +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ResourceSku.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ResourceSku.java new file mode 100644 index 000000000000..413d6fecf5be --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ResourceSku.java @@ -0,0 +1,84 @@ +// Copyright (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.resourcemanager.avs.fluent.models.ResourceSkuInner; +import java.util.List; + +/** + * An immutable client-side representation of ResourceSku. + */ +public interface ResourceSku { + /** + * Gets the resourceType property: The type of resource the SKU applies to. + * + * @return the resourceType value. + */ + ResourceSkuResourceType resourceType(); + + /** + * Gets the name property: The name of the SKU. + * + * @return the name value. + */ + String name(); + + /** + * Gets the tier property: The tier of virtual machines in a scale set. + * + * @return the tier value. + */ + String tier(); + + /** + * Gets the size property: The size of the SKU. + * + * @return the size value. + */ + String size(); + + /** + * Gets the family property: The family of the SKU. + * + * @return the family value. + */ + String family(); + + /** + * Gets the locations property: The set of locations that the SKU is available. + * + * @return the locations value. + */ + List locations(); + + /** + * Gets the locationInfo property: A list of locations and availability zones in those locations where the SKU is + * available. + * + * @return the locationInfo value. + */ + List locationInfo(); + + /** + * Gets the capabilities property: Name value pairs to describe the capability. + * + * @return the capabilities value. + */ + List capabilities(); + + /** + * Gets the restrictions property: The restrictions of the SKU. + * + * @return the restrictions value. + */ + List restrictions(); + + /** + * Gets the inner com.azure.resourcemanager.avs.fluent.models.ResourceSkuInner object. + * + * @return the inner object. + */ + ResourceSkuInner innerModel(); +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ResourceSkuCapabilities.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ResourceSkuCapabilities.java new file mode 100644 index 000000000000..232951eb9921 --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ResourceSkuCapabilities.java @@ -0,0 +1,133 @@ +// Copyright (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.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Describes The SKU capabilities object. + */ +@Fluent +public final class ResourceSkuCapabilities implements JsonSerializable { + /* + * The name of the SKU capability. + */ + private String name; + + /* + * The value of the SKU capability. + */ + private String value; + + /** + * Creates an instance of ResourceSkuCapabilities class. + */ + public ResourceSkuCapabilities() { + } + + /** + * Get the name property: The name of the SKU capability. + * + * @return the name value. + */ + public String name() { + return this.name; + } + + /** + * Set the name property: The name of the SKU capability. + * + * @param name the name value to set. + * @return the ResourceSkuCapabilities object itself. + */ + public ResourceSkuCapabilities withName(String name) { + this.name = name; + return this; + } + + /** + * Get the value property: The value of the SKU capability. + * + * @return the value value. + */ + public String value() { + return this.value; + } + + /** + * Set the value property: The value of the SKU capability. + * + * @param value the value value to set. + * @return the ResourceSkuCapabilities object itself. + */ + public ResourceSkuCapabilities withValue(String value) { + this.value = value; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (name() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property name in model ResourceSkuCapabilities")); + } + if (value() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property value in model ResourceSkuCapabilities")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(ResourceSkuCapabilities.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("name", this.name); + jsonWriter.writeStringField("value", this.value); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ResourceSkuCapabilities from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ResourceSkuCapabilities if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the ResourceSkuCapabilities. + */ + public static ResourceSkuCapabilities fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ResourceSkuCapabilities deserializedResourceSkuCapabilities = new ResourceSkuCapabilities(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("name".equals(fieldName)) { + deserializedResourceSkuCapabilities.name = reader.getString(); + } else if ("value".equals(fieldName)) { + deserializedResourceSkuCapabilities.value = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedResourceSkuCapabilities; + }); + } +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ResourceSkuLocationInfo.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ResourceSkuLocationInfo.java new file mode 100644 index 000000000000..b1eb3cd1cf71 --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ResourceSkuLocationInfo.java @@ -0,0 +1,173 @@ +// Copyright (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.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; + +/** + * Describes an available Compute SKU Location Information. + */ +@Fluent +public final class ResourceSkuLocationInfo implements JsonSerializable { + /* + * Location of the SKU + */ + private String location; + + /* + * List of availability zones where the SKU is supported. + */ + private List zones; + + /* + * Gets details of capabilities available to a SKU in specific zones. + */ + private List zoneDetails; + + /** + * Creates an instance of ResourceSkuLocationInfo class. + */ + public ResourceSkuLocationInfo() { + } + + /** + * Get the location property: Location of the SKU. + * + * @return the location value. + */ + public String location() { + return this.location; + } + + /** + * Set the location property: Location of the SKU. + * + * @param location the location value to set. + * @return the ResourceSkuLocationInfo object itself. + */ + public ResourceSkuLocationInfo withLocation(String location) { + this.location = location; + return this; + } + + /** + * Get the zones property: List of availability zones where the SKU is supported. + * + * @return the zones value. + */ + public List zones() { + return this.zones; + } + + /** + * Set the zones property: List of availability zones where the SKU is supported. + * + * @param zones the zones value to set. + * @return the ResourceSkuLocationInfo object itself. + */ + public ResourceSkuLocationInfo withZones(List zones) { + this.zones = zones; + return this; + } + + /** + * Get the zoneDetails property: Gets details of capabilities available to a SKU in specific zones. + * + * @return the zoneDetails value. + */ + public List zoneDetails() { + return this.zoneDetails; + } + + /** + * Set the zoneDetails property: Gets details of capabilities available to a SKU in specific zones. + * + * @param zoneDetails the zoneDetails value to set. + * @return the ResourceSkuLocationInfo object itself. + */ + public ResourceSkuLocationInfo withZoneDetails(List zoneDetails) { + this.zoneDetails = zoneDetails; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (location() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property location in model ResourceSkuLocationInfo")); + } + if (zones() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property zones in model ResourceSkuLocationInfo")); + } + if (zoneDetails() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property zoneDetails in model ResourceSkuLocationInfo")); + } else { + zoneDetails().forEach(e -> e.validate()); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(ResourceSkuLocationInfo.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("location", this.location); + jsonWriter.writeArrayField("zones", this.zones, (writer, element) -> writer.writeString(element)); + jsonWriter.writeArrayField("zoneDetails", this.zoneDetails, (writer, element) -> writer.writeJson(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ResourceSkuLocationInfo from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ResourceSkuLocationInfo if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the ResourceSkuLocationInfo. + */ + public static ResourceSkuLocationInfo fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ResourceSkuLocationInfo deserializedResourceSkuLocationInfo = new ResourceSkuLocationInfo(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("location".equals(fieldName)) { + deserializedResourceSkuLocationInfo.location = reader.getString(); + } else if ("zones".equals(fieldName)) { + List zones = reader.readArray(reader1 -> reader1.getString()); + deserializedResourceSkuLocationInfo.zones = zones; + } else if ("zoneDetails".equals(fieldName)) { + List zoneDetails + = reader.readArray(reader1 -> ResourceSkuZoneDetails.fromJson(reader1)); + deserializedResourceSkuLocationInfo.zoneDetails = zoneDetails; + } else { + reader.skipChildren(); + } + } + + return deserializedResourceSkuLocationInfo; + }); + } +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ResourceSkuResourceType.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ResourceSkuResourceType.java new file mode 100644 index 000000000000..b4415ce89193 --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ResourceSkuResourceType.java @@ -0,0 +1,51 @@ +// Copyright (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 java.util.Collection; + +/** + * Describes the type of resource the SKU applies to. + */ +public final class ResourceSkuResourceType extends ExpandableStringEnum { + /** + * Static value privateClouds for ResourceSkuResourceType. + */ + public static final ResourceSkuResourceType PRIVATE_CLOUDS = fromString("privateClouds"); + + /** + * Static value privateClouds/clusters for ResourceSkuResourceType. + */ + public static final ResourceSkuResourceType PRIVATE_CLOUDS_CLUSTERS = fromString("privateClouds/clusters"); + + /** + * Creates a new instance of ResourceSkuResourceType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ResourceSkuResourceType() { + } + + /** + * Creates or finds a ResourceSkuResourceType from its string representation. + * + * @param name a name to look for. + * @return the corresponding ResourceSkuResourceType. + */ + public static ResourceSkuResourceType fromString(String name) { + return fromString(name, ResourceSkuResourceType.class); + } + + /** + * Gets known ResourceSkuResourceType values. + * + * @return known ResourceSkuResourceType values. + */ + public static Collection values() { + return values(ResourceSkuResourceType.class); + } +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ResourceSkuRestrictionInfo.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ResourceSkuRestrictionInfo.java new file mode 100644 index 000000000000..aead31089d6f --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ResourceSkuRestrictionInfo.java @@ -0,0 +1,124 @@ +// Copyright (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.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; + +/** + * Describes an available Compute SKU Restriction Information. + */ +@Fluent +public final class ResourceSkuRestrictionInfo implements JsonSerializable { + /* + * Locations where the SKU is restricted + */ + private List locations; + + /* + * List of availability zones where the SKU is restricted. + */ + private List zones; + + /** + * Creates an instance of ResourceSkuRestrictionInfo class. + */ + public ResourceSkuRestrictionInfo() { + } + + /** + * Get the locations property: Locations where the SKU is restricted. + * + * @return the locations value. + */ + public List locations() { + return this.locations; + } + + /** + * Set the locations property: Locations where the SKU is restricted. + * + * @param locations the locations value to set. + * @return the ResourceSkuRestrictionInfo object itself. + */ + public ResourceSkuRestrictionInfo withLocations(List locations) { + this.locations = locations; + return this; + } + + /** + * Get the zones property: List of availability zones where the SKU is restricted. + * + * @return the zones value. + */ + public List zones() { + return this.zones; + } + + /** + * Set the zones property: List of availability zones where the SKU is restricted. + * + * @param zones the zones value to set. + * @return the ResourceSkuRestrictionInfo object itself. + */ + public ResourceSkuRestrictionInfo withZones(List zones) { + this.zones = zones; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("locations", this.locations, (writer, element) -> writer.writeString(element)); + jsonWriter.writeArrayField("zones", this.zones, (writer, element) -> writer.writeString(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ResourceSkuRestrictionInfo from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ResourceSkuRestrictionInfo if the JsonReader was pointing to an instance of it, or null if + * it was pointing to JSON null. + * @throws IOException If an error occurs while reading the ResourceSkuRestrictionInfo. + */ + public static ResourceSkuRestrictionInfo fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ResourceSkuRestrictionInfo deserializedResourceSkuRestrictionInfo = new ResourceSkuRestrictionInfo(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("locations".equals(fieldName)) { + List locations = reader.readArray(reader1 -> reader1.getString()); + deserializedResourceSkuRestrictionInfo.locations = locations; + } else if ("zones".equals(fieldName)) { + List zones = reader.readArray(reader1 -> reader1.getString()); + deserializedResourceSkuRestrictionInfo.zones = zones; + } else { + reader.skipChildren(); + } + } + + return deserializedResourceSkuRestrictionInfo; + }); + } +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ResourceSkuRestrictions.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ResourceSkuRestrictions.java new file mode 100644 index 000000000000..bf17728d9f43 --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ResourceSkuRestrictions.java @@ -0,0 +1,199 @@ +// Copyright (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.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; + +/** + * The restrictions of the SKU. + */ +@Fluent +public final class ResourceSkuRestrictions implements JsonSerializable { + /* + * the type of restrictions. + */ + private ResourceSkuRestrictionsType type; + + /* + * The value of restrictions. If the restriction type is set to location. This would be different locations where + * the SKU is restricted. + */ + private List values; + + /* + * The information about the restriction where the SKU cannot be used. + */ + private ResourceSkuRestrictionInfo restrictionInfo; + + /* + * the reason for restriction. + */ + private ResourceSkuRestrictionsReasonCode reasonCode; + + /** + * Creates an instance of ResourceSkuRestrictions class. + */ + public ResourceSkuRestrictions() { + } + + /** + * Get the type property: the type of restrictions. + * + * @return the type value. + */ + public ResourceSkuRestrictionsType type() { + return this.type; + } + + /** + * Set the type property: the type of restrictions. + * + * @param type the type value to set. + * @return the ResourceSkuRestrictions object itself. + */ + public ResourceSkuRestrictions withType(ResourceSkuRestrictionsType type) { + this.type = type; + return this; + } + + /** + * Get the values property: The value of restrictions. If the restriction type is set to location. This would be + * different locations where the SKU is restricted. + * + * @return the values value. + */ + public List values() { + return this.values; + } + + /** + * Set the values property: The value of restrictions. If the restriction type is set to location. This would be + * different locations where the SKU is restricted. + * + * @param values the values value to set. + * @return the ResourceSkuRestrictions object itself. + */ + public ResourceSkuRestrictions withValues(List values) { + this.values = values; + return this; + } + + /** + * Get the restrictionInfo property: The information about the restriction where the SKU cannot be used. + * + * @return the restrictionInfo value. + */ + public ResourceSkuRestrictionInfo restrictionInfo() { + return this.restrictionInfo; + } + + /** + * Set the restrictionInfo property: The information about the restriction where the SKU cannot be used. + * + * @param restrictionInfo the restrictionInfo value to set. + * @return the ResourceSkuRestrictions object itself. + */ + public ResourceSkuRestrictions withRestrictionInfo(ResourceSkuRestrictionInfo restrictionInfo) { + this.restrictionInfo = restrictionInfo; + return this; + } + + /** + * Get the reasonCode property: the reason for restriction. + * + * @return the reasonCode value. + */ + public ResourceSkuRestrictionsReasonCode reasonCode() { + return this.reasonCode; + } + + /** + * Set the reasonCode property: the reason for restriction. + * + * @param reasonCode the reasonCode value to set. + * @return the ResourceSkuRestrictions object itself. + */ + public ResourceSkuRestrictions withReasonCode(ResourceSkuRestrictionsReasonCode reasonCode) { + this.reasonCode = reasonCode; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (values() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property values in model ResourceSkuRestrictions")); + } + if (restrictionInfo() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property restrictionInfo in model ResourceSkuRestrictions")); + } else { + restrictionInfo().validate(); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(ResourceSkuRestrictions.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("values", this.values, (writer, element) -> writer.writeString(element)); + jsonWriter.writeJsonField("restrictionInfo", this.restrictionInfo); + jsonWriter.writeStringField("type", this.type == null ? null : this.type.toString()); + jsonWriter.writeStringField("reasonCode", this.reasonCode == null ? null : this.reasonCode.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ResourceSkuRestrictions from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ResourceSkuRestrictions if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the ResourceSkuRestrictions. + */ + public static ResourceSkuRestrictions fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ResourceSkuRestrictions deserializedResourceSkuRestrictions = new ResourceSkuRestrictions(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("values".equals(fieldName)) { + List values = reader.readArray(reader1 -> reader1.getString()); + deserializedResourceSkuRestrictions.values = values; + } else if ("restrictionInfo".equals(fieldName)) { + deserializedResourceSkuRestrictions.restrictionInfo = ResourceSkuRestrictionInfo.fromJson(reader); + } else if ("type".equals(fieldName)) { + deserializedResourceSkuRestrictions.type + = ResourceSkuRestrictionsType.fromString(reader.getString()); + } else if ("reasonCode".equals(fieldName)) { + deserializedResourceSkuRestrictions.reasonCode + = ResourceSkuRestrictionsReasonCode.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedResourceSkuRestrictions; + }); + } +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ResourceSkuRestrictionsReasonCode.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ResourceSkuRestrictionsReasonCode.java new file mode 100644 index 000000000000..298f53a04e23 --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ResourceSkuRestrictionsReasonCode.java @@ -0,0 +1,52 @@ +// Copyright (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 java.util.Collection; + +/** + * Describes the reason for SKU restriction. + */ +public final class ResourceSkuRestrictionsReasonCode extends ExpandableStringEnum { + /** + * Static value QuotaId for ResourceSkuRestrictionsReasonCode. + */ + public static final ResourceSkuRestrictionsReasonCode QUOTA_ID = fromString("QuotaId"); + + /** + * Static value NotAvailableForSubscription for ResourceSkuRestrictionsReasonCode. + */ + public static final ResourceSkuRestrictionsReasonCode NOT_AVAILABLE_FOR_SUBSCRIPTION + = fromString("NotAvailableForSubscription"); + + /** + * Creates a new instance of ResourceSkuRestrictionsReasonCode value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ResourceSkuRestrictionsReasonCode() { + } + + /** + * Creates or finds a ResourceSkuRestrictionsReasonCode from its string representation. + * + * @param name a name to look for. + * @return the corresponding ResourceSkuRestrictionsReasonCode. + */ + public static ResourceSkuRestrictionsReasonCode fromString(String name) { + return fromString(name, ResourceSkuRestrictionsReasonCode.class); + } + + /** + * Gets known ResourceSkuRestrictionsReasonCode values. + * + * @return known ResourceSkuRestrictionsReasonCode values. + */ + public static Collection values() { + return values(ResourceSkuRestrictionsReasonCode.class); + } +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ResourceSkuRestrictionsType.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ResourceSkuRestrictionsType.java new file mode 100644 index 000000000000..71980f37c168 --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ResourceSkuRestrictionsType.java @@ -0,0 +1,51 @@ +// Copyright (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 java.util.Collection; + +/** + * Describes the kind of SKU restrictions that can exist. + */ +public final class ResourceSkuRestrictionsType extends ExpandableStringEnum { + /** + * Static value Location for ResourceSkuRestrictionsType. + */ + public static final ResourceSkuRestrictionsType LOCATION = fromString("Location"); + + /** + * Static value Zone for ResourceSkuRestrictionsType. + */ + public static final ResourceSkuRestrictionsType ZONE = fromString("Zone"); + + /** + * Creates a new instance of ResourceSkuRestrictionsType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ResourceSkuRestrictionsType() { + } + + /** + * Creates or finds a ResourceSkuRestrictionsType from its string representation. + * + * @param name a name to look for. + * @return the corresponding ResourceSkuRestrictionsType. + */ + public static ResourceSkuRestrictionsType fromString(String name) { + return fromString(name, ResourceSkuRestrictionsType.class); + } + + /** + * Gets known ResourceSkuRestrictionsType values. + * + * @return known ResourceSkuRestrictionsType values. + */ + public static Collection values() { + return values(ResourceSkuRestrictionsType.class); + } +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ResourceSkuZoneDetails.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ResourceSkuZoneDetails.java new file mode 100644 index 000000000000..39415d775ccd --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/ResourceSkuZoneDetails.java @@ -0,0 +1,142 @@ +// Copyright (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.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; + +/** + * Describes The zonal capabilities of a SKU. + */ +@Fluent +public final class ResourceSkuZoneDetails implements JsonSerializable { + /* + * Gets the set of zones that the SKU is available in with the specified capabilities. + */ + private List name; + + /* + * A list of capabilities that are available for the SKU in the specified list of zones. + */ + private List capabilities; + + /** + * Creates an instance of ResourceSkuZoneDetails class. + */ + public ResourceSkuZoneDetails() { + } + + /** + * Get the name property: Gets the set of zones that the SKU is available in with the specified capabilities. + * + * @return the name value. + */ + public List name() { + return this.name; + } + + /** + * Set the name property: Gets the set of zones that the SKU is available in with the specified capabilities. + * + * @param name the name value to set. + * @return the ResourceSkuZoneDetails object itself. + */ + public ResourceSkuZoneDetails withName(List name) { + this.name = name; + return this; + } + + /** + * Get the capabilities property: A list of capabilities that are available for the SKU in the specified list of + * zones. + * + * @return the capabilities value. + */ + public List capabilities() { + return this.capabilities; + } + + /** + * Set the capabilities property: A list of capabilities that are available for the SKU in the specified list of + * zones. + * + * @param capabilities the capabilities value to set. + * @return the ResourceSkuZoneDetails object itself. + */ + public ResourceSkuZoneDetails withCapabilities(List capabilities) { + this.capabilities = capabilities; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (name() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property name in model ResourceSkuZoneDetails")); + } + if (capabilities() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property capabilities in model ResourceSkuZoneDetails")); + } else { + capabilities().forEach(e -> e.validate()); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(ResourceSkuZoneDetails.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("name", this.name, (writer, element) -> writer.writeString(element)); + jsonWriter.writeArrayField("capabilities", this.capabilities, (writer, element) -> writer.writeJson(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ResourceSkuZoneDetails from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ResourceSkuZoneDetails if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the ResourceSkuZoneDetails. + */ + public static ResourceSkuZoneDetails fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ResourceSkuZoneDetails deserializedResourceSkuZoneDetails = new ResourceSkuZoneDetails(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("name".equals(fieldName)) { + List name = reader.readArray(reader1 -> reader1.getString()); + deserializedResourceSkuZoneDetails.name = name; + } else if ("capabilities".equals(fieldName)) { + List capabilities + = reader.readArray(reader1 -> ResourceSkuCapabilities.fromJson(reader1)); + deserializedResourceSkuZoneDetails.capabilities = capabilities; + } else { + reader.skipChildren(); + } + } + + return deserializedResourceSkuZoneDetails; + }); + } +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/Skus.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/Skus.java new file mode 100644 index 000000000000..e62b3b06858d --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/Skus.java @@ -0,0 +1,33 @@ +// Copyright (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.util.Context; + +/** + * Resource collection API of Skus. + */ +public interface Skus { + /** + * A list of SKUs. + * + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return paged collection of ResourceSku items as paginated response with {@link PagedIterable}. + */ + PagedIterable list(); + + /** + * A list of SKUs. + * + * @param context The context to associate with this 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 paged collection of ResourceSku items 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/SpecializedHostProperties.java b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/SpecializedHostProperties.java new file mode 100644 index 000000000000..2f7d430d37b1 --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/models/SpecializedHostProperties.java @@ -0,0 +1,117 @@ +// Copyright (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.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * The properties of a specialized host. + */ +@Fluent +public final class SpecializedHostProperties extends HostProperties { + /* + * The kind of host + */ + private HostKind kind = HostKind.SPECIALIZED; + + /** + * Creates an instance of SpecializedHostProperties class. + */ + public SpecializedHostProperties() { + } + + /** + * Get the kind property: The kind of host. + * + * @return the kind value. + */ + @Override + public HostKind kind() { + return this.kind; + } + + /** + * {@inheritDoc} + */ + @Override + public SpecializedHostProperties withDisplayName(String displayName) { + super.withDisplayName(displayName); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public SpecializedHostProperties withMaintenance(HostMaintenance maintenance) { + super.withMaintenance(maintenance); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("displayName", displayName()); + jsonWriter.writeStringField("maintenance", maintenance() == null ? null : maintenance().toString()); + jsonWriter.writeStringField("kind", this.kind == null ? null : this.kind.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of SpecializedHostProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of SpecializedHostProperties if the JsonReader was pointing to an instance of it, or null if + * it was pointing to JSON null. + * @throws IOException If an error occurs while reading the SpecializedHostProperties. + */ + public static SpecializedHostProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + SpecializedHostProperties deserializedSpecializedHostProperties = new SpecializedHostProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("provisioningState".equals(fieldName)) { + deserializedSpecializedHostProperties + .withProvisioningState(HostProvisioningState.fromString(reader.getString())); + } else if ("displayName".equals(fieldName)) { + deserializedSpecializedHostProperties.withDisplayName(reader.getString()); + } else if ("moRefId".equals(fieldName)) { + deserializedSpecializedHostProperties.withMoRefId(reader.getString()); + } else if ("fqdn".equals(fieldName)) { + deserializedSpecializedHostProperties.withFqdn(reader.getString()); + } else if ("maintenance".equals(fieldName)) { + deserializedSpecializedHostProperties + .withMaintenance(HostMaintenance.fromString(reader.getString())); + } else if ("faultDomain".equals(fieldName)) { + deserializedSpecializedHostProperties.withFaultDomain(reader.getString()); + } else if ("kind".equals(fieldName)) { + deserializedSpecializedHostProperties.kind = HostKind.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedSpecializedHostProperties; + }); + } +} 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 d471b5290870..2531b7250b06 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 @@ -54,7 +54,7 @@ public interface VirtualMachine { String displayName(); /** - * Gets the moRefId property: Virtual machine managed object reference id. + * Gets the moRefId property: vCenter managed object reference ID of the virtual machine. * * @return the moRefId value. */ 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 3f358eca9c42..435cede9dc2f 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 @@ -77,7 +77,7 @@ Response getWithResponse(String resourceGroupName, String privat * @param privateCloudName Name of the private cloud. * @param clusterName Name of the cluster. * @param virtualMachineId ID of the virtual machine. - * @param restrictMovement The body type of the operation request. + * @param restrictMovement The content of the action 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. @@ -92,7 +92,7 @@ void restrictMovement(String resourceGroupName, String privateCloudName, String * @param privateCloudName Name of the private cloud. * @param clusterName Name of the cluster. * @param virtualMachineId ID of the virtual machine. - * @param restrictMovement The body type of the operation request. + * @param restrictMovement The content of the action 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. 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 7986c7508b4c..20a87d048c34 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 @@ -47,11 +47,6 @@ public final class VmHostPlacementPolicyProperties extends PlacementPolicyProper */ private AzureHybridBenefitType azureHybridBenefitType; - /* - * The provisioning state - */ - private PlacementPolicyProvisioningState provisioningState; - /** * Creates an instance of VmHostPlacementPolicyProperties class. */ @@ -168,16 +163,6 @@ public VmHostPlacementPolicyProperties withAzureHybridBenefitType(AzureHybridBen return this; } - /** - * Get the provisioningState property: The provisioning state. - * - * @return the provisioningState value. - */ - @Override - public PlacementPolicyProvisioningState provisioningState() { - return this.provisioningState; - } - /** * {@inheritDoc} */ @@ -264,8 +249,8 @@ public static VmHostPlacementPolicyProperties fromJson(JsonReader jsonReader) th } else if ("displayName".equals(fieldName)) { deserializedVmHostPlacementPolicyProperties.withDisplayName(reader.getString()); } else if ("provisioningState".equals(fieldName)) { - deserializedVmHostPlacementPolicyProperties.provisioningState - = PlacementPolicyProvisioningState.fromString(reader.getString()); + deserializedVmHostPlacementPolicyProperties + .withProvisioningState(PlacementPolicyProvisioningState.fromString(reader.getString())); } else if ("vmMembers".equals(fieldName)) { List vmMembers = reader.readArray(reader1 -> reader1.getString()); deserializedVmHostPlacementPolicyProperties.vmMembers = vmMembers; 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 6265781a8a53..32cdd42799bb 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 @@ -32,11 +32,6 @@ public final class VmPlacementPolicyProperties extends PlacementPolicyProperties */ private AffinityType affinityType; - /* - * The provisioning state - */ - private PlacementPolicyProvisioningState provisioningState; - /** * Creates an instance of VmPlacementPolicyProperties class. */ @@ -93,16 +88,6 @@ public VmPlacementPolicyProperties withAffinityType(AffinityType affinityType) { return this; } - /** - * Get the provisioningState property: The provisioning state. - * - * @return the provisioningState value. - */ - @Override - public PlacementPolicyProvisioningState provisioningState() { - return this.provisioningState; - } - /** * {@inheritDoc} */ @@ -178,8 +163,8 @@ public static VmPlacementPolicyProperties fromJson(JsonReader jsonReader) throws } else if ("displayName".equals(fieldName)) { deserializedVmPlacementPolicyProperties.withDisplayName(reader.getString()); } else if ("provisioningState".equals(fieldName)) { - deserializedVmPlacementPolicyProperties.provisioningState - = PlacementPolicyProvisioningState.fromString(reader.getString()); + deserializedVmPlacementPolicyProperties + .withProvisioningState(PlacementPolicyProvisioningState.fromString(reader.getString())); } else if ("vmMembers".equals(fieldName)) { List vmMembers = reader.readArray(reader1 -> reader1.getString()); deserializedVmPlacementPolicyProperties.vmMembers = vmMembers; 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 d17c49115834..313804d89a9f 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 @@ -26,16 +26,6 @@ public final class WorkloadNetworkDhcpRelay extends WorkloadNetworkDhcpEntity { */ private List serverAddresses; - /* - * The provisioning state - */ - private WorkloadNetworkDhcpProvisioningState provisioningState; - - /* - * NSX Segments consuming DHCP. - */ - private List segments; - /** * Creates an instance of WorkloadNetworkDhcpRelay class. */ @@ -72,26 +62,6 @@ public WorkloadNetworkDhcpRelay withServerAddresses(List serverAddresses return this; } - /** - * Get the provisioningState property: The provisioning state. - * - * @return the provisioningState value. - */ - @Override - public WorkloadNetworkDhcpProvisioningState provisioningState() { - return this.provisioningState; - } - - /** - * Get the segments property: NSX Segments consuming DHCP. - * - * @return the segments value. - */ - @Override - public List segments() { - return this.segments; - } - /** * {@inheritDoc} */ @@ -152,10 +122,10 @@ public static WorkloadNetworkDhcpRelay fromJson(JsonReader jsonReader) throws IO deserializedWorkloadNetworkDhcpRelay.withDisplayName(reader.getString()); } else if ("segments".equals(fieldName)) { List segments = reader.readArray(reader1 -> reader1.getString()); - deserializedWorkloadNetworkDhcpRelay.segments = segments; + deserializedWorkloadNetworkDhcpRelay.withSegments(segments); } else if ("provisioningState".equals(fieldName)) { - deserializedWorkloadNetworkDhcpRelay.provisioningState - = WorkloadNetworkDhcpProvisioningState.fromString(reader.getString()); + deserializedWorkloadNetworkDhcpRelay + .withProvisioningState(WorkloadNetworkDhcpProvisioningState.fromString(reader.getString())); } else if ("revision".equals(fieldName)) { deserializedWorkloadNetworkDhcpRelay.withRevision(reader.getNullable(JsonReader::getLong)); } else if ("dhcpType".equals(fieldName)) { 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 4893d866c68e..f75f2005416b 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 @@ -31,16 +31,6 @@ public final class WorkloadNetworkDhcpServer extends WorkloadNetworkDhcpEntity { */ private Long leaseTime; - /* - * The provisioning state - */ - private WorkloadNetworkDhcpProvisioningState provisioningState; - - /* - * NSX Segments consuming DHCP. - */ - private List segments; - /** * Creates an instance of WorkloadNetworkDhcpServer class. */ @@ -97,26 +87,6 @@ public WorkloadNetworkDhcpServer withLeaseTime(Long leaseTime) { return this; } - /** - * Get the provisioningState property: The provisioning state. - * - * @return the provisioningState value. - */ - @Override - public WorkloadNetworkDhcpProvisioningState provisioningState() { - return this.provisioningState; - } - - /** - * Get the segments property: NSX Segments consuming DHCP. - * - * @return the segments value. - */ - @Override - public List segments() { - return this.segments; - } - /** * {@inheritDoc} */ @@ -177,10 +147,10 @@ public static WorkloadNetworkDhcpServer fromJson(JsonReader jsonReader) throws I deserializedWorkloadNetworkDhcpServer.withDisplayName(reader.getString()); } else if ("segments".equals(fieldName)) { List segments = reader.readArray(reader1 -> reader1.getString()); - deserializedWorkloadNetworkDhcpServer.segments = segments; + deserializedWorkloadNetworkDhcpServer.withSegments(segments); } else if ("provisioningState".equals(fieldName)) { - deserializedWorkloadNetworkDhcpServer.provisioningState - = WorkloadNetworkDhcpProvisioningState.fromString(reader.getString()); + deserializedWorkloadNetworkDhcpServer + .withProvisioningState(WorkloadNetworkDhcpProvisioningState.fromString(reader.getString())); } else if ("revision".equals(fieldName)) { deserializedWorkloadNetworkDhcpServer.withRevision(reader.getNullable(JsonReader::getLong)); } else if ("dhcpType".equals(fieldName)) { 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 index 4c04471a4cd3..00316237bfe7 100644 --- 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 @@ -1 +1 @@ -[["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.GlobalReachConnectionsClientImpl$GlobalReachConnectionsService"],["com.azure.resourcemanager.avs.implementation.HcxEnterpriseSitesClientImpl$HcxEnterpriseSitesService"],["com.azure.resourcemanager.avs.implementation.IscsiPathsClientImpl$IscsiPathsService"],["com.azure.resourcemanager.avs.implementation.LocationsClientImpl$LocationsService"],["com.azure.resourcemanager.avs.implementation.OperationsClientImpl$OperationsService"],["com.azure.resourcemanager.avs.implementation.PlacementPoliciesClientImpl$PlacementPoliciesService"],["com.azure.resourcemanager.avs.implementation.PrivateCloudsClientImpl$PrivateCloudsService"],["com.azure.resourcemanager.avs.implementation.ScriptCmdletsClientImpl$ScriptCmdletsService"],["com.azure.resourcemanager.avs.implementation.ScriptExecutionsClientImpl$ScriptExecutionsService"],["com.azure.resourcemanager.avs.implementation.ScriptPackagesClientImpl$ScriptPackagesService"],["com.azure.resourcemanager.avs.implementation.VirtualMachinesClientImpl$VirtualMachinesService"],["com.azure.resourcemanager.avs.implementation.WorkloadNetworksClientImpl$WorkloadNetworksService"]] \ No newline at end of file +[["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.GlobalReachConnectionsClientImpl$GlobalReachConnectionsService"],["com.azure.resourcemanager.avs.implementation.HcxEnterpriseSitesClientImpl$HcxEnterpriseSitesService"],["com.azure.resourcemanager.avs.implementation.HostsClientImpl$HostsService"],["com.azure.resourcemanager.avs.implementation.IscsiPathsClientImpl$IscsiPathsService"],["com.azure.resourcemanager.avs.implementation.LocationsClientImpl$LocationsService"],["com.azure.resourcemanager.avs.implementation.OperationsClientImpl$OperationsService"],["com.azure.resourcemanager.avs.implementation.PlacementPoliciesClientImpl$PlacementPoliciesService"],["com.azure.resourcemanager.avs.implementation.PrivateCloudsClientImpl$PrivateCloudsService"],["com.azure.resourcemanager.avs.implementation.ProvisionedNetworksClientImpl$ProvisionedNetworksService"],["com.azure.resourcemanager.avs.implementation.PureStoragePoliciesClientImpl$PureStoragePoliciesService"],["com.azure.resourcemanager.avs.implementation.ScriptCmdletsClientImpl$ScriptCmdletsService"],["com.azure.resourcemanager.avs.implementation.ScriptExecutionsClientImpl$ScriptExecutionsService"],["com.azure.resourcemanager.avs.implementation.ScriptPackagesClientImpl$ScriptPackagesService"],["com.azure.resourcemanager.avs.implementation.SkusClientImpl$SkusService"],["com.azure.resourcemanager.avs.implementation.VirtualMachinesClientImpl$VirtualMachinesService"],["com.azure.resourcemanager.avs.implementation.WorkloadNetworksClientImpl$WorkloadNetworksService"]] \ No newline at end of file diff --git a/sdk/avs/azure-resourcemanager-avs/src/main/resources/azure-resourcemanager-avs.properties b/sdk/avs/azure-resourcemanager-avs/src/main/resources/azure-resourcemanager-avs.properties new file mode 100644 index 000000000000..defbd48204e4 --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/main/resources/azure-resourcemanager-avs.properties @@ -0,0 +1 @@ +version=${project.version} 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 14808360094a..77ac06708fec 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 @@ -15,7 +15,7 @@ public final class AddonsCreateOrUpdateSamples { /* * x-ms-original-file: - * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/Addons_CreateOrUpdate_HCX.json + * specification/vmware/resource-manager/Microsoft.AVS/stable/2024-09-01/examples/Addons_CreateOrUpdate_HCX.json */ /** * Sample code: Addons_CreateOrUpdate_HCX. @@ -32,7 +32,7 @@ public static void addonsCreateOrUpdateHCX(com.azure.resourcemanager.avs.AvsMana /* * x-ms-original-file: - * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/Addons_CreateOrUpdate_SRM.json + * specification/vmware/resource-manager/Microsoft.AVS/stable/2024-09-01/examples/Addons_CreateOrUpdate_SRM.json */ /** * Sample code: Addons_CreateOrUpdate_SRM. @@ -47,9 +47,28 @@ public static void addonsCreateOrUpdateSRM(com.azure.resourcemanager.avs.AvsMana .create(); } + /* + * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2024-09-01/examples/ + * Addons_CreateOrUpdate_HCX_With_Networks.json + */ + /** + * Sample code: Addons_CreateOrUpdate_HCX_With_Networks. + * + * @param manager Entry point to AvsManager. + */ + public static void addonsCreateOrUpdateHCXWithNetworks(com.azure.resourcemanager.avs.AvsManager manager) { + manager.addons() + .define("hcx") + .withExistingPrivateCloud("group1", "cloud1") + .withProperties(new AddonHcxProperties().withOffer("VMware MaaS Cloud Provider (Enterprise)") + .withManagementNetwork("10.3.1.0/24") + .withUplinkNetwork("10.3.2.0/24")) + .create(); + } + /* * x-ms-original-file: - * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/Addons_CreateOrUpdate_ArcReg.json + * specification/vmware/resource-manager/Microsoft.AVS/stable/2024-09-01/examples/Addons_CreateOrUpdate_ArcReg.json */ /** * Sample code: Addons_CreateOrUpdate_ArcReg. @@ -67,7 +86,7 @@ public static void addonsCreateOrUpdateArcReg(com.azure.resourcemanager.avs.AvsM /* * x-ms-original-file: - * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/Addons_CreateOrUpdate_VR.json + * specification/vmware/resource-manager/Microsoft.AVS/stable/2024-09-01/examples/Addons_CreateOrUpdate_VR.json */ /** * Sample code: Addons_CreateOrUpdate_VR. 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 f349917d9e7f..159a8e780384 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 @@ -10,7 +10,7 @@ public final class AddonsDeleteSamples { /* * x-ms-original-file: - * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/Addons_Delete.json + * specification/vmware/resource-manager/Microsoft.AVS/stable/2024-09-01/examples/Addons_Delete.json */ /** * Sample code: Addons_Delete. 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 56796ee7a6ac..256b09b241c7 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 @@ -10,7 +10,20 @@ public final class AddonsGetSamples { /* * x-ms-original-file: - * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/Addons_Get_SRM.json + * specification/vmware/resource-manager/Microsoft.AVS/stable/2024-09-01/examples/Addons_Get_HCX_With_Networks.json + */ + /** + * Sample code: Addons_Get_HCX_With_Networks. + * + * @param manager Entry point to AvsManager. + */ + public static void addonsGetHCXWithNetworks(com.azure.resourcemanager.avs.AvsManager manager) { + manager.addons().getWithResponse("group1", "cloud1", "hcx", com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: + * specification/vmware/resource-manager/Microsoft.AVS/stable/2024-09-01/examples/Addons_Get_SRM.json */ /** * Sample code: Addons_Get_SRM. @@ -23,7 +36,7 @@ public static void addonsGetSRM(com.azure.resourcemanager.avs.AvsManager manager /* * x-ms-original-file: - * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/Addons_Get_VR.json + * specification/vmware/resource-manager/Microsoft.AVS/stable/2024-09-01/examples/Addons_Get_VR.json */ /** * Sample code: Addons_Get_VR. @@ -36,7 +49,7 @@ public static void addonsGetVR(com.azure.resourcemanager.avs.AvsManager manager) /* * x-ms-original-file: - * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/Addons_Get_HCX.json + * specification/vmware/resource-manager/Microsoft.AVS/stable/2024-09-01/examples/Addons_Get_HCX.json */ /** * Sample code: Addons_Get_HCX. @@ -49,7 +62,7 @@ public static void addonsGetHCX(com.azure.resourcemanager.avs.AvsManager manager /* * x-ms-original-file: - * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/Addons_Get_ArcReg.json + * specification/vmware/resource-manager/Microsoft.AVS/stable/2024-09-01/examples/Addons_Get_ArcReg.json */ /** * Sample code: Addons_Get_ArcReg. 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 7a0ae9b4749f..fa1c95fb42d4 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 @@ -10,7 +10,7 @@ public final class AddonsListSamples { /* * x-ms-original-file: - * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/Addons_List.json + * specification/vmware/resource-manager/Microsoft.AVS/stable/2024-09-01/examples/Addons_List.json */ /** * Sample code: Addons_List. 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 63126d910ffd..a88cb98b2516 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 @@ -10,7 +10,7 @@ public final class AuthorizationsCreateOrUpdateSamples { /* * x-ms-original-file: - * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/Authorizations_CreateOrUpdate.json + * specification/vmware/resource-manager/Microsoft.AVS/stable/2024-09-01/examples/Authorizations_CreateOrUpdate.json */ /** * Sample code: Authorizations_CreateOrUpdate. 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 f8bbe20e72a2..96f9f8497600 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 @@ -10,7 +10,7 @@ public final class AuthorizationsDeleteSamples { /* * x-ms-original-file: - * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/Authorizations_Delete.json + * specification/vmware/resource-manager/Microsoft.AVS/stable/2024-09-01/examples/Authorizations_Delete.json */ /** * Sample code: Authorizations_Delete. 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 7feb82c8d993..a3f1771387c3 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 @@ -10,7 +10,7 @@ public final class AuthorizationsGetSamples { /* * x-ms-original-file: - * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/Authorizations_Get.json + * specification/vmware/resource-manager/Microsoft.AVS/stable/2024-09-01/examples/Authorizations_Get.json */ /** * Sample code: Authorizations_Get. 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 755f8e2f5628..ceced5f4c2ff 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 @@ -10,7 +10,7 @@ public final class AuthorizationsListSamples { /* * x-ms-original-file: - * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/Authorizations_List.json + * specification/vmware/resource-manager/Microsoft.AVS/stable/2024-09-01/examples/Authorizations_List.json */ /** * Sample code: Authorizations_List. 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 f6e45e40b639..935b29478593 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 @@ -10,7 +10,7 @@ public final class CloudLinksCreateOrUpdateSamples { /* * x-ms-original-file: - * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/CloudLinks_CreateOrUpdate.json + * specification/vmware/resource-manager/Microsoft.AVS/stable/2024-09-01/examples/CloudLinks_CreateOrUpdate.json */ /** * Sample code: CloudLinks_CreateOrUpdate. 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 31bf24f15c4a..3b822703116d 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 @@ -10,7 +10,7 @@ public final class CloudLinksDeleteSamples { /* * x-ms-original-file: - * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/CloudLinks_Delete.json + * specification/vmware/resource-manager/Microsoft.AVS/stable/2024-09-01/examples/CloudLinks_Delete.json */ /** * Sample code: CloudLinks_Delete. 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 177850fb751e..30a457fd8b23 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 @@ -10,7 +10,7 @@ public final class CloudLinksGetSamples { /* * x-ms-original-file: - * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/CloudLinks_Get.json + * specification/vmware/resource-manager/Microsoft.AVS/stable/2024-09-01/examples/CloudLinks_Get.json */ /** * Sample code: CloudLinks_Get. 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 d913adaf9ca0..d0247958126b 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 @@ -10,7 +10,7 @@ public final class CloudLinksListSamples { /* * x-ms-original-file: - * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/CloudLinks_List.json + * specification/vmware/resource-manager/Microsoft.AVS/stable/2024-09-01/examples/CloudLinks_List.json */ /** * Sample code: CloudLinks_List. 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 9d93bd1df9cd..10d21774e6c1 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 @@ -12,7 +12,7 @@ public final class ClustersCreateOrUpdateSamples { /* * x-ms-original-file: - * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/Clusters_CreateOrUpdate.json + * specification/vmware/resource-manager/Microsoft.AVS/stable/2024-09-01/examples/Clusters_CreateOrUpdate.json */ /** * Sample code: Clusters_CreateOrUpdate. 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 0b557c7795d3..0b097a29242b 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 @@ -10,7 +10,7 @@ public final class ClustersDeleteSamples { /* * x-ms-original-file: - * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/Clusters_Delete.json + * specification/vmware/resource-manager/Microsoft.AVS/stable/2024-09-01/examples/Clusters_Delete.json */ /** * Sample code: Clusters_Delete. 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 de560b3c5f44..6080ecfe4228 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 @@ -10,7 +10,7 @@ public final class ClustersGetSamples { /* * x-ms-original-file: - * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/Clusters_Get.json + * specification/vmware/resource-manager/Microsoft.AVS/stable/2024-09-01/examples/Clusters_Get.json */ /** * Sample code: Clusters_Get. 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 0e4975687763..a2187c68b98c 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 @@ -10,7 +10,7 @@ public final class ClustersListSamples { /* * x-ms-original-file: - * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/Clusters_List.json + * specification/vmware/resource-manager/Microsoft.AVS/stable/2024-09-01/examples/Clusters_List.json */ /** * Sample code: Clusters_List. 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 5b57800e6215..20d120f2b541 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 @@ -10,7 +10,7 @@ public final class ClustersListZonesSamples { /* * x-ms-original-file: - * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/Clusters_ListZones.json + * specification/vmware/resource-manager/Microsoft.AVS/stable/2024-09-01/examples/Clusters_ListZones.json */ /** * Sample code: Clusters_ListZones. @@ -23,7 +23,7 @@ public static void clustersListZones(com.azure.resourcemanager.avs.AvsManager ma /* * x-ms-original-file: - * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/Clusters_ListZones_Stretched.json + * specification/vmware/resource-manager/Microsoft.AVS/stable/2024-09-01/examples/Clusters_ListZones_Stretched.json */ /** * Sample code: Clusters_ListZones_Stretched. 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 97129bcee76e..a7398d778ada 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 @@ -12,7 +12,7 @@ public final class ClustersUpdateSamples { /* * x-ms-original-file: - * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/Clusters_Update.json + * specification/vmware/resource-manager/Microsoft.AVS/stable/2024-09-01/examples/Clusters_Update.json */ /** * Sample code: Clusters_Update. 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 66ed7169d9ae..54f2761df210 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 @@ -12,7 +12,7 @@ public final class DatastoresCreateOrUpdateSamples { /* * x-ms-original-file: - * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/Datastores_CreateOrUpdate.json + * specification/vmware/resource-manager/Microsoft.AVS/stable/2024-09-01/examples/Datastores_CreateOrUpdate.json */ /** * Sample code: Datastores_CreateOrUpdate. 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 c22c6754286e..e0272787a0bf 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 @@ -10,7 +10,7 @@ public final class DatastoresDeleteSamples { /* * x-ms-original-file: - * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/Datastores_Delete.json + * specification/vmware/resource-manager/Microsoft.AVS/stable/2024-09-01/examples/Datastores_Delete.json */ /** * Sample code: Datastores_Delete. 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 b0c624a7609b..4680f3bef733 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 @@ -10,7 +10,7 @@ public final class DatastoresGetSamples { /* * x-ms-original-file: - * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/Datastores_Get.json + * specification/vmware/resource-manager/Microsoft.AVS/stable/2024-09-01/examples/Datastores_Get.json */ /** * Sample code: Datastores_Get. 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 441a855fe062..66832070ead2 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 @@ -10,7 +10,7 @@ public final class DatastoresListSamples { /* * x-ms-original-file: - * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/Datastores_List.json + * specification/vmware/resource-manager/Microsoft.AVS/stable/2024-09-01/examples/Datastores_List.json */ /** * Sample code: Datastores_List. 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 83749f5e17a7..548d3c272d8e 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 @@ -9,7 +9,7 @@ */ public final class GlobalReachConnectionsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/ + * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2024-09-01/examples/ * GlobalReachConnections_CreateOrUpdate.json */ /** 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 599f2ffaf2a2..79553aad1a3c 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 @@ -10,7 +10,7 @@ public final class GlobalReachConnectionsDeleteSamples { /* * x-ms-original-file: - * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/GlobalReachConnections_Delete.json + * specification/vmware/resource-manager/Microsoft.AVS/stable/2024-09-01/examples/GlobalReachConnections_Delete.json */ /** * Sample code: GlobalReachConnections_Delete. 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 b1e02991c662..e50ac53129bd 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 @@ -10,7 +10,7 @@ public final class GlobalReachConnectionsGetSamples { /* * x-ms-original-file: - * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/GlobalReachConnections_Get.json + * specification/vmware/resource-manager/Microsoft.AVS/stable/2024-09-01/examples/GlobalReachConnections_Get.json */ /** * Sample code: GlobalReachConnections_Get. 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 3cb609a06eaa..775a3ed3406a 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 @@ -10,7 +10,7 @@ public final class GlobalReachConnectionsListSamples { /* * x-ms-original-file: - * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/GlobalReachConnections_List.json + * specification/vmware/resource-manager/Microsoft.AVS/stable/2024-09-01/examples/GlobalReachConnections_List.json */ /** * Sample code: GlobalReachConnections_List. 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 376bfde12df7..7ff1436a58a7 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 @@ -10,7 +10,7 @@ public final class HcxEnterpriseSitesCreateOrUpdateSamples { /* * x-ms-original-file: - * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/HcxEnterpriseSites_CreateOrUpdate. + * specification/vmware/resource-manager/Microsoft.AVS/stable/2024-09-01/examples/HcxEnterpriseSites_CreateOrUpdate. * json */ /** 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 2e2bf093711b..f7ec69c420b4 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 @@ -10,7 +10,7 @@ public final class HcxEnterpriseSitesDeleteSamples { /* * x-ms-original-file: - * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/HcxEnterpriseSites_Delete.json + * specification/vmware/resource-manager/Microsoft.AVS/stable/2024-09-01/examples/HcxEnterpriseSites_Delete.json */ /** * Sample code: HcxEnterpriseSites_Delete. 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 eaa84e987a75..1781a620917f 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 @@ -10,7 +10,7 @@ public final class HcxEnterpriseSitesGetSamples { /* * x-ms-original-file: - * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/HcxEnterpriseSites_Get.json + * specification/vmware/resource-manager/Microsoft.AVS/stable/2024-09-01/examples/HcxEnterpriseSites_Get.json */ /** * Sample code: HcxEnterpriseSites_Get. 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 d5144b06bc09..4939c8835fa2 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 @@ -10,7 +10,7 @@ public final class HcxEnterpriseSitesListSamples { /* * x-ms-original-file: - * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/HcxEnterpriseSites_List.json + * specification/vmware/resource-manager/Microsoft.AVS/stable/2024-09-01/examples/HcxEnterpriseSites_List.json */ /** * Sample code: HcxEnterpriseSites_List. diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/HostsGetSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/HostsGetSamples.java new file mode 100644 index 000000000000..4acb35b29296 --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/HostsGetSamples.java @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.avs.generated; + +/** + * Samples for Hosts Get. + */ +public final class HostsGetSamples { + /* + * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2024-09-01/examples/Hosts_Get.json + */ + /** + * Sample code: Hosts_Get. + * + * @param manager Entry point to AvsManager. + */ + public static void hostsGet(com.azure.resourcemanager.avs.AvsManager manager) { + manager.hosts() + .getWithResponse("group1", "cloud1", "cluster1", + "esx03-r52.1111111111111111111.westcentralus.prod.azure.com", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/HostsListSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/HostsListSamples.java new file mode 100644 index 000000000000..59a8e7bd46b8 --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/HostsListSamples.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 Hosts List. + */ +public final class HostsListSamples { + /* + * x-ms-original-file: + * specification/vmware/resource-manager/Microsoft.AVS/stable/2024-09-01/examples/Hosts_List.json + */ + /** + * Sample code: Hosts_List. + * + * @param manager Entry point to AvsManager. + */ + public static void hostsList(com.azure.resourcemanager.avs.AvsManager manager) { + manager.hosts().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/IscsiPathsCreateOrUpdateSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/IscsiPathsCreateOrUpdateSamples.java index 6692612b50b0..d87630995328 100644 --- 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 @@ -12,7 +12,7 @@ public final class IscsiPathsCreateOrUpdateSamples { /* * x-ms-original-file: - * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/IscsiPaths_CreateOrUpdate.json + * specification/vmware/resource-manager/Microsoft.AVS/stable/2024-09-01/examples/IscsiPaths_CreateOrUpdate.json */ /** * Sample code: IscsiPaths_CreateOrUpdate. 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 index 8fbfd8f8ec0e..86e60f011851 100644 --- 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 @@ -10,7 +10,7 @@ public final class IscsiPathsDeleteSamples { /* * x-ms-original-file: - * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/IscsiPaths_Delete.json + * specification/vmware/resource-manager/Microsoft.AVS/stable/2024-09-01/examples/IscsiPaths_Delete.json */ /** * Sample code: IscsiPaths_Delete. 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 index b29e1a44475e..a91a4fbd514d 100644 --- 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 @@ -10,7 +10,7 @@ public final class IscsiPathsGetSamples { /* * x-ms-original-file: - * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/IscsiPaths_Get.json + * specification/vmware/resource-manager/Microsoft.AVS/stable/2024-09-01/examples/IscsiPaths_Get.json */ /** * Sample code: IscsiPaths_Get. 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 index 0d70ce515a6d..fc5bd33952fb 100644 --- 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 @@ -10,7 +10,7 @@ public final class IscsiPathsListByPrivateCloudSamples { /* * x-ms-original-file: - * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/IscsiPaths_List.json + * specification/vmware/resource-manager/Microsoft.AVS/stable/2024-09-01/examples/IscsiPaths_List.json */ /** * Sample code: IscsiPaths_ListByPrivateCloud. 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 9333ca14d8f0..182d5ac2ff76 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 @@ -10,7 +10,7 @@ public final class LocationsCheckQuotaAvailabilitySamples { /* * x-ms-original-file: - * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/Locations_CheckQuotaAvailability. + * specification/vmware/resource-manager/Microsoft.AVS/stable/2024-09-01/examples/Locations_CheckQuotaAvailability. * json */ /** 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 d7d946e4f59c..5244a65e4ab5 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 @@ -12,7 +12,7 @@ public final class LocationsCheckTrialAvailabilitySamples { /* * x-ms-original-file: - * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/Locations_CheckTrialAvailability. + * specification/vmware/resource-manager/Microsoft.AVS/stable/2024-09-01/examples/Locations_CheckTrialAvailability. * json */ /** @@ -25,7 +25,7 @@ public static void locationsCheckTrialAvailability(com.azure.resourcemanager.avs } /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/ + * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2024-09-01/examples/ * Locations_CheckTrialAvailabilityWithSku.json */ /** 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 62dcbfe849ea..b37b9afa502c 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 @@ -10,7 +10,7 @@ public final class OperationsListSamples { /* * x-ms-original-file: - * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/Operations_List.json + * specification/vmware/resource-manager/Microsoft.AVS/stable/2024-09-01/examples/Operations_List.json */ /** * Sample code: Operations_List. 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 ab3c50e72903..d605eb6378ee 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 @@ -16,7 +16,7 @@ public final class PlacementPoliciesCreateOrUpdateSamples { /* * x-ms-original-file: - * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/PlacementPolicies_CreateOrUpdate. + * specification/vmware/resource-manager/Microsoft.AVS/stable/2024-09-01/examples/PlacementPolicies_CreateOrUpdate. * json */ /** 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 d4f1a53e00ce..03ace45e6bb5 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 @@ -10,7 +10,7 @@ public final class PlacementPoliciesDeleteSamples { /* * x-ms-original-file: - * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/PlacementPolicies_Delete.json + * specification/vmware/resource-manager/Microsoft.AVS/stable/2024-09-01/examples/PlacementPolicies_Delete.json */ /** * Sample code: PlacementPolicies_Delete. 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 f04e376a3462..0d6420c018e7 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 @@ -10,7 +10,7 @@ public final class PlacementPoliciesGetSamples { /* * x-ms-original-file: - * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/PlacementPolicies_Get.json + * specification/vmware/resource-manager/Microsoft.AVS/stable/2024-09-01/examples/PlacementPolicies_Get.json */ /** * Sample code: PlacementPolicies_Get. 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 16419e451921..7b13acf998f9 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 @@ -10,7 +10,7 @@ public final class PlacementPoliciesListSamples { /* * x-ms-original-file: - * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/PlacementPolicies_List.json + * specification/vmware/resource-manager/Microsoft.AVS/stable/2024-09-01/examples/PlacementPolicies_List.json */ /** * Sample code: PlacementPolicies_List. 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 7baf5fa7fd95..eb1c9453aa86 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 @@ -16,7 +16,7 @@ public final class PlacementPoliciesUpdateSamples { /* * x-ms-original-file: - * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/PlacementPolicies_Update.json + * specification/vmware/resource-manager/Microsoft.AVS/stable/2024-09-01/examples/PlacementPolicies_Update.json */ /** * Sample code: PlacementPolicies_Update. 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 3f10163d6eda..8375bb3e7c68 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 @@ -6,10 +6,12 @@ import com.azure.resourcemanager.avs.models.AvailabilityProperties; import com.azure.resourcemanager.avs.models.AvailabilityStrategy; +import com.azure.resourcemanager.avs.models.DnsZoneType; 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 java.util.Arrays; import java.util.HashMap; import java.util.Map; @@ -19,7 +21,7 @@ public final class PrivateCloudsCreateOrUpdateSamples { /* * x-ms-original-file: - * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/PrivateClouds_CreateOrUpdate.json + * specification/vmware/resource-manager/Microsoft.AVS/stable/2024-09-01/examples/PrivateClouds_CreateOrUpdate.json */ /** * Sample code: PrivateClouds_CreateOrUpdate. @@ -40,7 +42,53 @@ public static void privateCloudsCreateOrUpdate(com.azure.resourcemanager.avs.Avs } /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/ + * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2024-09-01/examples/ + * PrivateClouds_CreateOrUpdate_StretchedZones.json + */ + /** + * Sample code: PrivateClouds_CreateOrUpdate_StretchedZones. + * + * @param manager Entry point to AvsManager. + */ + public static void privateCloudsCreateOrUpdateStretchedZones(com.azure.resourcemanager.avs.AvsManager manager) { + manager.privateClouds() + .define("cloud1") + .withRegion("eastus2") + .withExistingResourceGroup("group1") + .withSku(new Sku().withName("AV36")) + .withTags(mapOf()) + .withZones(Arrays.asList("1", "2")) + .withManagementCluster(new ManagementCluster().withClusterSize(4)) + .withNetworkBlock("192.168.48.0/22") + .create(); + } + + /* + * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2024-09-01/examples/ + * PrivateClouds_CreateOrUpdate_FleetNative.json + */ + /** + * Sample code: PrivateClouds_CreateOrUpdate_FleetNative. + * + * @param manager Entry point to AvsManager. + */ + public static void privateCloudsCreateOrUpdateFleetNative(com.azure.resourcemanager.avs.AvsManager manager) { + manager.privateClouds() + .define("cloud1") + .withRegion("eastus2") + .withExistingResourceGroup("group1") + .withSku(new Sku().withName("AV64")) + .withTags(mapOf()) + .withManagementCluster(new ManagementCluster().withClusterSize(4)) + .withNetworkBlock("192.168.48.0/22") + .withVirtualNetworkId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.Network/virtualNetworks/vnet") + .withDnsZoneType(DnsZoneType.PRIVATE) + .create(); + } + + /* + * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2024-09-01/examples/ * PrivateClouds_CreateOrUpdate_Stretched.json */ /** 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 c868ab66c3de..810128f160f4 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 @@ -10,7 +10,7 @@ public final class PrivateCloudsDeleteSamples { /* * x-ms-original-file: - * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/PrivateClouds_Delete.json + * specification/vmware/resource-manager/Microsoft.AVS/stable/2024-09-01/examples/PrivateClouds_Delete.json */ /** * Sample code: PrivateClouds_Delete. 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 202da6f22009..d2763c9ab39f 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 @@ -10,7 +10,7 @@ public final class PrivateCloudsGetByResourceGroupSamples { /* * x-ms-original-file: - * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/PrivateClouds_Get.json + * specification/vmware/resource-manager/Microsoft.AVS/stable/2024-09-01/examples/PrivateClouds_Get.json */ /** * Sample code: PrivateClouds_Get. @@ -23,7 +23,7 @@ public static void privateCloudsGet(com.azure.resourcemanager.avs.AvsManager man /* * x-ms-original-file: - * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/PrivateClouds_Get_Stretched.json + * specification/vmware/resource-manager/Microsoft.AVS/stable/2024-09-01/examples/PrivateClouds_Get_Stretched.json */ /** * Sample code: PrivateClouds_Get_Stretched. 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 7270369f7aaa..18a44b0a180a 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 @@ -10,7 +10,7 @@ public final class PrivateCloudsListAdminCredentialsSamples { /* * x-ms-original-file: - * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/PrivateClouds_ListAdminCredentials + * specification/vmware/resource-manager/Microsoft.AVS/stable/2024-09-01/examples/PrivateClouds_ListAdminCredentials * .json */ /** 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 fbc4172d4db3..cd44bb98aec9 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 @@ -10,7 +10,7 @@ public final class PrivateCloudsListByResourceGroupSamples { /* * x-ms-original-file: - * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/PrivateClouds_List.json + * specification/vmware/resource-manager/Microsoft.AVS/stable/2024-09-01/examples/PrivateClouds_List.json */ /** * Sample code: PrivateClouds_List. @@ -23,7 +23,7 @@ public static void privateCloudsList(com.azure.resourcemanager.avs.AvsManager ma /* * x-ms-original-file: - * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/PrivateClouds_List_Stretched.json + * specification/vmware/resource-manager/Microsoft.AVS/stable/2024-09-01/examples/PrivateClouds_List_Stretched.json */ /** * Sample code: PrivateClouds_List_Stretched. 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 27e74043fc55..66f3f1d1e187 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 @@ -10,7 +10,7 @@ public final class PrivateCloudsListSamples { /* * x-ms-original-file: - * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/PrivateClouds_ListInSubscription. + * specification/vmware/resource-manager/Microsoft.AVS/stable/2024-09-01/examples/PrivateClouds_ListInSubscription. * json */ /** @@ -23,7 +23,7 @@ public static void privateCloudsListInSubscription(com.azure.resourcemanager.avs } /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/ + * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2024-09-01/examples/ * PrivateClouds_ListInSubscription_Stretched.json */ /** 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 2462a08fd927..c895688e9f5a 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 @@ -10,7 +10,7 @@ public final class PrivateCloudsRotateNsxtPasswordSamples { /* * x-ms-original-file: - * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/PrivateClouds_RotateNsxtPassword. + * specification/vmware/resource-manager/Microsoft.AVS/stable/2024-09-01/examples/PrivateClouds_RotateNsxtPassword. * json */ /** 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 cbefff7a2923..8ae6a14a26dc 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 @@ -9,7 +9,7 @@ */ public final class PrivateCloudsRotateVcenterPasswordSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/ + * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2024-09-01/examples/ * PrivateClouds_RotateVcenterPassword.json */ /** 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 12e8a6390f63..7d4dd5c05966 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 @@ -18,7 +18,7 @@ public final class PrivateCloudsUpdateSamples { /* * x-ms-original-file: - * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/PrivateClouds_Update.json + * specification/vmware/resource-manager/Microsoft.AVS/stable/2024-09-01/examples/PrivateClouds_Update.json */ /** * Sample code: PrivateClouds_Update. @@ -41,7 +41,7 @@ public static void privateCloudsUpdate(com.azure.resourcemanager.avs.AvsManager /* * x-ms-original-file: - * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/PrivateClouds_Update_Stretched. + * specification/vmware/resource-manager/Microsoft.AVS/stable/2024-09-01/examples/PrivateClouds_Update_Stretched. * json */ /** diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/ProvisionedNetworksGetSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/ProvisionedNetworksGetSamples.java new file mode 100644 index 000000000000..636d3339cf1c --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/ProvisionedNetworksGetSamples.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 ProvisionedNetworks Get. + */ +public final class ProvisionedNetworksGetSamples { + /* + * x-ms-original-file: + * specification/vmware/resource-manager/Microsoft.AVS/stable/2024-09-01/examples/ProvisionedNetworks_Get.json + */ + /** + * Sample code: ProvisionedNetworks_Get. + * + * @param manager Entry point to AvsManager. + */ + public static void provisionedNetworksGet(com.azure.resourcemanager.avs.AvsManager manager) { + manager.provisionedNetworks().getWithResponse("group1", "cloud1", "vsan", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/ProvisionedNetworksListSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/ProvisionedNetworksListSamples.java new file mode 100644 index 000000000000..4cec0f783b4e --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/ProvisionedNetworksListSamples.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 ProvisionedNetworks List. + */ +public final class ProvisionedNetworksListSamples { + /* + * x-ms-original-file: + * specification/vmware/resource-manager/Microsoft.AVS/stable/2024-09-01/examples/ProvisionedNetworks_List.json + */ + /** + * Sample code: ProvisionedNetworks_List. + * + * @param manager Entry point to AvsManager. + */ + public static void provisionedNetworksList(com.azure.resourcemanager.avs.AvsManager manager) { + manager.provisionedNetworks().list("group1", "cloud1", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/PureStoragePoliciesCreateOrUpdateSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/PureStoragePoliciesCreateOrUpdateSamples.java new file mode 100644 index 000000000000..327a15b1feca --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/PureStoragePoliciesCreateOrUpdateSamples.java @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.avs.generated; + +/** + * Samples for PureStoragePolicies CreateOrUpdate. + */ +public final class PureStoragePoliciesCreateOrUpdateSamples { + /* + * x-ms-original-file: + * specification/vmware/resource-manager/Microsoft.AVS/stable/2024-09-01/examples/PureStoragePolicies_CreateOrUpdate + * .json + */ + /** + * Sample code: PureStoragePolicies_CreateOrUpdate. + * + * @param manager Entry point to AvsManager. + */ + public static void pureStoragePoliciesCreateOrUpdate(com.azure.resourcemanager.avs.AvsManager manager) { + manager.pureStoragePolicies() + .define("storagePolicy1") + .withExistingPrivateCloud("group1", "cloud1") + .withStoragePolicyDefinition("storagePolicyDefinition1") + .withStoragePoolId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/PureStorage.Block/storagePools/storagePool1") + .create(); + } +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/PureStoragePoliciesDeleteSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/PureStoragePoliciesDeleteSamples.java new file mode 100644 index 000000000000..5741c65c144c --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/PureStoragePoliciesDeleteSamples.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 PureStoragePolicies Delete. + */ +public final class PureStoragePoliciesDeleteSamples { + /* + * x-ms-original-file: + * specification/vmware/resource-manager/Microsoft.AVS/stable/2024-09-01/examples/PureStoragePolicies_Delete.json + */ + /** + * Sample code: PureStoragePolicies_Delete. + * + * @param manager Entry point to AvsManager. + */ + public static void pureStoragePoliciesDelete(com.azure.resourcemanager.avs.AvsManager manager) { + manager.pureStoragePolicies().delete("group1", "cloud1", "storagePolicy1", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/PureStoragePoliciesGetSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/PureStoragePoliciesGetSamples.java new file mode 100644 index 000000000000..c08d8ba6fc31 --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/PureStoragePoliciesGetSamples.java @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.avs.generated; + +/** + * Samples for PureStoragePolicies Get. + */ +public final class PureStoragePoliciesGetSamples { + /* + * x-ms-original-file: + * specification/vmware/resource-manager/Microsoft.AVS/stable/2024-09-01/examples/PureStoragePolicies_Get.json + */ + /** + * Sample code: PureStoragePolicies_Get. + * + * @param manager Entry point to AvsManager. + */ + public static void pureStoragePoliciesGet(com.azure.resourcemanager.avs.AvsManager manager) { + manager.pureStoragePolicies() + .getWithResponse("group1", "cloud1", "storagePolicy1", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/PureStoragePoliciesListSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/PureStoragePoliciesListSamples.java new file mode 100644 index 000000000000..ba6775d75a5f --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/PureStoragePoliciesListSamples.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 PureStoragePolicies List. + */ +public final class PureStoragePoliciesListSamples { + /* + * x-ms-original-file: + * specification/vmware/resource-manager/Microsoft.AVS/stable/2024-09-01/examples/PureStoragePolicies_List.json + */ + /** + * Sample code: PureStoragePolicies_List. + * + * @param manager Entry point to AvsManager. + */ + public static void pureStoragePoliciesList(com.azure.resourcemanager.avs.AvsManager manager) { + manager.pureStoragePolicies().list("group1", "cloud1", com.azure.core.util.Context.NONE); + } +} 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 7085f9340ff2..f2ec938eadc4 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 @@ -10,7 +10,7 @@ public final class ScriptCmdletsGetSamples { /* * x-ms-original-file: - * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/ScriptCmdlets_Get.json + * specification/vmware/resource-manager/Microsoft.AVS/stable/2024-09-01/examples/ScriptCmdlets_Get.json */ /** * Sample code: ScriptCmdlets_Get. 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 957a11dc2138..1a16b8d644b7 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 @@ -10,7 +10,7 @@ public final class ScriptCmdletsListSamples { /* * x-ms-original-file: - * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/ScriptCmdlets_List.json + * specification/vmware/resource-manager/Microsoft.AVS/stable/2024-09-01/examples/ScriptCmdlets_List.json */ /** * Sample code: ScriptCmdlets_List. 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 42b8d0c621b9..ba6225f701ef 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 @@ -14,7 +14,7 @@ public final class ScriptExecutionsCreateOrUpdateSamples { /* * x-ms-original-file: - * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/ScriptExecutions_CreateOrUpdate. + * specification/vmware/resource-manager/Microsoft.AVS/stable/2024-09-01/examples/ScriptExecutions_CreateOrUpdate. * json */ /** 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 e263d2c4fe39..ad87376a3a1e 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 @@ -10,7 +10,7 @@ public final class ScriptExecutionsDeleteSamples { /* * x-ms-original-file: - * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/ScriptExecutions_Delete.json + * specification/vmware/resource-manager/Microsoft.AVS/stable/2024-09-01/examples/ScriptExecutions_Delete.json */ /** * Sample code: ScriptExecutions_Delete. 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 858d244c467d..b144649adba4 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 @@ -13,7 +13,7 @@ public final class ScriptExecutionsGetExecutionLogsSamples { /* * x-ms-original-file: - * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/ScriptExecutions_GetExecutionLogs. + * specification/vmware/resource-manager/Microsoft.AVS/stable/2024-09-01/examples/ScriptExecutions_GetExecutionLogs. * json */ /** 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 c21f63f849cc..75883ed2b985 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 @@ -10,7 +10,7 @@ public final class ScriptExecutionsGetSamples { /* * x-ms-original-file: - * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/ScriptExecutions_Get.json + * specification/vmware/resource-manager/Microsoft.AVS/stable/2024-09-01/examples/ScriptExecutions_Get.json */ /** * Sample code: ScriptExecutions_Get. 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 5a5942f94752..f4409016a3b4 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 @@ -10,7 +10,7 @@ public final class ScriptExecutionsListSamples { /* * x-ms-original-file: - * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/ScriptExecutions_List.json + * specification/vmware/resource-manager/Microsoft.AVS/stable/2024-09-01/examples/ScriptExecutions_List.json */ /** * Sample code: ScriptExecutions_List. 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 09291ebf89e3..f6a3e574c7ec 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 @@ -10,7 +10,7 @@ public final class ScriptPackagesGetSamples { /* * x-ms-original-file: - * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/ScriptPackages_Get.json + * specification/vmware/resource-manager/Microsoft.AVS/stable/2024-09-01/examples/ScriptPackages_Get.json */ /** * Sample code: ScriptPackages_Get. 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 e2c896b5e958..f18a3dcfae88 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 @@ -10,7 +10,7 @@ public final class ScriptPackagesListSamples { /* * x-ms-original-file: - * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/ScriptPackages_List.json + * specification/vmware/resource-manager/Microsoft.AVS/stable/2024-09-01/examples/ScriptPackages_List.json */ /** * Sample code: ScriptPackages_List. diff --git a/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/SkusListSamples.java b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/SkusListSamples.java new file mode 100644 index 000000000000..7f50e45b0b46 --- /dev/null +++ b/sdk/avs/azure-resourcemanager-avs/src/samples/java/com/azure/resourcemanager/avs/generated/SkusListSamples.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.avs.generated; + +/** + * Samples for Skus List. + */ +public final class SkusListSamples { + /* + * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2024-09-01/examples/Skus_List.json + */ + /** + * Sample code: Skus_List. + * + * @param manager Entry point to AvsManager. + */ + public static void skusList(com.azure.resourcemanager.avs.AvsManager manager) { + manager.skus().list(com.azure.core.util.Context.NONE); + } +} 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 db8eb3d2b557..92eab4681145 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 @@ -10,7 +10,7 @@ public final class VirtualMachinesGetSamples { /* * x-ms-original-file: - * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/VirtualMachines_Get.json + * specification/vmware/resource-manager/Microsoft.AVS/stable/2024-09-01/examples/VirtualMachines_Get.json */ /** * Sample code: VirtualMachines_Get. 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 8150b0f0502b..d12d6a3de169 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 @@ -10,7 +10,7 @@ public final class VirtualMachinesListSamples { /* * x-ms-original-file: - * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/VirtualMachines_List.json + * specification/vmware/resource-manager/Microsoft.AVS/stable/2024-09-01/examples/VirtualMachines_List.json */ /** * Sample code: VirtualMachines_List. 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 532bd590087e..c6783d928847 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 @@ -13,7 +13,7 @@ public final class VirtualMachinesRestrictMovementSamples { /* * x-ms-original-file: - * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/VirtualMachines_RestrictMovement. + * specification/vmware/resource-manager/Microsoft.AVS/stable/2024-09-01/examples/VirtualMachines_RestrictMovement. * json */ /** 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 a7f2f3481545..ae1529102949 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 @@ -12,7 +12,7 @@ public final class WorkloadNetworksCreateDhcpSamples { /* * x-ms-original-file: - * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/WorkloadNetworks_CreateDhcp.json + * specification/vmware/resource-manager/Microsoft.AVS/stable/2024-09-01/examples/WorkloadNetworks_CreateDhcp.json */ /** * Sample code: WorkloadNetworks_CreateDhcp. 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 a879ef1a29b9..dddc29892d17 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 @@ -13,7 +13,7 @@ public final class WorkloadNetworksCreateDnsServiceSamples { /* * x-ms-original-file: - * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/WorkloadNetworks_CreateDnsService. + * specification/vmware/resource-manager/Microsoft.AVS/stable/2024-09-01/examples/WorkloadNetworks_CreateDnsService. * json */ /** 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 ed2723863ceb..ec909de59de3 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 @@ -12,7 +12,7 @@ public final class WorkloadNetworksCreateDnsZoneSamples { /* * x-ms-original-file: - * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/WorkloadNetworks_CreateDnsZone. + * specification/vmware/resource-manager/Microsoft.AVS/stable/2024-09-01/examples/WorkloadNetworks_CreateDnsZone. * json */ /** 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 f7e36c56893b..29bd64469855 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 @@ -11,7 +11,7 @@ */ public final class WorkloadNetworksCreatePortMirroringSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/ + * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2024-09-01/examples/ * WorkloadNetworks_CreatePortMirroring.json */ /** 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 f92d63b19b59..a1254fd9981f 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 @@ -10,7 +10,7 @@ public final class WorkloadNetworksCreatePublicIpSamples { /* * x-ms-original-file: - * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/WorkloadNetworks_CreatePublicIP. + * specification/vmware/resource-manager/Microsoft.AVS/stable/2024-09-01/examples/WorkloadNetworks_CreatePublicIP. * json */ /** 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 7577ae0ffc74..13280901e318 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 @@ -13,7 +13,7 @@ public final class WorkloadNetworksCreateSegmentsSamples { /* * x-ms-original-file: - * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/WorkloadNetworks_CreateSegments. + * specification/vmware/resource-manager/Microsoft.AVS/stable/2024-09-01/examples/WorkloadNetworks_CreateSegments. * json */ /** 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 e01895921c80..8a2cfaaabeda 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 @@ -12,7 +12,7 @@ public final class WorkloadNetworksCreateVMGroupSamples { /* * x-ms-original-file: - * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/WorkloadNetworks_CreateVMGroup. + * specification/vmware/resource-manager/Microsoft.AVS/stable/2024-09-01/examples/WorkloadNetworks_CreateVMGroup. * json */ /** 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 780de3a30f30..965adaac699d 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 @@ -10,7 +10,7 @@ public final class WorkloadNetworksDeleteDhcpSamples { /* * x-ms-original-file: - * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/WorkloadNetworks_DeleteDhcp.json + * specification/vmware/resource-manager/Microsoft.AVS/stable/2024-09-01/examples/WorkloadNetworks_DeleteDhcp.json */ /** * Sample code: WorkloadNetworks_DeleteDhcp. 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 9a4349156f10..961950c23940 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 @@ -10,7 +10,7 @@ public final class WorkloadNetworksDeleteDnsServiceSamples { /* * x-ms-original-file: - * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/WorkloadNetworks_DeleteDnsService. + * specification/vmware/resource-manager/Microsoft.AVS/stable/2024-09-01/examples/WorkloadNetworks_DeleteDnsService. * json */ /** 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 ce11038d50ab..f381a3f697ff 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 @@ -10,7 +10,7 @@ public final class WorkloadNetworksDeleteDnsZoneSamples { /* * x-ms-original-file: - * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/WorkloadNetworks_DeleteDnsZone. + * specification/vmware/resource-manager/Microsoft.AVS/stable/2024-09-01/examples/WorkloadNetworks_DeleteDnsZone. * json */ /** 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 81ff664a078d..035c9dfcc335 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 @@ -9,7 +9,7 @@ */ public final class WorkloadNetworksDeletePortMirroringSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/ + * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2024-09-01/examples/ * WorkloadNetworks_DeletePortMirroring.json */ /** 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 4e06022c3d80..27e55b3d9da1 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 @@ -10,7 +10,7 @@ public final class WorkloadNetworksDeletePublicIpSamples { /* * x-ms-original-file: - * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/WorkloadNetworks_DeletePublicIP. + * specification/vmware/resource-manager/Microsoft.AVS/stable/2024-09-01/examples/WorkloadNetworks_DeletePublicIP. * json */ /** 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 dfe14529d014..70004dc53183 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 @@ -10,7 +10,7 @@ public final class WorkloadNetworksDeleteSegmentSamples { /* * x-ms-original-file: - * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/WorkloadNetworks_DeleteSegment. + * specification/vmware/resource-manager/Microsoft.AVS/stable/2024-09-01/examples/WorkloadNetworks_DeleteSegment. * json */ /** 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 ae56319d52b7..d96c06269cf8 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 @@ -10,7 +10,7 @@ public final class WorkloadNetworksDeleteVMGroupSamples { /* * x-ms-original-file: - * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/WorkloadNetworks_DeleteVMGroup. + * specification/vmware/resource-manager/Microsoft.AVS/stable/2024-09-01/examples/WorkloadNetworks_DeleteVMGroup. * json */ /** 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 9de666b36391..944cb2f5ce31 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 @@ -10,7 +10,7 @@ public final class WorkloadNetworksGetDhcpSamples { /* * x-ms-original-file: - * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/WorkloadNetworks_GetDhcp.json + * specification/vmware/resource-manager/Microsoft.AVS/stable/2024-09-01/examples/WorkloadNetworks_GetDhcp.json */ /** * Sample code: WorkloadNetworks_GetDhcp. 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 0cc858bd9c10..85bd6033e00e 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 @@ -10,7 +10,7 @@ public final class WorkloadNetworksGetDnsServiceSamples { /* * x-ms-original-file: - * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/WorkloadNetworks_GetDnsService. + * specification/vmware/resource-manager/Microsoft.AVS/stable/2024-09-01/examples/WorkloadNetworks_GetDnsService. * json */ /** 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 c2815fcbc12e..b3e019266a83 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 @@ -10,7 +10,7 @@ public final class WorkloadNetworksGetDnsZoneSamples { /* * x-ms-original-file: - * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/WorkloadNetworks_GetDnsZone.json + * specification/vmware/resource-manager/Microsoft.AVS/stable/2024-09-01/examples/WorkloadNetworks_GetDnsZone.json */ /** * Sample code: WorkloadNetworks_GetDnsZone. 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 f3486b81b19d..2c3f7c21c61b 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 @@ -10,7 +10,7 @@ public final class WorkloadNetworksGetGatewaySamples { /* * x-ms-original-file: - * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/WorkloadNetworks_GetGateway.json + * specification/vmware/resource-manager/Microsoft.AVS/stable/2024-09-01/examples/WorkloadNetworks_GetGateway.json */ /** * Sample code: WorkloadNetworks_GetGateway. 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 7df72bd5cdd6..f27fc4adb65e 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 @@ -10,7 +10,7 @@ public final class WorkloadNetworksGetPortMirroringSamples { /* * x-ms-original-file: - * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/WorkloadNetworks_GetPortMirroring. + * specification/vmware/resource-manager/Microsoft.AVS/stable/2024-09-01/examples/WorkloadNetworks_GetPortMirroring. * json */ /** 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 afec46a6e605..e97049ef490a 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 @@ -10,7 +10,7 @@ public final class WorkloadNetworksGetPublicIpSamples { /* * x-ms-original-file: - * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/WorkloadNetworks_GetPublicIP.json + * specification/vmware/resource-manager/Microsoft.AVS/stable/2024-09-01/examples/WorkloadNetworks_GetPublicIP.json */ /** * Sample code: WorkloadNetworks_GetPublicIP. 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 31a9a042420e..45eedb67c88c 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 @@ -10,7 +10,7 @@ public final class WorkloadNetworksGetSamples { /* * x-ms-original-file: - * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/WorkloadNetworks_Get.json + * specification/vmware/resource-manager/Microsoft.AVS/stable/2024-09-01/examples/WorkloadNetworks_Get.json */ /** * Sample code: WorkloadNetworks_Get. 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 2ba3e5817545..81e5f6bd10aa 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 @@ -10,7 +10,7 @@ public final class WorkloadNetworksGetSegmentSamples { /* * x-ms-original-file: - * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/WorkloadNetworks_GetSegment.json + * specification/vmware/resource-manager/Microsoft.AVS/stable/2024-09-01/examples/WorkloadNetworks_GetSegment.json */ /** * Sample code: WorkloadNetworks_GetSegment. 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 d48a6294e819..a7b09c9b6281 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 @@ -10,7 +10,7 @@ public final class WorkloadNetworksGetVMGroupSamples { /* * x-ms-original-file: - * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/WorkloadNetworks_GetVMGroup.json + * specification/vmware/resource-manager/Microsoft.AVS/stable/2024-09-01/examples/WorkloadNetworks_GetVMGroup.json */ /** * Sample code: WorkloadNetworks_GetVMGroup. 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 d09cfb5bda60..82bcd2525deb 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 @@ -10,7 +10,7 @@ public final class WorkloadNetworksGetVirtualMachineSamples { /* * x-ms-original-file: - * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/WorkloadNetworks_GetVirtualMachine + * specification/vmware/resource-manager/Microsoft.AVS/stable/2024-09-01/examples/WorkloadNetworks_GetVirtualMachine * .json */ /** 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 4c8a87521a6d..911e92e41378 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 @@ -10,7 +10,7 @@ public final class WorkloadNetworksListDhcpSamples { /* * x-ms-original-file: - * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/WorkloadNetworks_ListDhcp.json + * specification/vmware/resource-manager/Microsoft.AVS/stable/2024-09-01/examples/WorkloadNetworks_ListDhcp.json */ /** * Sample code: WorkloadNetworks_ListDhcp. 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 60a4bc737357..9b3e278ca5fe 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 @@ -10,7 +10,7 @@ public final class WorkloadNetworksListDnsServicesSamples { /* * x-ms-original-file: - * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/WorkloadNetworks_ListDnsServices. + * specification/vmware/resource-manager/Microsoft.AVS/stable/2024-09-01/examples/WorkloadNetworks_ListDnsServices. * json */ /** 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 f9764ac62cc2..28fb42c325ca 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 @@ -10,7 +10,7 @@ public final class WorkloadNetworksListDnsZonesSamples { /* * x-ms-original-file: - * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/WorkloadNetworks_ListDnsZones.json + * specification/vmware/resource-manager/Microsoft.AVS/stable/2024-09-01/examples/WorkloadNetworks_ListDnsZones.json */ /** * Sample code: WorkloadNetworks_ListDnsZones. 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 c403f2db1160..f855a27f00c9 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 @@ -10,7 +10,7 @@ public final class WorkloadNetworksListGatewaysSamples { /* * x-ms-original-file: - * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/WorkloadNetworks_ListGateways.json + * specification/vmware/resource-manager/Microsoft.AVS/stable/2024-09-01/examples/WorkloadNetworks_ListGateways.json */ /** * Sample code: WorkloadNetworks_ListGateways. 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 e3f773675e00..b2fd0745dc10 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 @@ -10,7 +10,7 @@ public final class WorkloadNetworksListPortMirroringSamples { /* * x-ms-original-file: - * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/WorkloadNetworks_ListPortMirroring + * specification/vmware/resource-manager/Microsoft.AVS/stable/2024-09-01/examples/WorkloadNetworks_ListPortMirroring * .json */ /** 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 e6e186c759ae..b3b1c40a1bfe 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 @@ -10,7 +10,7 @@ public final class WorkloadNetworksListPublicIPsSamples { /* * x-ms-original-file: - * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/WorkloadNetworks_ListPublicIPs. + * specification/vmware/resource-manager/Microsoft.AVS/stable/2024-09-01/examples/WorkloadNetworks_ListPublicIPs. * json */ /** 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 d22de3e3f03e..d2de7841e80a 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 @@ -10,7 +10,7 @@ public final class WorkloadNetworksListSamples { /* * x-ms-original-file: - * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/WorkloadNetworks_List.json + * specification/vmware/resource-manager/Microsoft.AVS/stable/2024-09-01/examples/WorkloadNetworks_List.json */ /** * Sample code: WorkloadNetworks_List. 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 d7a18c67ed24..4f07c4faa673 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 @@ -10,7 +10,7 @@ public final class WorkloadNetworksListSegmentsSamples { /* * x-ms-original-file: - * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/WorkloadNetworks_ListSegments.json + * specification/vmware/resource-manager/Microsoft.AVS/stable/2024-09-01/examples/WorkloadNetworks_ListSegments.json */ /** * Sample code: WorkloadNetworks_ListSegments. 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 4f2dfa22f588..6aebb778c5c0 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 @@ -10,7 +10,7 @@ public final class WorkloadNetworksListVMGroupsSamples { /* * x-ms-original-file: - * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/WorkloadNetworks_ListVMGroups.json + * specification/vmware/resource-manager/Microsoft.AVS/stable/2024-09-01/examples/WorkloadNetworks_ListVMGroups.json */ /** * Sample code: WorkloadNetworks_ListVMGroups. 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 bc01084c6c1d..6655e1c58703 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 @@ -9,7 +9,7 @@ */ public final class WorkloadNetworksListVirtualMachinesSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/ + * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2024-09-01/examples/ * WorkloadNetworks_ListVirtualMachines.json */ /** 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 7b51cb0dd66a..4210c151149e 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 @@ -13,7 +13,7 @@ public final class WorkloadNetworksUpdateDhcpSamples { /* * x-ms-original-file: - * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/WorkloadNetworks_UpdateDhcp.json + * specification/vmware/resource-manager/Microsoft.AVS/stable/2024-09-01/examples/WorkloadNetworks_UpdateDhcp.json */ /** * Sample code: WorkloadNetworks_UpdateDhcp. 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 a0cefc025c24..a6874a0d0ade 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 @@ -14,7 +14,7 @@ public final class WorkloadNetworksUpdateDnsServiceSamples { /* * x-ms-original-file: - * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/WorkloadNetworks_UpdateDnsService. + * specification/vmware/resource-manager/Microsoft.AVS/stable/2024-09-01/examples/WorkloadNetworks_UpdateDnsService. * json */ /** 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 a965cdc801c9..43d84059d217 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 @@ -13,7 +13,7 @@ public final class WorkloadNetworksUpdateDnsZoneSamples { /* * x-ms-original-file: - * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/WorkloadNetworks_UpdateDnsZone. + * specification/vmware/resource-manager/Microsoft.AVS/stable/2024-09-01/examples/WorkloadNetworks_UpdateDnsZone. * json */ /** 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 476b91caecee..d26dc721119f 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 @@ -12,7 +12,7 @@ */ public final class WorkloadNetworksUpdatePortMirroringSamples { /* - * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/ + * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2024-09-01/examples/ * WorkloadNetworks_UpdatePortMirroring.json */ /** 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 6a0c67fff5dc..e2437021372a 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 @@ -14,7 +14,7 @@ public final class WorkloadNetworksUpdateSegmentsSamples { /* * x-ms-original-file: - * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/WorkloadNetworks_UpdateSegments. + * specification/vmware/resource-manager/Microsoft.AVS/stable/2024-09-01/examples/WorkloadNetworks_UpdateSegments. * json */ /** 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 a0b31ee0c370..bb469121b094 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 @@ -13,7 +13,7 @@ public final class WorkloadNetworksUpdateVMGroupSamples { /* * x-ms-original-file: - * specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/WorkloadNetworks_UpdateVMGroup. + * specification/vmware/resource-manager/Microsoft.AVS/stable/2024-09-01/examples/WorkloadNetworks_UpdateVMGroup. * json */ /** 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 a622cc4d89ae..000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/AddonArcPropertiesTests.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.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\":\"oezbrhubsk\",\"provisioningState\":\"Deleting\"}") - .toObject(AddonArcProperties.class); - Assertions.assertEquals("oezbrhubsk", model.vCenter()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AddonArcProperties model = new AddonArcProperties().withVCenter("oezbrhubsk"); - model = BinaryData.fromObject(model).toObject(AddonArcProperties.class); - Assertions.assertEquals("oezbrhubsk", 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 4e13501c0543..000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/AddonHcxPropertiesTests.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.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\":\"ygo\",\"provisioningState\":\"Succeeded\"}") - .toObject(AddonHcxProperties.class); - Assertions.assertEquals("ygo", model.offer()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AddonHcxProperties model = new AddonHcxProperties().withOffer("ygo"); - model = BinaryData.fromObject(model).toObject(AddonHcxProperties.class); - Assertions.assertEquals("ygo", 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 3af28f82ca5a..000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/AddonInnerTests.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.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\":\"dtopbob\",\"name\":\"og\",\"type\":\"m\"}") - .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 a96ced57501e..000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/AddonListTests.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.AddonInner; -import com.azure.resourcemanager.avs.models.AddonList; -import com.azure.resourcemanager.avs.models.AddonProperties; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class AddonListTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - AddonList model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"addonType\":\"AddonProperties\",\"provisioningState\":\"Failed\"},\"id\":\"j\",\"name\":\"oejctbzaqsqsy\",\"type\":\"bkbfkgukdkex\"},{\"properties\":{\"addonType\":\"AddonProperties\",\"provisioningState\":\"Succeeded\"},\"id\":\"mxaxc\",\"name\":\"jpgd\",\"type\":\"toc\"},{\"properties\":{\"addonType\":\"AddonProperties\",\"provisioningState\":\"Building\"},\"id\":\"pmouexhdz\",\"name\":\"i\",\"type\":\"qeojnxqbzvddntw\"},{\"properties\":{\"addonType\":\"AddonProperties\",\"provisioningState\":\"Deleting\"},\"id\":\"btwnpzaoqvuhrhcf\",\"name\":\"cyddglmjthjqk\",\"type\":\"pyeicxm\"}],\"nextLink\":\"iwqvhkh\"}") - .toObject(AddonList.class); - Assertions.assertEquals("iwqvhkh", model.nextLink()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AddonList model - = new AddonList().withValue(Arrays.asList(new AddonInner().withProperties(new AddonProperties()), - new AddonInner().withProperties(new AddonProperties()), - new AddonInner().withProperties(new AddonProperties()), - new AddonInner().withProperties(new AddonProperties()))).withNextLink("iwqvhkh"); - model = BinaryData.fromObject(model).toObject(AddonList.class); - Assertions.assertEquals("iwqvhkh", model.nextLink()); - } -} 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 d139b51673eb..000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/AddonPropertiesTests.java +++ /dev/null @@ -1,23 +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\":\"Deleting\"}") - .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 325f3d737810..000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/AddonVrPropertiesTests.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.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\":470627507,\"provisioningState\":\"Cancelled\"}") - .toObject(AddonVrProperties.class); - Assertions.assertEquals(470627507, model.vrsCount()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AddonVrProperties model = new AddonVrProperties().withVrsCount(470627507); - model = BinaryData.fromObject(model).toObject(AddonVrProperties.class); - Assertions.assertEquals(470627507, 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 a6bb800b9a35..000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/AddonsCreateOrUpdateMockTests.java +++ /dev/null @@ -1,40 +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.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.avs.AvsManager; -import com.azure.resourcemanager.avs.models.Addon; -import com.azure.resourcemanager.avs.models.AddonProperties; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class AddonsCreateOrUpdateMockTests { - @Test - public void testCreateOrUpdate() throws Exception { - String responseStr - = "{\"properties\":{\"addonType\":\"AddonProperties\",\"provisioningState\":\"Succeeded\"},\"id\":\"gnjdgkynscliqhz\",\"name\":\"h\",\"type\":\"nk\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - 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("auy") - .withExistingPrivateCloud("qyuvvfonkp", "hqyikvy") - .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 d34353850f1c..000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/AddonsDeleteMockTests.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.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.avs.AvsManager; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class AddonsDeleteMockTests { - @Test - public void testDelete() throws Exception { - String responseStr = "{}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - 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("tj", "zysdzh", "zwwva", 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 9845a5e335c7..000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/AddonsGetWithResponseMockTests.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.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.avs.AvsManager; -import com.azure.resourcemanager.avs.models.Addon; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class AddonsGetWithResponseMockTests { - @Test - public void testGetWithResponse() throws Exception { - String responseStr - = "{\"properties\":{\"addonType\":\"AddonProperties\",\"provisioningState\":\"Building\"},\"id\":\"ho\",\"name\":\"dynhdwdigum\",\"type\":\"nraauzz\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - 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("pkc", "ayzri", "khyawfvjlboxqv", 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 6c462a83c49b..000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/AddonsListMockTests.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.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.avs.AvsManager; -import com.azure.resourcemanager.avs.models.Addon; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class AddonsListMockTests { - @Test - public void testList() throws Exception { - String responseStr - = "{\"value\":[{\"properties\":{\"addonType\":\"AddonProperties\",\"provisioningState\":\"Updating\"},\"id\":\"glae\",\"name\":\"xndticokpvzmlqtm\",\"type\":\"dgxobfircl\"}]}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - 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("utnwytpzdmovzvf", "aawzqadfl", 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 1fecf6badc62..000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/AuthorizationsDeleteMockTests.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.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.avs.AvsManager; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class AuthorizationsDeleteMockTests { - @Test - public void testDelete() throws Exception { - String responseStr = "{}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - 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("sdymbrn", "suxmpraf", "g", 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 8b79b5c9fee1..000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/AvailabilityPropertiesTests.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.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\":1462222832,\"secondaryZone\":835826608}") - .toObject(AvailabilityProperties.class); - Assertions.assertEquals(AvailabilityStrategy.SINGLE_ZONE, model.strategy()); - Assertions.assertEquals(1462222832, model.zone()); - Assertions.assertEquals(835826608, model.secondaryZone()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AvailabilityProperties model = new AvailabilityProperties().withStrategy(AvailabilityStrategy.SINGLE_ZONE) - .withZone(1462222832) - .withSecondaryZone(835826608); - model = BinaryData.fromObject(model).toObject(AvailabilityProperties.class); - Assertions.assertEquals(AvailabilityStrategy.SINGLE_ZONE, model.strategy()); - Assertions.assertEquals(1462222832, model.zone()); - Assertions.assertEquals(835826608, 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 448914c38c64..000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/CircuitTests.java +++ /dev/null @@ -1,23 +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\":\"yb\",\"secondarySubnet\":\"qedqytbciqfoufl\",\"expressRouteID\":\"nkzsmodmglou\",\"expressRoutePrivatePeeringID\":\"b\"}") - .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 ad75b14ffbfe..000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/CloudLinkInnerTests.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.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\":{\"provisioningState\":\"Canceled\",\"status\":\"Deleting\",\"linkedCloud\":\"nbacfi\"},\"id\":\"l\",\"name\":\"bxetqgtzxdpn\",\"type\":\"bqqwxrj\"}") - .toObject(CloudLinkInner.class); - Assertions.assertEquals("nbacfi", model.linkedCloud()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - CloudLinkInner model = new CloudLinkInner().withLinkedCloud("nbacfi"); - model = BinaryData.fromObject(model).toObject(CloudLinkInner.class); - Assertions.assertEquals("nbacfi", 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 81d4e6819f4d..000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/CloudLinkListTests.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.CloudLinkInner; -import com.azure.resourcemanager.avs.models.CloudLinkList; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class CloudLinkListTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - CloudLinkList model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"provisioningState\":\"Failed\",\"status\":\"Failed\",\"linkedCloud\":\"nxkrx\"},\"id\":\"mi\",\"name\":\"tthzrvqd\",\"type\":\"abhjybi\"},{\"properties\":{\"provisioningState\":\"Failed\",\"status\":\"Failed\",\"linkedCloud\":\"owskanyktz\"},\"id\":\"u\",\"name\":\"y\",\"type\":\"gqywgndrv\"},{\"properties\":{\"provisioningState\":\"Canceled\",\"status\":\"Failed\",\"linkedCloud\":\"hrc\"},\"id\":\"nc\",\"name\":\"cpecfvmmcoofs\",\"type\":\"lzevgbmqjqab\"}],\"nextLink\":\"pmivkwlzu\"}") - .toObject(CloudLinkList.class); - Assertions.assertEquals("nxkrx", model.value().get(0).linkedCloud()); - Assertions.assertEquals("pmivkwlzu", model.nextLink()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - CloudLinkList model = new CloudLinkList() - .withValue(Arrays.asList(new CloudLinkInner().withLinkedCloud("nxkrx"), - new CloudLinkInner().withLinkedCloud("owskanyktz"), new CloudLinkInner().withLinkedCloud("hrc"))) - .withNextLink("pmivkwlzu"); - model = BinaryData.fromObject(model).toObject(CloudLinkList.class); - Assertions.assertEquals("nxkrx", model.value().get(0).linkedCloud()); - Assertions.assertEquals("pmivkwlzu", model.nextLink()); - } -} 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 805075823dcc..000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/CloudLinkPropertiesTests.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.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("{\"provisioningState\":\"Succeeded\",\"status\":\"Building\",\"linkedCloud\":\"wsubisnja\"}") - .toObject(CloudLinkProperties.class); - Assertions.assertEquals("wsubisnja", model.linkedCloud()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - CloudLinkProperties model = new CloudLinkProperties().withLinkedCloud("wsubisnja"); - model = BinaryData.fromObject(model).toObject(CloudLinkProperties.class); - Assertions.assertEquals("wsubisnja", 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 22606108aaf2..000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/CloudLinksCreateOrUpdateMockTests.java +++ /dev/null @@ -1,41 +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.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.avs.AvsManager; -import com.azure.resourcemanager.avs.models.CloudLink; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class CloudLinksCreateOrUpdateMockTests { - @Test - public void testCreateOrUpdate() throws Exception { - String responseStr - = "{\"properties\":{\"provisioningState\":\"Succeeded\",\"status\":\"Building\",\"linkedCloud\":\"wcluqovekqvgq\"},\"id\":\"wifzmp\",\"name\":\"wyivqikf\",\"type\":\"cvhrfsp\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - 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("pe") - .withExistingPrivateCloud("ysownbtgkbug", "jqctojcmisofie") - .withLinkedCloud("cuplcplcwkhih") - .create(); - - Assertions.assertEquals("wcluqovekqvgq", 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 367ffbf3004d..000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/CloudLinksDeleteMockTests.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.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.avs.AvsManager; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class CloudLinksDeleteMockTests { - @Test - public void testDelete() throws Exception { - String responseStr = "{}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - 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("qwogfnzjvus", "zldmozuxy", "fsbtkad", 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 b057d0e9a16d..000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/CloudLinksGetWithResponseMockTests.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.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.avs.AvsManager; -import com.azure.resourcemanager.avs.models.CloudLink; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class CloudLinksGetWithResponseMockTests { - @Test - public void testGetWithResponse() throws Exception { - String responseStr - = "{\"properties\":{\"provisioningState\":\"Failed\",\"status\":\"Active\",\"linkedCloud\":\"ra\"},\"id\":\"aawiuagydwqfb\",\"name\":\"lyr\",\"type\":\"giagtcojo\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - 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("nzeyqxtjj", "zqlqhyc", "vodggxdbee", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("ra", 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 de319ffba6b8..000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/CloudLinksListMockTests.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.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.avs.AvsManager; -import com.azure.resourcemanager.avs.models.CloudLink; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class CloudLinksListMockTests { - @Test - public void testList() throws Exception { - String responseStr - = "{\"value\":[{\"properties\":{\"provisioningState\":\"Canceled\",\"status\":\"Active\",\"linkedCloud\":\"hmfdnbzydvfvfcj\"},\"id\":\"eoisrvhmgor\",\"name\":\"fukiscvwmzhw\",\"type\":\"lefaxvxilcbtgn\"}]}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - 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("xg", "moy", com.azure.core.util.Context.NONE); - - Assertions.assertEquals("hmfdnbzydvfvfcj", 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 16379f4ecf47..000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ClusterInnerTests.java +++ /dev/null @@ -1,51 +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 com.azure.resourcemanager.avs.models.SkuTier; -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( - "{\"properties\":{\"clusterSize\":1625524147,\"provisioningState\":\"Deleting\",\"clusterId\":55863349,\"hosts\":[\"ltyfsop\",\"usue\",\"nzwdejba\",\"orxzdmohctbqvud\"],\"vsanDatastoreName\":\"dndnvow\"},\"sku\":{\"name\":\"ujjugwdkcglh\",\"tier\":\"Basic\",\"size\":\"jdyggdtji\",\"family\":\"b\",\"capacity\":2140516005},\"id\":\"qweykhmenev\",\"name\":\"yexfwh\",\"type\":\"bcibvyvdcsitynn\"}") - .toObject(ClusterInner.class); - Assertions.assertEquals("ujjugwdkcglh", model.sku().name()); - Assertions.assertEquals(SkuTier.BASIC, model.sku().tier()); - Assertions.assertEquals("jdyggdtji", model.sku().size()); - Assertions.assertEquals("b", model.sku().family()); - Assertions.assertEquals(2140516005, model.sku().capacity()); - Assertions.assertEquals(1625524147, model.clusterSize()); - Assertions.assertEquals("ltyfsop", model.hosts().get(0)); - Assertions.assertEquals("dndnvow", model.vsanDatastoreName()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ClusterInner model = new ClusterInner() - .withSku(new Sku().withName("ujjugwdkcglh") - .withTier(SkuTier.BASIC) - .withSize("jdyggdtji") - .withFamily("b") - .withCapacity(2140516005)) - .withClusterSize(1625524147) - .withHosts(Arrays.asList("ltyfsop", "usue", "nzwdejba", "orxzdmohctbqvud")) - .withVsanDatastoreName("dndnvow"); - model = BinaryData.fromObject(model).toObject(ClusterInner.class); - Assertions.assertEquals("ujjugwdkcglh", model.sku().name()); - Assertions.assertEquals(SkuTier.BASIC, model.sku().tier()); - Assertions.assertEquals("jdyggdtji", model.sku().size()); - Assertions.assertEquals("b", model.sku().family()); - Assertions.assertEquals(2140516005, model.sku().capacity()); - Assertions.assertEquals(1625524147, model.clusterSize()); - Assertions.assertEquals("ltyfsop", model.hosts().get(0)); - Assertions.assertEquals("dndnvow", model.vsanDatastoreName()); - } -} 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 3d51476443b9..000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ClusterListTests.java +++ /dev/null @@ -1,54 +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.ClusterList; -import com.azure.resourcemanager.avs.models.Sku; -import com.azure.resourcemanager.avs.models.SkuTier; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class ClusterListTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ClusterList model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"clusterSize\":409786419,\"provisioningState\":\"Failed\",\"clusterId\":86962705,\"hosts\":[\"qwoochcbon\"],\"vsanDatastoreName\":\"pkvlrxn\"},\"sku\":{\"name\":\"ea\",\"tier\":\"Premium\",\"size\":\"heoflokeyyienjbd\",\"family\":\"tgrhpdjpjumas\",\"capacity\":271162944},\"id\":\"pqyegualhbxxh\",\"name\":\"jj\",\"type\":\"zvdudgwdslfhotwm\"}],\"nextLink\":\"npwlbjnpg\"}") - .toObject(ClusterList.class); - Assertions.assertEquals("ea", model.value().get(0).sku().name()); - Assertions.assertEquals(SkuTier.PREMIUM, model.value().get(0).sku().tier()); - Assertions.assertEquals("heoflokeyyienjbd", model.value().get(0).sku().size()); - Assertions.assertEquals("tgrhpdjpjumas", model.value().get(0).sku().family()); - Assertions.assertEquals(271162944, model.value().get(0).sku().capacity()); - Assertions.assertEquals(409786419, model.value().get(0).clusterSize()); - Assertions.assertEquals("qwoochcbon", model.value().get(0).hosts().get(0)); - Assertions.assertEquals("pkvlrxn", model.value().get(0).vsanDatastoreName()); - Assertions.assertEquals("npwlbjnpg", model.nextLink()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ClusterList model = new ClusterList().withValue(Arrays.asList(new ClusterInner() - .withSku(new Sku().withName("ea") - .withTier(SkuTier.PREMIUM) - .withSize("heoflokeyyienjbd") - .withFamily("tgrhpdjpjumas") - .withCapacity(271162944)) - .withClusterSize(409786419) - .withHosts(Arrays.asList("qwoochcbon")) - .withVsanDatastoreName("pkvlrxn"))).withNextLink("npwlbjnpg"); - model = BinaryData.fromObject(model).toObject(ClusterList.class); - Assertions.assertEquals("ea", model.value().get(0).sku().name()); - Assertions.assertEquals(SkuTier.PREMIUM, model.value().get(0).sku().tier()); - Assertions.assertEquals("heoflokeyyienjbd", model.value().get(0).sku().size()); - Assertions.assertEquals("tgrhpdjpjumas", model.value().get(0).sku().family()); - Assertions.assertEquals(271162944, model.value().get(0).sku().capacity()); - Assertions.assertEquals(409786419, model.value().get(0).clusterSize()); - Assertions.assertEquals("qwoochcbon", model.value().get(0).hosts().get(0)); - Assertions.assertEquals("pkvlrxn", model.value().get(0).vsanDatastoreName()); - Assertions.assertEquals("npwlbjnpg", model.nextLink()); - } -} 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 dcb7a7a6290d..000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ClusterPropertiesTests.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.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\":1611277697,\"provisioningState\":\"Updating\",\"clusterId\":1602339472,\"hosts\":[\"f\",\"qsc\",\"eypvhezrkg\",\"hcjrefovgmk\"],\"vsanDatastoreName\":\"leyyvx\"}") - .toObject(ClusterProperties.class); - Assertions.assertEquals(1611277697, model.clusterSize()); - Assertions.assertEquals("f", model.hosts().get(0)); - Assertions.assertEquals("leyyvx", model.vsanDatastoreName()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ClusterProperties model = new ClusterProperties().withClusterSize(1611277697) - .withHosts(Arrays.asList("f", "qsc", "eypvhezrkg", "hcjrefovgmk")) - .withVsanDatastoreName("leyyvx"); - model = BinaryData.fromObject(model).toObject(ClusterProperties.class); - Assertions.assertEquals(1611277697, model.clusterSize()); - Assertions.assertEquals("f", model.hosts().get(0)); - Assertions.assertEquals("leyyvx", model.vsanDatastoreName()); - } -} 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 318ed7859332..000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ClusterUpdatePropertiesTests.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.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\":1961920372,\"hosts\":[\"uiuaodsfcpkvxodp\"]}") - .toObject(ClusterUpdateProperties.class); - Assertions.assertEquals(1961920372, model.clusterSize()); - Assertions.assertEquals("uiuaodsfcpkvxodp", model.hosts().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ClusterUpdateProperties model - = new ClusterUpdateProperties().withClusterSize(1961920372).withHosts(Arrays.asList("uiuaodsfcpkvxodp")); - model = BinaryData.fromObject(model).toObject(ClusterUpdateProperties.class); - Assertions.assertEquals(1961920372, model.clusterSize()); - Assertions.assertEquals("uiuaodsfcpkvxodp", 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 58dfb947d57f..000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ClusterUpdateTests.java +++ /dev/null @@ -1,49 +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 com.azure.resourcemanager.avs.models.Sku; -import com.azure.resourcemanager.avs.models.SkuTier; -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( - "{\"sku\":{\"name\":\"jpkcattpng\",\"tier\":\"Standard\",\"size\":\"czsqpjhvm\",\"family\":\"jvnysounqe\",\"capacity\":904416760},\"properties\":{\"clusterSize\":1054713689,\"hosts\":[\"fhyhltrpmopjmcma\",\"u\"]}}") - .toObject(ClusterUpdate.class); - Assertions.assertEquals("jpkcattpng", model.sku().name()); - Assertions.assertEquals(SkuTier.STANDARD, model.sku().tier()); - Assertions.assertEquals("czsqpjhvm", model.sku().size()); - Assertions.assertEquals("jvnysounqe", model.sku().family()); - Assertions.assertEquals(904416760, model.sku().capacity()); - Assertions.assertEquals(1054713689, model.clusterSize()); - Assertions.assertEquals("fhyhltrpmopjmcma", model.hosts().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ClusterUpdate model - = new ClusterUpdate() - .withSku(new Sku().withName("jpkcattpng") - .withTier(SkuTier.STANDARD) - .withSize("czsqpjhvm") - .withFamily("jvnysounqe") - .withCapacity(904416760)) - .withClusterSize(1054713689) - .withHosts(Arrays.asList("fhyhltrpmopjmcma", "u")); - model = BinaryData.fromObject(model).toObject(ClusterUpdate.class); - Assertions.assertEquals("jpkcattpng", model.sku().name()); - Assertions.assertEquals(SkuTier.STANDARD, model.sku().tier()); - Assertions.assertEquals("czsqpjhvm", model.sku().size()); - Assertions.assertEquals("jvnysounqe", model.sku().family()); - Assertions.assertEquals(904416760, model.sku().capacity()); - Assertions.assertEquals(1054713689, model.clusterSize()); - Assertions.assertEquals("fhyhltrpmopjmcma", 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 8651e4b59785..000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ClusterZoneListInnerTests.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.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\":[\"zrnkcqvyxlwh\",\"lsicohoqqnwv\",\"ryavwhheunmmqh\",\"yxzk\"],\"zone\":\"ocukoklyax\"},{\"hosts\":[\"nuqszfkbey\"],\"zone\":\"wrmjmwvvjektc\"}]}") - .toObject(ClusterZoneListInner.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ClusterZoneListInner model - = new ClusterZoneListInner().withZones(Arrays.asList(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 b13b73ba7d10..000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ClusterZoneTests.java +++ /dev/null @@ -1,23 +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\":[\"nhwlrsffrzpwvl\",\"dqgbiqylihkaetc\"],\"zone\":\"vfcivfsnkymuc\"}") - .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 2e4f6ab4e0c5..000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ClustersCreateOrUpdateMockTests.java +++ /dev/null @@ -1,58 +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.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.avs.AvsManager; -import com.azure.resourcemanager.avs.models.Cluster; -import com.azure.resourcemanager.avs.models.Sku; -import com.azure.resourcemanager.avs.models.SkuTier; -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 reactor.core.publisher.Mono; - -public final class ClustersCreateOrUpdateMockTests { - @Test - public void testCreateOrUpdate() throws Exception { - String responseStr - = "{\"properties\":{\"clusterSize\":312575916,\"provisioningState\":\"Succeeded\",\"clusterId\":1231243109,\"hosts\":[\"nbixxrti\"],\"vsanDatastoreName\":\"cpwpg\"},\"sku\":{\"name\":\"lrcivtsoxfrke\",\"tier\":\"Premium\",\"size\":\"yyefrpmpdnqqs\",\"family\":\"waoqvmmb\",\"capacity\":538705263},\"id\":\"rtql\",\"name\":\"zmegnitgvk\",\"type\":\"lzyqd\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - 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("vetnwsdtutn") - .withExistingPrivateCloud("a", "cqusr") - .withSku(new Sku().withName("udypohyuems") - .withTier(SkuTier.PREMIUM) - .withSize("qyrp") - .withFamily("obrltt") - .withCapacity(2105592893)) - .withClusterSize(1517277198) - .withHosts(Arrays.asList("yrmewipmvekdx", "kuqgsjjxundxgket", "zhhzjhfjmhvvmu", "gpmuneqsxvmhfbuz")) - .withVsanDatastoreName("ihsasb") - .create(); - - Assertions.assertEquals("lrcivtsoxfrke", response.sku().name()); - Assertions.assertEquals(SkuTier.PREMIUM, response.sku().tier()); - Assertions.assertEquals("yyefrpmpdnqqs", response.sku().size()); - Assertions.assertEquals("waoqvmmb", response.sku().family()); - Assertions.assertEquals(538705263, response.sku().capacity()); - Assertions.assertEquals(312575916, response.clusterSize()); - Assertions.assertEquals("nbixxrti", response.hosts().get(0)); - Assertions.assertEquals("cpwpg", response.vsanDatastoreName()); - } -} 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 cad841f4e2c3..000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ClustersDeleteMockTests.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.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.avs.AvsManager; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class ClustersDeleteMockTests { - @Test - public void testDelete() throws Exception { - String responseStr = "{}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - 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("jhlfzswpchwahf", "ousnfepgfewe", "wlyxgncxyk", 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 5156f6d726c6..000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ClustersGetWithResponseMockTests.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.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.avs.AvsManager; -import com.azure.resourcemanager.avs.models.Cluster; -import com.azure.resourcemanager.avs.models.SkuTier; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class ClustersGetWithResponseMockTests { - @Test - public void testGetWithResponse() throws Exception { - String responseStr - = "{\"properties\":{\"clusterSize\":754106802,\"provisioningState\":\"Failed\",\"clusterId\":1484369172,\"hosts\":[\"ohu\"],\"vsanDatastoreName\":\"wtwko\"},\"sku\":{\"name\":\"zwculkbawpfajnj\",\"tier\":\"Premium\",\"size\":\"wtjjguktalhsnv\",\"family\":\"dmxzr\",\"capacity\":596889388},\"id\":\"mlnwiaaomylweazu\",\"name\":\"cse\",\"type\":\"hwwn\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - 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("beitpkx", "tmo", "bklftidgfcwqmpim", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("zwculkbawpfajnj", response.sku().name()); - Assertions.assertEquals(SkuTier.PREMIUM, response.sku().tier()); - Assertions.assertEquals("wtjjguktalhsnv", response.sku().size()); - Assertions.assertEquals("dmxzr", response.sku().family()); - Assertions.assertEquals(596889388, response.sku().capacity()); - Assertions.assertEquals(754106802, response.clusterSize()); - Assertions.assertEquals("ohu", response.hosts().get(0)); - Assertions.assertEquals("wtwko", response.vsanDatastoreName()); - } -} 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 745381b6e3ba..000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ClustersListMockTests.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.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.avs.AvsManager; -import com.azure.resourcemanager.avs.models.Cluster; -import com.azure.resourcemanager.avs.models.SkuTier; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class ClustersListMockTests { - @Test - public void testList() throws Exception { - String responseStr - = "{\"value\":[{\"properties\":{\"clusterSize\":602518095,\"provisioningState\":\"Canceled\",\"clusterId\":982758961,\"hosts\":[\"qibrtalme\",\"ttwgdsl\",\"xih\",\"rmooizqse\"],\"vsanDatastoreName\":\"xiutcx\"},\"sku\":{\"name\":\"pzhyr\",\"tier\":\"Standard\",\"size\":\"g\",\"family\":\"joxslhvnhla\",\"capacity\":107871538},\"id\":\"kkzjcjbtrga\",\"name\":\"hvv\",\"type\":\"brxjjsto\"}]}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - 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("uagrttikteusqc", "kvyklxubyjaffmm", com.azure.core.util.Context.NONE); - - Assertions.assertEquals("pzhyr", response.iterator().next().sku().name()); - Assertions.assertEquals(SkuTier.STANDARD, response.iterator().next().sku().tier()); - Assertions.assertEquals("g", response.iterator().next().sku().size()); - Assertions.assertEquals("joxslhvnhla", response.iterator().next().sku().family()); - Assertions.assertEquals(107871538, response.iterator().next().sku().capacity()); - Assertions.assertEquals(602518095, response.iterator().next().clusterSize()); - Assertions.assertEquals("qibrtalme", response.iterator().next().hosts().get(0)); - Assertions.assertEquals("xiutcx", response.iterator().next().vsanDatastoreName()); - } -} 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 d221c6a81e6c..000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ClustersListZonesWithResponseMockTests.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.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.avs.AvsManager; -import com.azure.resourcemanager.avs.models.ClusterZoneList; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class ClustersListZonesWithResponseMockTests { - @Test - public void testListZonesWithResponse() throws Exception { - String responseStr - = "{\"zones\":[{\"hosts\":[\"fpxtg\",\"scjavftju\",\"dqazkmtgguwpijra\"],\"zone\":\"ivmmghfcfiwrxgk\"},{\"hosts\":[\"vyi\",\"zqodfvpgshox\",\"sgbpfgzdjtx\",\"zflbqvg\"],\"zone\":\"vl\"}]}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - 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("hdjhlimmbcx", "h", "cporxvxcjz", com.azure.core.util.Context.NONE) - .getValue(); - - } -} 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 425193483ccd..000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/DatastoreInnerTests.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.fluent.models.DatastoreInner; -import com.azure.resourcemanager.avs.models.DiskPoolVolume; -import com.azure.resourcemanager.avs.models.ElasticSanVolume; -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\":\"Succeeded\",\"netAppVolume\":{\"id\":\"zy\"},\"diskPoolVolume\":{\"targetId\":\"hxmzsbbzoggig\",\"lunName\":\"xwburvjxxjns\",\"mountOption\":\"ATTACH\",\"path\":\"tko\"},\"elasticSanVolume\":{\"targetId\":\"kouknvudwtiu\"},\"status\":\"Detached\"},\"id\":\"ngkpocipazy\",\"name\":\"o\",\"type\":\"gukgjnpiucgygevq\"}") - .toObject(DatastoreInner.class); - Assertions.assertEquals("zy", model.netAppVolume().id()); - Assertions.assertEquals("hxmzsbbzoggig", model.diskPoolVolume().targetId()); - Assertions.assertEquals("xwburvjxxjns", model.diskPoolVolume().lunName()); - Assertions.assertEquals(MountOptionEnum.ATTACH, model.diskPoolVolume().mountOption()); - Assertions.assertEquals("kouknvudwtiu", model.elasticSanVolume().targetId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DatastoreInner model = new DatastoreInner().withNetAppVolume(new NetAppVolume().withId("zy")) - .withDiskPoolVolume(new DiskPoolVolume().withTargetId("hxmzsbbzoggig") - .withLunName("xwburvjxxjns") - .withMountOption(MountOptionEnum.ATTACH)) - .withElasticSanVolume(new ElasticSanVolume().withTargetId("kouknvudwtiu")); - model = BinaryData.fromObject(model).toObject(DatastoreInner.class); - Assertions.assertEquals("zy", model.netAppVolume().id()); - Assertions.assertEquals("hxmzsbbzoggig", model.diskPoolVolume().targetId()); - Assertions.assertEquals("xwburvjxxjns", model.diskPoolVolume().lunName()); - Assertions.assertEquals(MountOptionEnum.ATTACH, model.diskPoolVolume().mountOption()); - Assertions.assertEquals("kouknvudwtiu", model.elasticSanVolume().targetId()); - } -} 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 f2543b42d3ce..000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/DatastoreListTests.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.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.avs.fluent.models.DatastoreInner; -import com.azure.resourcemanager.avs.models.DatastoreList; -import com.azure.resourcemanager.avs.models.DiskPoolVolume; -import com.azure.resourcemanager.avs.models.ElasticSanVolume; -import com.azure.resourcemanager.avs.models.MountOptionEnum; -import com.azure.resourcemanager.avs.models.NetAppVolume; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class DatastoreListTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DatastoreList model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"provisioningState\":\"Deleting\",\"netAppVolume\":{\"id\":\"ydagfuaxbe\"},\"diskPoolVolume\":{\"targetId\":\"iu\",\"lunName\":\"kktwhrdxw\",\"mountOption\":\"MOUNT\",\"path\":\"sm\"},\"elasticSanVolume\":{\"targetId\":\"ureximoryocfs\"},\"status\":\"Unknown\"},\"id\":\"mddystkiiux\",\"name\":\"qyud\",\"type\":\"o\"},{\"properties\":{\"provisioningState\":\"Deleting\",\"netAppVolume\":{\"id\":\"poczvyifqrvkdvjs\"},\"diskPoolVolume\":{\"targetId\":\"rm\",\"lunName\":\"vdfwatkpn\",\"mountOption\":\"ATTACH\",\"path\":\"xxbczwtr\"},\"elasticSanVolume\":{\"targetId\":\"iqzbq\"},\"status\":\"Unknown\"},\"id\":\"vmyokacspkwl\",\"name\":\"zdobpxjmflbvvnch\",\"type\":\"kcciwwzjuqkhr\"},{\"properties\":{\"provisioningState\":\"Cancelled\",\"netAppVolume\":{\"id\":\"ku\"},\"diskPoolVolume\":{\"targetId\":\"oskg\",\"lunName\":\"sauuimj\",\"mountOption\":\"ATTACH\",\"path\":\"eduugi\"},\"elasticSanVolume\":{\"targetId\":\"jrrfbyaosve\"},\"status\":\"Attached\"},\"id\":\"npc\",\"name\":\"hocohslkev\",\"type\":\"eggzfb\"}],\"nextLink\":\"fmvfaxkffeiit\"}") - .toObject(DatastoreList.class); - Assertions.assertEquals("ydagfuaxbe", model.value().get(0).netAppVolume().id()); - Assertions.assertEquals("iu", model.value().get(0).diskPoolVolume().targetId()); - Assertions.assertEquals("kktwhrdxw", model.value().get(0).diskPoolVolume().lunName()); - Assertions.assertEquals(MountOptionEnum.MOUNT, model.value().get(0).diskPoolVolume().mountOption()); - Assertions.assertEquals("ureximoryocfs", model.value().get(0).elasticSanVolume().targetId()); - Assertions.assertEquals("fmvfaxkffeiit", model.nextLink()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DatastoreList model = new DatastoreList() - .withValue(Arrays.asList( - new DatastoreInner().withNetAppVolume(new NetAppVolume().withId("ydagfuaxbe")) - .withDiskPoolVolume(new DiskPoolVolume().withTargetId("iu") - .withLunName("kktwhrdxw") - .withMountOption(MountOptionEnum.MOUNT)) - .withElasticSanVolume(new ElasticSanVolume().withTargetId("ureximoryocfs")), - new DatastoreInner().withNetAppVolume(new NetAppVolume().withId("poczvyifqrvkdvjs")) - .withDiskPoolVolume(new DiskPoolVolume().withTargetId("rm") - .withLunName("vdfwatkpn") - .withMountOption(MountOptionEnum.ATTACH)) - .withElasticSanVolume(new ElasticSanVolume().withTargetId("iqzbq")), - new DatastoreInner().withNetAppVolume(new NetAppVolume().withId("ku")) - .withDiskPoolVolume(new DiskPoolVolume().withTargetId("oskg") - .withLunName("sauuimj") - .withMountOption(MountOptionEnum.ATTACH)) - .withElasticSanVolume(new ElasticSanVolume().withTargetId("jrrfbyaosve")))) - .withNextLink("fmvfaxkffeiit"); - model = BinaryData.fromObject(model).toObject(DatastoreList.class); - Assertions.assertEquals("ydagfuaxbe", model.value().get(0).netAppVolume().id()); - Assertions.assertEquals("iu", model.value().get(0).diskPoolVolume().targetId()); - Assertions.assertEquals("kktwhrdxw", model.value().get(0).diskPoolVolume().lunName()); - Assertions.assertEquals(MountOptionEnum.MOUNT, model.value().get(0).diskPoolVolume().mountOption()); - Assertions.assertEquals("ureximoryocfs", model.value().get(0).elasticSanVolume().targetId()); - Assertions.assertEquals("fmvfaxkffeiit", model.nextLink()); - } -} 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 1743e1c56518..000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/DatastorePropertiesTests.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.fluent.models.DatastoreProperties; -import com.azure.resourcemanager.avs.models.DiskPoolVolume; -import com.azure.resourcemanager.avs.models.ElasticSanVolume; -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\":\"Deleting\",\"netAppVolume\":{\"id\":\"pmr\"},\"diskPoolVolume\":{\"targetId\":\"izcdrqjsd\",\"lunName\":\"ydnfyhxdeoejz\",\"mountOption\":\"MOUNT\",\"path\":\"fsj\"},\"elasticSanVolume\":{\"targetId\":\"gzfbishcbk\"},\"status\":\"DeadOrError\"}") - .toObject(DatastoreProperties.class); - Assertions.assertEquals("pmr", model.netAppVolume().id()); - Assertions.assertEquals("izcdrqjsd", model.diskPoolVolume().targetId()); - Assertions.assertEquals("ydnfyhxdeoejz", model.diskPoolVolume().lunName()); - Assertions.assertEquals(MountOptionEnum.MOUNT, model.diskPoolVolume().mountOption()); - Assertions.assertEquals("gzfbishcbk", model.elasticSanVolume().targetId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DatastoreProperties model = new DatastoreProperties().withNetAppVolume(new NetAppVolume().withId("pmr")) - .withDiskPoolVolume(new DiskPoolVolume().withTargetId("izcdrqjsd") - .withLunName("ydnfyhxdeoejz") - .withMountOption(MountOptionEnum.MOUNT)) - .withElasticSanVolume(new ElasticSanVolume().withTargetId("gzfbishcbk")); - model = BinaryData.fromObject(model).toObject(DatastoreProperties.class); - Assertions.assertEquals("pmr", model.netAppVolume().id()); - Assertions.assertEquals("izcdrqjsd", model.diskPoolVolume().targetId()); - Assertions.assertEquals("ydnfyhxdeoejz", model.diskPoolVolume().lunName()); - Assertions.assertEquals(MountOptionEnum.MOUNT, model.diskPoolVolume().mountOption()); - Assertions.assertEquals("gzfbishcbk", model.elasticSanVolume().targetId()); - } -} 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 d14b9db140f7..000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/DatastoresCreateOrUpdateMockTests.java +++ /dev/null @@ -1,52 +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.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -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.ElasticSanVolume; -import com.azure.resourcemanager.avs.models.MountOptionEnum; -import com.azure.resourcemanager.avs.models.NetAppVolume; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class DatastoresCreateOrUpdateMockTests { - @Test - public void testCreateOrUpdate() throws Exception { - String responseStr - = "{\"properties\":{\"provisioningState\":\"Succeeded\",\"netAppVolume\":{\"id\":\"anokqgu\"},\"diskPoolVolume\":{\"targetId\":\"jqnv\",\"lunName\":\"roylaxxu\",\"mountOption\":\"ATTACH\",\"path\":\"sdosfjbjsvgjr\"},\"elasticSanVolume\":{\"targetId\":\"r\"},\"status\":\"Inaccessible\"},\"id\":\"ytdc\",\"name\":\"xgccknfnw\",\"type\":\"btmvpdvjdhttza\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - 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("pypqtgsfj") - .withExistingCluster("itvtzeexavo", "tfgle", "dmdqb") - .withNetAppVolume(new NetAppVolume().withId("hhxud")) - .withDiskPoolVolume( - new DiskPoolVolume().withTargetId("vodhtn").withLunName("irudh").withMountOption(MountOptionEnum.MOUNT)) - .withElasticSanVolume(new ElasticSanVolume().withTargetId("zrcxfailcfxwmdbo")) - .create(); - - Assertions.assertEquals("anokqgu", response.netAppVolume().id()); - Assertions.assertEquals("jqnv", response.diskPoolVolume().targetId()); - Assertions.assertEquals("roylaxxu", response.diskPoolVolume().lunName()); - Assertions.assertEquals(MountOptionEnum.ATTACH, response.diskPoolVolume().mountOption()); - Assertions.assertEquals("r", response.elasticSanVolume().targetId()); - } -} 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 5470846191a2..000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/DatastoresDeleteMockTests.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.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.avs.AvsManager; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class DatastoresDeleteMockTests { - @Test - public void testDelete() throws Exception { - String responseStr = "{}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - 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("cuijpxt", "s", "wprtu", "wsawddjibabxvi", 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 d4dc50a3e60b..000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/DatastoresGetWithResponseMockTests.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.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.avs.AvsManager; -import com.azure.resourcemanager.avs.models.Datastore; -import com.azure.resourcemanager.avs.models.MountOptionEnum; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class DatastoresGetWithResponseMockTests { - @Test - public void testGetWithResponse() throws Exception { - String responseStr - = "{\"properties\":{\"provisioningState\":\"Failed\",\"netAppVolume\":{\"id\":\"lxunsmjbnkppxy\"},\"diskPoolVolume\":{\"targetId\":\"nlsvxeiz\",\"lunName\":\"gwklnsr\",\"mountOption\":\"ATTACH\",\"path\":\"ycxcktpiym\"},\"elasticSanVolume\":{\"targetId\":\"teeammxqiekkkzd\"},\"status\":\"Detached\"},\"id\":\"g\",\"name\":\"ojbmxv\",\"type\":\"vrefdeesv\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - 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("tjeaahhvjhh", "akz", "bbjjidjksyxk", "xvxevblbjednljla", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("lxunsmjbnkppxy", response.netAppVolume().id()); - Assertions.assertEquals("nlsvxeiz", response.diskPoolVolume().targetId()); - Assertions.assertEquals("gwklnsr", response.diskPoolVolume().lunName()); - Assertions.assertEquals(MountOptionEnum.ATTACH, response.diskPoolVolume().mountOption()); - Assertions.assertEquals("teeammxqiekkkzd", response.elasticSanVolume().targetId()); - } -} 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 75858a2a1f23..000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/DatastoresListMockTests.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.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.avs.AvsManager; -import com.azure.resourcemanager.avs.models.Datastore; -import com.azure.resourcemanager.avs.models.MountOptionEnum; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class DatastoresListMockTests { - @Test - public void testList() throws Exception { - String responseStr - = "{\"value\":[{\"properties\":{\"provisioningState\":\"Canceled\",\"netAppVolume\":{\"id\":\"uwasqvd\"},\"diskPoolVolume\":{\"targetId\":\"y\",\"lunName\":\"guxak\",\"mountOption\":\"ATTACH\",\"path\":\"hzbezkgi\"},\"elasticSanVolume\":{\"targetId\":\"idxas\"},\"status\":\"DeadOrError\"},\"id\":\"yvvjskgfmo\",\"name\":\"wa\",\"type\":\"pqg\"}]}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - 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("fegcea", "zxwhcansymoyqhlw", "gdivbkbxg", com.azure.core.util.Context.NONE); - - Assertions.assertEquals("uwasqvd", response.iterator().next().netAppVolume().id()); - Assertions.assertEquals("y", response.iterator().next().diskPoolVolume().targetId()); - Assertions.assertEquals("guxak", response.iterator().next().diskPoolVolume().lunName()); - Assertions.assertEquals(MountOptionEnum.ATTACH, response.iterator().next().diskPoolVolume().mountOption()); - Assertions.assertEquals("idxas", response.iterator().next().elasticSanVolume().targetId()); - } -} 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 5b8741a71e30..000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/DiskPoolVolumeTests.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.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\":\"wgipwhono\",\"lunName\":\"kgshwa\",\"mountOption\":\"ATTACH\",\"path\":\"zbinjeputtm\"}") - .toObject(DiskPoolVolume.class); - Assertions.assertEquals("wgipwhono", model.targetId()); - Assertions.assertEquals("kgshwa", model.lunName()); - Assertions.assertEquals(MountOptionEnum.ATTACH, model.mountOption()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DiskPoolVolume model = new DiskPoolVolume().withTargetId("wgipwhono") - .withLunName("kgshwa") - .withMountOption(MountOptionEnum.ATTACH); - model = BinaryData.fromObject(model).toObject(DiskPoolVolume.class); - Assertions.assertEquals("wgipwhono", model.targetId()); - Assertions.assertEquals("kgshwa", model.lunName()); - Assertions.assertEquals(MountOptionEnum.ATTACH, model.mountOption()); - } -} diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ElasticSanVolumeTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ElasticSanVolumeTests.java deleted file mode 100644 index f0706a4ef6ed..000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ElasticSanVolumeTests.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.ElasticSanVolume; -import org.junit.jupiter.api.Assertions; - -public final class ElasticSanVolumeTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ElasticSanVolume model = BinaryData.fromString("{\"targetId\":\"ywnuzoq\"}").toObject(ElasticSanVolume.class); - Assertions.assertEquals("ywnuzoq", model.targetId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ElasticSanVolume model = new ElasticSanVolume().withTargetId("ywnuzoq"); - model = BinaryData.fromObject(model).toObject(ElasticSanVolume.class); - Assertions.assertEquals("ywnuzoq", model.targetId()); - } -} 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 59a651cd08a5..000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/EndpointsTests.java +++ /dev/null @@ -1,23 +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\":\"tmut\",\"vcsa\":\"qktapspwgcuert\",\"hcxCloudManager\":\"kdosvqw\",\"nsxtManagerIp\":\"mdgbbjfdd\",\"vcenterIp\":\"bmbexppbhtqqro\",\"hcxCloudManagerIp\":\"p\"}") - .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 51e04a2a4f26..000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/GlobalReachConnectionsDeleteMockTests.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.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.avs.AvsManager; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class GlobalReachConnectionsDeleteMockTests { - @Test - public void testDelete() throws Exception { - String responseStr = "{}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - 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("lniexz", "rzpgep", "tybbwwpgda", 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 71dccc3283eb..000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/HcxEnterpriseSitesDeleteWithResponseMockTests.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.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.avs.AvsManager; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class HcxEnterpriseSitesDeleteWithResponseMockTests { - @Test - public void testDeleteWithResponse() throws Exception { - String responseStr = "{}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - 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("raiouaubrjtl", "qxfuojrngif", "rzpasccbiuimzdly", com.azure.core.util.Context.NONE); - - } -} diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/IscsiPathInnerTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/IscsiPathInnerTests.java deleted file mode 100644 index 392d214a0eb3..000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/IscsiPathInnerTests.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.IscsiPathInner; -import org.junit.jupiter.api.Assertions; - -public final class IscsiPathInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - IscsiPathInner model = BinaryData.fromString( - "{\"properties\":{\"provisioningState\":\"Failed\",\"networkBlock\":\"mx\"},\"id\":\"kv\",\"name\":\"melmqkrha\",\"type\":\"vljua\"}") - .toObject(IscsiPathInner.class); - Assertions.assertEquals("mx", model.networkBlock()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - IscsiPathInner model = new IscsiPathInner().withNetworkBlock("mx"); - model = BinaryData.fromObject(model).toObject(IscsiPathInner.class); - Assertions.assertEquals("mx", model.networkBlock()); - } -} diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/IscsiPathListResultTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/IscsiPathListResultTests.java deleted file mode 100644 index 834ab8c31e80..000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/IscsiPathListResultTests.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.IscsiPathInner; -import com.azure.resourcemanager.avs.models.IscsiPathListResult; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class IscsiPathListResultTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - IscsiPathListResult model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"provisioningState\":\"Deleting\",\"networkBlock\":\"z\"},\"id\":\"zka\",\"name\":\"kuwbcrnwb\",\"type\":\"ehhseyvjusrts\"}],\"nextLink\":\"spkdee\"}") - .toObject(IscsiPathListResult.class); - Assertions.assertEquals("z", model.value().get(0).networkBlock()); - Assertions.assertEquals("spkdee", model.nextLink()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - IscsiPathListResult model - = new IscsiPathListResult().withValue(Arrays.asList(new IscsiPathInner().withNetworkBlock("z"))) - .withNextLink("spkdee"); - model = BinaryData.fromObject(model).toObject(IscsiPathListResult.class); - Assertions.assertEquals("z", model.value().get(0).networkBlock()); - Assertions.assertEquals("spkdee", model.nextLink()); - } -} diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/IscsiPathPropertiesTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/IscsiPathPropertiesTests.java deleted file mode 100644 index 0cc6888a30d7..000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/IscsiPathPropertiesTests.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.IscsiPathProperties; -import org.junit.jupiter.api.Assertions; - -public final class IscsiPathPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - IscsiPathProperties model - = BinaryData.fromString("{\"provisioningState\":\"Canceled\",\"networkBlock\":\"uhcdhm\"}") - .toObject(IscsiPathProperties.class); - Assertions.assertEquals("uhcdhm", model.networkBlock()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - IscsiPathProperties model = new IscsiPathProperties().withNetworkBlock("uhcdhm"); - model = BinaryData.fromObject(model).toObject(IscsiPathProperties.class); - Assertions.assertEquals("uhcdhm", model.networkBlock()); - } -} diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/IscsiPathsCreateOrUpdateMockTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/IscsiPathsCreateOrUpdateMockTests.java deleted file mode 100644 index 5d1d51190756..000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/IscsiPathsCreateOrUpdateMockTests.java +++ /dev/null @@ -1,40 +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.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.avs.AvsManager; -import com.azure.resourcemanager.avs.fluent.models.IscsiPathInner; -import com.azure.resourcemanager.avs.models.IscsiPath; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class IscsiPathsCreateOrUpdateMockTests { - @Test - public void testCreateOrUpdate() throws Exception { - String responseStr - = "{\"properties\":{\"provisioningState\":\"Succeeded\",\"networkBlock\":\"vlgo\"},\"id\":\"mftpmdtz\",\"name\":\"jltfvnzcyjtotpv\",\"type\":\"pvpbdbzqgqqiheds\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - AvsManager manager = AvsManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - IscsiPath response = manager.iscsiPaths() - .createOrUpdate("prlpy", "nuciqdsmexiit", new IscsiPathInner().withNetworkBlock("tyasiibmiybnnust"), - com.azure.core.util.Context.NONE); - - Assertions.assertEquals("vlgo", response.networkBlock()); - } -} diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/IscsiPathsDeleteMockTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/IscsiPathsDeleteMockTests.java deleted file mode 100644 index 95ea5d512479..000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/IscsiPathsDeleteMockTests.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.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.avs.AvsManager; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class IscsiPathsDeleteMockTests { - @Test - public void testDelete() throws Exception { - String responseStr = "{}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - AvsManager manager = AvsManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager.iscsiPaths().delete("qwthmky", "bcysih", com.azure.core.util.Context.NONE); - - } -} diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/IscsiPathsGetWithResponseMockTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/IscsiPathsGetWithResponseMockTests.java deleted file mode 100644 index 44fb27305c5e..000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/IscsiPathsGetWithResponseMockTests.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.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.avs.AvsManager; -import com.azure.resourcemanager.avs.models.IscsiPath; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class IscsiPathsGetWithResponseMockTests { - @Test - public void testGetWithResponse() throws Exception { - String responseStr - = "{\"properties\":{\"provisioningState\":\"Deleting\",\"networkBlock\":\"cevehjkuyxoafg\"},\"id\":\"qltfaey\",\"name\":\"inmfgvxirp\",\"type\":\"hriypoqeyhlqhy\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - AvsManager manager = AvsManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - IscsiPath response - = manager.iscsiPaths().getWithResponse("z", "qqxlajr", com.azure.core.util.Context.NONE).getValue(); - - Assertions.assertEquals("cevehjkuyxoafg", response.networkBlock()); - } -} diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/IscsiPathsListByPrivateCloudMockTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/IscsiPathsListByPrivateCloudMockTests.java deleted file mode 100644 index 7bd2ad412d84..000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/IscsiPathsListByPrivateCloudMockTests.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.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.avs.AvsManager; -import com.azure.resourcemanager.avs.models.IscsiPath; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class IscsiPathsListByPrivateCloudMockTests { - @Test - public void testListByPrivateCloud() throws Exception { - String responseStr - = "{\"value\":[{\"properties\":{\"provisioningState\":\"Failed\",\"networkBlock\":\"vyhyhsgzfc\"},\"id\":\"gomfgbeglq\",\"name\":\"leohibetnluankr\",\"type\":\"fxeeebtijvacvbm\"}]}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - 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.iscsiPaths() - .listByPrivateCloud("fdgugeyzi", "grkyuizabsnmfpph", com.azure.core.util.Context.NONE); - - Assertions.assertEquals("vyhyhsgzfc", response.iterator().next().networkBlock()); - } -} 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 bc86e4ea2674..000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/LocationsCheckQuotaAvailabilityWithResponseMockTests.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.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.avs.AvsManager; -import com.azure.resourcemanager.avs.models.Quota; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class LocationsCheckQuotaAvailabilityWithResponseMockTests { - @Test - public void testCheckQuotaAvailabilityWithResponse() throws Exception { - String responseStr - = "{\"hostsRemaining\":{\"uzaofjchvcyyy\":1357028156,\"gdotcubiipuipwo\":915050797,\"nmacj\":567350116,\"nizshqvcim\":167629289},\"quotaEnabled\":\"Disabled\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - 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("dufiq", 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 5a828bf26aee..000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/LocationsCheckTrialAvailabilityWithResponseMockTests.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.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.avs.AvsManager; -import com.azure.resourcemanager.avs.models.Sku; -import com.azure.resourcemanager.avs.models.SkuTier; -import com.azure.resourcemanager.avs.models.Trial; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class LocationsCheckTrialAvailabilityWithResponseMockTests { - @Test - public void testCheckTrialAvailabilityWithResponse() throws Exception { - String responseStr = "{\"status\":\"TrialDisabled\",\"availableHosts\":1759389481}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - 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("fgmblrrilbywdxsm", - new Sku().withName("ccwr") - .withTier(SkuTier.BASIC) - .withSize("jfnynszqujizdvoq") - .withFamily("ibyowbblgyavutp") - .withCapacity(1643251858), - com.azure.core.util.Context.NONE) - .getValue(); - - } -} 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 45d1edb05341..000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ManagementClusterTests.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.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\":223251370,\"provisioningState\":\"Succeeded\",\"clusterId\":1278778169,\"hosts\":[\"feusnhut\",\"eltmrldhugjzzdat\"],\"vsanDatastoreName\":\"hocdgeab\"}") - .toObject(ManagementCluster.class); - Assertions.assertEquals(223251370, model.clusterSize()); - Assertions.assertEquals("feusnhut", model.hosts().get(0)); - Assertions.assertEquals("hocdgeab", model.vsanDatastoreName()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ManagementCluster model = new ManagementCluster().withClusterSize(223251370) - .withHosts(Arrays.asList("feusnhut", "eltmrldhugjzzdat")) - .withVsanDatastoreName("hocdgeab"); - model = BinaryData.fromObject(model).toObject(ManagementCluster.class); - Assertions.assertEquals(223251370, model.clusterSize()); - Assertions.assertEquals("feusnhut", model.hosts().get(0)); - Assertions.assertEquals("hocdgeab", model.vsanDatastoreName()); - } -} 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 415cb3d09c42..000000000000 --- 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\":\"deyeamdphagalpbu\"}").toObject(NetAppVolume.class); - Assertions.assertEquals("deyeamdphagalpbu", model.id()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - NetAppVolume model = new NetAppVolume().withId("deyeamdphagalpbu"); - model = BinaryData.fromObject(model).toObject(NetAppVolume.class); - Assertions.assertEquals("deyeamdphagalpbu", 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 0d0402ab63ec..000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/OperationDisplayTests.java +++ /dev/null @@ -1,23 +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\":\"yrtih\",\"resource\":\"tijbpzvgnwzsymgl\",\"operation\":\"fcyzkohdbihanufh\",\"description\":\"bj\"}") - .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 3d33485b4cbd..000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/OperationInnerTests.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.OperationInner; -import com.azure.resourcemanager.avs.models.OperationDisplay; - -public final class OperationInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - OperationInner model = BinaryData.fromString( - "{\"name\":\"usarhmofc\",\"isDataAction\":false,\"display\":{\"provider\":\"urkdtmlx\",\"resource\":\"kuksjtxukcdm\",\"operation\":\"rcryuanzwuxzdxta\",\"description\":\"lhmwhfpmrqobm\"},\"origin\":\"user,system\",\"actionType\":\"Internal\"}") - .toObject(OperationInner.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - OperationInner model = new OperationInner().withDisplay(new OperationDisplay()); - model = BinaryData.fromObject(model).toObject(OperationInner.class); - } -} diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/OperationListResultTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/OperationListResultTests.java deleted file mode 100644 index 5d49245bc54b..000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/OperationListResultTests.java +++ /dev/null @@ -1,23 +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.OperationListResult; - -public final class OperationListResultTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - OperationListResult model = BinaryData.fromString( - "{\"value\":[{\"name\":\"quvgjxpybczme\",\"isDataAction\":true,\"display\":{\"provider\":\"pbsphrupidgs\",\"resource\":\"bejhphoycmsxa\",\"operation\":\"hdxbmtqio\",\"description\":\"zehtbmu\"},\"origin\":\"user,system\",\"actionType\":\"Internal\"},{\"name\":\"izhwlrxy\",\"isDataAction\":false,\"display\":{\"provider\":\"ijgkdm\",\"resource\":\"azlobcufpdznrbt\",\"operation\":\"qjnqglhqgnufoooj\",\"description\":\"ifsqesaagdfmg\"},\"origin\":\"user,system\",\"actionType\":\"Internal\"},{\"name\":\"rifkwm\",\"isDataAction\":true,\"display\":{\"provider\":\"izntocipao\",\"resource\":\"jpsq\",\"operation\":\"mpoyfd\",\"description\":\"ogknygjofjdd\"},\"origin\":\"user,system\",\"actionType\":\"Internal\"}],\"nextLink\":\"upewnwreitjzy\"}") - .toObject(OperationListResult.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - OperationListResult model = new OperationListResult(); - model = BinaryData.fromObject(model).toObject(OperationListResult.class); - } -} 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 8eeb878d109a..000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/OperationsListMockTests.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.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.avs.AvsManager; -import com.azure.resourcemanager.avs.models.Operation; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class OperationsListMockTests { - @Test - public void testList() throws Exception { - String responseStr - = "{\"value\":[{\"name\":\"unvmnnr\",\"isDataAction\":false,\"display\":{\"provider\":\"rk\",\"resource\":\"lywjhh\",\"operation\":\"nhxmsi\",\"description\":\"omi\"},\"origin\":\"user\",\"actionType\":\"Internal\"}]}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - 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); - - } -} 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 ede0dafbb856..000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/PlacementPoliciesCreateOrUpdateMockTests.java +++ /dev/null @@ -1,45 +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.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -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.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class PlacementPoliciesCreateOrUpdateMockTests { - @Test - public void testCreateOrUpdate() throws Exception { - String responseStr - = "{\"properties\":{\"type\":\"PlacementPolicyProperties\",\"state\":\"Enabled\",\"displayName\":\"kpn\",\"provisioningState\":\"Succeeded\"},\"id\":\"pmudqmeqwig\",\"name\":\"ibudqwy\",\"type\":\"eb\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - 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("emwmdxmebwjs") - .withExistingCluster("cjmeislstvasy", "wxdzaumweoohgu", "fuzboyjathwtzolb") - .withProperties( - new PlacementPolicyProperties().withState(PlacementPolicyState.DISABLED).withDisplayName("lxveabfqx")) - .create(); - - Assertions.assertEquals(PlacementPolicyState.ENABLED, response.properties().state()); - Assertions.assertEquals("kpn", 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 7bad5f2a4a32..000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/PlacementPoliciesDeleteMockTests.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.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.avs.AvsManager; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class PlacementPoliciesDeleteMockTests { - @Test - public void testDelete() throws Exception { - String responseStr = "{}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - 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("a", "ankjpdnjzh", "joylh", "lmuoyxprimrsopte", 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 8fb3e60ee2f1..000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/PlacementPoliciesGetWithResponseMockTests.java +++ /dev/null @@ -1,41 +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.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.avs.AvsManager; -import com.azure.resourcemanager.avs.models.PlacementPolicy; -import com.azure.resourcemanager.avs.models.PlacementPolicyState; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class PlacementPoliciesGetWithResponseMockTests { - @Test - public void testGetWithResponse() throws Exception { - String responseStr - = "{\"properties\":{\"type\":\"PlacementPolicyProperties\",\"state\":\"Enabled\",\"displayName\":\"q\",\"provisioningState\":\"Building\"},\"id\":\"wsldrizetpwbr\",\"name\":\"lllibph\",\"type\":\"qzmiza\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - 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("eafidltugsresm", "ssjhoiftxfkf", "egprhptil", "ucb", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals(PlacementPolicyState.ENABLED, response.properties().state()); - Assertions.assertEquals("q", 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 6e0f17dcd444..000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/PlacementPoliciesListMockTests.java +++ /dev/null @@ -1,41 +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.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.avs.AvsManager; -import com.azure.resourcemanager.avs.models.PlacementPolicy; -import com.azure.resourcemanager.avs.models.PlacementPolicyState; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class PlacementPoliciesListMockTests { - @Test - public void testList() throws Exception { - String responseStr - = "{\"value\":[{\"properties\":{\"type\":\"PlacementPolicyProperties\",\"state\":\"Disabled\",\"displayName\":\"lwxezwzhokvbwnh\",\"provisioningState\":\"Failed\"},\"id\":\"gehgppi\",\"name\":\"ifhpf\",\"type\":\"oajvgcxtxjcs\"}]}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - 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("fedxihchrphkm", "rjdqnsdfzp", "gtgkylkdghr", com.azure.core.util.Context.NONE); - - Assertions.assertEquals(PlacementPolicyState.DISABLED, response.iterator().next().properties().state()); - Assertions.assertEquals("lwxezwzhokvbwnh", 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 c28c45fd5302..000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/PlacementPoliciesListTests.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.fluent.models.PlacementPolicyInner; -import com.azure.resourcemanager.avs.models.PlacementPoliciesList; -import com.azure.resourcemanager.avs.models.PlacementPolicyProperties; -import com.azure.resourcemanager.avs.models.PlacementPolicyState; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -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\":\"ebrjcxe\",\"provisioningState\":\"Failed\"},\"id\":\"utttxfvjrbirp\",\"name\":\"xepcyvahfn\",\"type\":\"jky\"},{\"properties\":{\"type\":\"PlacementPolicyProperties\",\"state\":\"Enabled\",\"displayName\":\"ujqgidok\",\"provisioningState\":\"Failed\"},\"id\":\"yoxgvcltbgsnc\",\"name\":\"hkjeszzhbi\",\"type\":\"htxfvgxbfsmxnehm\"}],\"nextLink\":\"ec\"}") - .toObject(PlacementPoliciesList.class); - Assertions.assertEquals(PlacementPolicyState.DISABLED, model.value().get(0).properties().state()); - Assertions.assertEquals("ebrjcxe", model.value().get(0).properties().displayName()); - Assertions.assertEquals("ec", model.nextLink()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - PlacementPoliciesList model = new PlacementPoliciesList().withValue(Arrays.asList( - new PlacementPolicyInner().withProperties( - new PlacementPolicyProperties().withState(PlacementPolicyState.DISABLED).withDisplayName("ebrjcxe")), - new PlacementPolicyInner().withProperties( - new PlacementPolicyProperties().withState(PlacementPolicyState.ENABLED).withDisplayName("ujqgidok")))) - .withNextLink("ec"); - model = BinaryData.fromObject(model).toObject(PlacementPoliciesList.class); - Assertions.assertEquals(PlacementPolicyState.DISABLED, model.value().get(0).properties().state()); - Assertions.assertEquals("ebrjcxe", model.value().get(0).properties().displayName()); - Assertions.assertEquals("ec", model.nextLink()); - } -} 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 2bec107de976..000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/PlacementPolicyInnerTests.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.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\":\"Disabled\",\"displayName\":\"bfqkkr\",\"provisioningState\":\"Succeeded\"},\"id\":\"kgriwflzlfbx\",\"name\":\"puz\",\"type\":\"cispnqzahmgkbr\"}") - .toObject(PlacementPolicyInner.class); - Assertions.assertEquals(PlacementPolicyState.DISABLED, model.properties().state()); - Assertions.assertEquals("bfqkkr", model.properties().displayName()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - PlacementPolicyInner model = new PlacementPolicyInner().withProperties( - new PlacementPolicyProperties().withState(PlacementPolicyState.DISABLED).withDisplayName("bfqkkr")); - model = BinaryData.fromObject(model).toObject(PlacementPolicyInner.class); - Assertions.assertEquals(PlacementPolicyState.DISABLED, model.properties().state()); - Assertions.assertEquals("bfqkkr", 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 c90311ecb18f..000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/PlacementPolicyPropertiesTests.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.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\":\"Enabled\",\"displayName\":\"hibnuqqkpika\",\"provisioningState\":\"Updating\"}") - .toObject(PlacementPolicyProperties.class); - Assertions.assertEquals(PlacementPolicyState.ENABLED, model.state()); - Assertions.assertEquals("hibnuqqkpika", model.displayName()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - PlacementPolicyProperties model - = new PlacementPolicyProperties().withState(PlacementPolicyState.ENABLED).withDisplayName("hibnuqqkpika"); - model = BinaryData.fromObject(model).toObject(PlacementPolicyProperties.class); - Assertions.assertEquals(PlacementPolicyState.ENABLED, model.state()); - Assertions.assertEquals("hibnuqqkpika", 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 6ea4e32a75c0..000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/PlacementPolicyUpdatePropertiesTests.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.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\":\"Disabled\",\"vmMembers\":[\"pnazzm\",\"jrunmpxtt\"],\"hostMembers\":[\"rbnlankxmyskp\",\"henbtkcxywnytn\",\"synlqidybyxczfc\",\"haaxdbabphl\"],\"affinityStrength\":\"Must\",\"azureHybridBenefitType\":\"SqlHost\"}") - .toObject(PlacementPolicyUpdateProperties.class); - Assertions.assertEquals(PlacementPolicyState.DISABLED, model.state()); - Assertions.assertEquals("pnazzm", model.vmMembers().get(0)); - Assertions.assertEquals("rbnlankxmyskp", model.hostMembers().get(0)); - Assertions.assertEquals(AffinityStrength.MUST, 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.DISABLED) - .withVmMembers(Arrays.asList("pnazzm", "jrunmpxtt")) - .withHostMembers(Arrays.asList("rbnlankxmyskp", "henbtkcxywnytn", "synlqidybyxczfc", "haaxdbabphl")) - .withAffinityStrength(AffinityStrength.MUST) - .withAzureHybridBenefitType(AzureHybridBenefitType.SQL_HOST); - model = BinaryData.fromObject(model).toObject(PlacementPolicyUpdateProperties.class); - Assertions.assertEquals(PlacementPolicyState.DISABLED, model.state()); - Assertions.assertEquals("pnazzm", model.vmMembers().get(0)); - Assertions.assertEquals("rbnlankxmyskp", model.hostMembers().get(0)); - Assertions.assertEquals(AffinityStrength.MUST, 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 d1f80d3e9f38..000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/PlacementPolicyUpdateTests.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.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\":\"Enabled\",\"vmMembers\":[\"n\",\"uynhijg\"],\"hostMembers\":[\"bfs\"],\"affinityStrength\":\"Should\",\"azureHybridBenefitType\":\"SqlHost\"}}") - .toObject(PlacementPolicyUpdate.class); - Assertions.assertEquals(PlacementPolicyState.ENABLED, model.state()); - Assertions.assertEquals("n", model.vmMembers().get(0)); - Assertions.assertEquals("bfs", 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.ENABLED) - .withVmMembers(Arrays.asList("n", "uynhijg")) - .withHostMembers(Arrays.asList("bfs")) - .withAffinityStrength(AffinityStrength.SHOULD) - .withAzureHybridBenefitType(AzureHybridBenefitType.SQL_HOST); - model = BinaryData.fromObject(model).toObject(PlacementPolicyUpdate.class); - Assertions.assertEquals(PlacementPolicyState.ENABLED, model.state()); - Assertions.assertEquals("n", model.vmMembers().get(0)); - Assertions.assertEquals("bfs", 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 3c379d8bdeae..000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/PrivateCloudIdentityTests.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.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\":\"s\",\"tenantId\":\"gbquxigj\",\"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 f3bb3d0a40ac..000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/PrivateCloudsDeleteMockTests.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.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.avs.AvsManager; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class PrivateCloudsDeleteMockTests { - @Test - public void testDelete() throws Exception { - String responseStr = "{}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - 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("y", "pgogtqxepny", 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 79536256a255..000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/QuotaInnerTests.java +++ /dev/null @@ -1,23 +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\":{\"ithxqhabifpi\":758913948},\"quotaEnabled\":\"Enabled\"}") - .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 08ae1b922013..000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ScriptCmdletInnerTests.java +++ /dev/null @@ -1,23 +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\":{\"provisioningState\":\"Failed\",\"description\":\"hos\",\"timeout\":\"dqrhzoymib\",\"audience\":\"Automation\",\"parameters\":[{\"type\":\"Float\",\"name\":\"wfluszdt\",\"description\":\"rkwofyyvoqa\",\"visibility\":\"Hidden\",\"optional\":\"Required\"},{\"type\":\"SecureString\",\"name\":\"giwbwoenwa\",\"description\":\"rtdtkcnqxw\",\"visibility\":\"Hidden\",\"optional\":\"Optional\"},{\"type\":\"Float\",\"name\":\"ujw\",\"description\":\"sipqii\",\"visibility\":\"Visible\",\"optional\":\"Required\"}]},\"id\":\"rpqlp\",\"name\":\"wcciuqgbdbu\",\"type\":\"auvfbtkuwhhmhyk\"}") - .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 eabbdfdd0414..000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ScriptCmdletPropertiesTests.java +++ /dev/null @@ -1,23 +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( - "{\"provisioningState\":\"Failed\",\"description\":\"afnn\",\"timeout\":\"pichkoymkcdy\",\"audience\":\"Automation\",\"parameters\":[{\"type\":\"Int\",\"name\":\"reqnovvqfov\",\"description\":\"xywsuws\",\"visibility\":\"Visible\",\"optional\":\"Required\"}]}") - .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 2dc42cc9a0cf..000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ScriptCmdletsGetWithResponseMockTests.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.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.avs.AvsManager; -import com.azure.resourcemanager.avs.models.ScriptCmdlet; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class ScriptCmdletsGetWithResponseMockTests { - @Test - public void testGetWithResponse() throws Exception { - String responseStr - = "{\"properties\":{\"provisioningState\":\"Succeeded\",\"description\":\"swokm\",\"timeout\":\"hl\",\"audience\":\"Any\",\"parameters\":[{\"type\":\"Bool\",\"name\":\"qkzszuwiwtglxxh\",\"description\":\"fpgpicrmnzhrgm\",\"visibility\":\"Visible\",\"optional\":\"Optional\"},{\"type\":\"Int\",\"name\":\"cbfrm\",\"description\":\"dths\",\"visibility\":\"Hidden\",\"optional\":\"Required\"},{\"type\":\"Bool\",\"name\":\"a\",\"description\":\"lacjfrnxo\",\"visibility\":\"Hidden\",\"optional\":\"Required\"}]},\"id\":\"lwvsgm\",\"name\":\"ohqfzizv\",\"type\":\"xmmkjs\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - 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("r", "govfgpikqmhhaow", "rmzvupo", "qzdfuydzvkfvxcn", 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 093a063e6338..000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ScriptCmdletsListMockTests.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.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.avs.AvsManager; -import com.azure.resourcemanager.avs.models.ScriptCmdlet; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class ScriptCmdletsListMockTests { - @Test - public void testList() throws Exception { - String responseStr - = "{\"value\":[{\"properties\":{\"provisioningState\":\"Failed\",\"description\":\"kfkyjp\",\"timeout\":\"pbpssdfpp\",\"audience\":\"Automation\",\"parameters\":[{\"type\":\"Bool\",\"name\":\"jtvczkcnyxrxmun\",\"description\":\"xvglnkvxlxp\",\"visibility\":\"Hidden\",\"optional\":\"Optional\"},{\"type\":\"Float\",\"name\":\"kc\",\"description\":\"hpzvuqdflvoniyp\",\"visibility\":\"Hidden\",\"optional\":\"Required\"}]},\"id\":\"zgp\",\"name\":\"tivhjknidibgqjx\",\"type\":\"p\"}]}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - 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("iwhxqszdtmaajq", "huxy", "rjvmtygjbmzyosp", 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 4a750a744883..000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ScriptCmdletsListTests.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.fluent.models.ScriptCmdletInner; -import com.azure.resourcemanager.avs.models.ScriptCmdletsList; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class ScriptCmdletsListTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ScriptCmdletsList model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"provisioningState\":\"Failed\",\"description\":\"ikdowwquuvx\",\"timeout\":\"clvit\",\"audience\":\"Any\",\"parameters\":[{\"type\":\"Float\",\"name\":\"ggbhcohfwds\",\"description\":\"ka\",\"visibility\":\"Hidden\",\"optional\":\"Required\"}]},\"id\":\"swacffgdkzz\",\"name\":\"wkfvhqcrailvp\",\"type\":\"ppfufl\"},{\"properties\":{\"provisioningState\":\"Canceled\",\"description\":\"dlxyjrxs\",\"timeout\":\"afcnih\",\"audience\":\"Any\",\"parameters\":[{\"type\":\"Int\",\"name\":\"gfbcvkcv\",\"description\":\"pkeqdcvdrhvoo\",\"visibility\":\"Hidden\",\"optional\":\"Required\"},{\"type\":\"Bool\",\"name\":\"dopcjwvnh\",\"description\":\"d\",\"visibility\":\"Visible\",\"optional\":\"Required\"}]},\"id\":\"rslpmutwuoeg\",\"name\":\"pkhjwni\",\"type\":\"qsluicp\"},{\"properties\":{\"provisioningState\":\"Succeeded\",\"description\":\"zl\",\"timeout\":\"bmpaxmodfvu\",\"audience\":\"Automation\",\"parameters\":[{\"type\":\"Float\",\"name\":\"vmwy\",\"description\":\"fouyf\",\"visibility\":\"Visible\",\"optional\":\"Optional\"},{\"type\":\"SecureString\",\"name\":\"yzvqt\",\"description\":\"ubex\",\"visibility\":\"Visible\",\"optional\":\"Optional\"},{\"type\":\"Credential\",\"name\":\"djmq\",\"description\":\"vypomgkopkwho\",\"visibility\":\"Hidden\",\"optional\":\"Optional\"}]},\"id\":\"gxysmocmbqfqvm\",\"name\":\"cxozapvhelxp\",\"type\":\"glyatddckcbcuej\"}],\"nextLink\":\"xgc\"}") - .toObject(ScriptCmdletsList.class); - Assertions.assertEquals("xgc", model.nextLink()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ScriptCmdletsList model = new ScriptCmdletsList() - .withValue(Arrays.asList(new ScriptCmdletInner(), new ScriptCmdletInner(), new ScriptCmdletInner())) - .withNextLink("xgc"); - model = BinaryData.fromObject(model).toObject(ScriptCmdletsList.class); - Assertions.assertEquals("xgc", model.nextLink()); - } -} 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 75a7ab111362..000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ScriptExecutionInnerTests.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.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\":\"txmedj\",\"parameters\":[{\"type\":\"ScriptExecutionParameter\",\"name\":\"lynqwwncwzzh\"},{\"type\":\"ScriptExecutionParameter\",\"name\":\"gktrmgucnapkte\"},{\"type\":\"ScriptExecutionParameter\",\"name\":\"ellwptfdy\"}],\"hiddenParameters\":[{\"type\":\"ScriptExecutionParameter\",\"name\":\"qbuaceopzfqr\"},{\"type\":\"ScriptExecutionParameter\",\"name\":\"huaoppp\"},{\"type\":\"ScriptExecutionParameter\",\"name\":\"qeqxo\"}],\"failureReason\":\"dahzxctobg\",\"timeout\":\"kdmoi\",\"retention\":\"ostmgrcf\",\"submittedAt\":\"2021-06-18T12:29:32Z\",\"startedAt\":\"2021-06-08T13:34:15Z\",\"finishedAt\":\"2021-07-20T04:26:41Z\",\"provisioningState\":\"Canceled\",\"output\":[\"xbpvjymjhx\",\"j\"],\"namedOutputs\":{\"ivkrtsw\":\"datau\",\"vjfdx\":\"dataxqzvszjfa\",\"qtdo\":\"dataivetvtcq\",\"bhsfxob\":\"datamcbxvwvxysl\"},\"information\":[\"k\",\"lmpewwwfbkr\",\"rn\"],\"warnings\":[\"hqjohxcrsbfova\",\"rruvwbhsq\",\"sub\"],\"errors\":[\"birx\"]},\"id\":\"ybsrfbjfdtwss\",\"name\":\"t\",\"type\":\"tpvjzbexilzznfqq\"}") - .toObject(ScriptExecutionInner.class); - Assertions.assertEquals("txmedj", model.scriptCmdletId()); - Assertions.assertEquals("lynqwwncwzzh", model.parameters().get(0).name()); - Assertions.assertEquals("qbuaceopzfqr", model.hiddenParameters().get(0).name()); - Assertions.assertEquals("dahzxctobg", model.failureReason()); - Assertions.assertEquals("kdmoi", model.timeout()); - Assertions.assertEquals("ostmgrcf", model.retention()); - Assertions.assertEquals("xbpvjymjhx", model.output().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ScriptExecutionInner model = new ScriptExecutionInner().withScriptCmdletId("txmedj") - .withParameters(Arrays.asList(new ScriptExecutionParameter().withName("lynqwwncwzzh"), - new ScriptExecutionParameter().withName("gktrmgucnapkte"), - new ScriptExecutionParameter().withName("ellwptfdy"))) - .withHiddenParameters(Arrays.asList(new ScriptExecutionParameter().withName("qbuaceopzfqr"), - new ScriptExecutionParameter().withName("huaoppp"), new ScriptExecutionParameter().withName("qeqxo"))) - .withFailureReason("dahzxctobg") - .withTimeout("kdmoi") - .withRetention("ostmgrcf") - .withOutput(Arrays.asList("xbpvjymjhx", "j")) - .withNamedOutputs(mapOf("ivkrtsw", "datau", "vjfdx", "dataxqzvszjfa", "qtdo", "dataivetvtcq", "bhsfxob", - "datamcbxvwvxysl")); - model = BinaryData.fromObject(model).toObject(ScriptExecutionInner.class); - Assertions.assertEquals("txmedj", model.scriptCmdletId()); - Assertions.assertEquals("lynqwwncwzzh", model.parameters().get(0).name()); - Assertions.assertEquals("qbuaceopzfqr", model.hiddenParameters().get(0).name()); - Assertions.assertEquals("dahzxctobg", model.failureReason()); - Assertions.assertEquals("kdmoi", model.timeout()); - Assertions.assertEquals("ostmgrcf", model.retention()); - Assertions.assertEquals("xbpvjymjhx", 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 474df6cd02a3..000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ScriptExecutionParameterTests.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.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\":\"gaokonzmnsikv\"}") - .toObject(ScriptExecutionParameter.class); - Assertions.assertEquals("gaokonzmnsikv", model.name()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ScriptExecutionParameter model = new ScriptExecutionParameter().withName("gaokonzmnsikv"); - model = BinaryData.fromObject(model).toObject(ScriptExecutionParameter.class); - Assertions.assertEquals("gaokonzmnsikv", 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 e59334b3c0d2..000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ScriptExecutionPropertiesTests.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.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\":\"wpmqt\",\"parameters\":[{\"type\":\"ScriptExecutionParameter\",\"name\":\"oujmkcjhwqytj\"},{\"type\":\"ScriptExecutionParameter\",\"name\":\"ybn\"},{\"type\":\"ScriptExecutionParameter\",\"name\":\"jewgdrjerv\"}],\"hiddenParameters\":[{\"type\":\"ScriptExecutionParameter\",\"name\":\"nqpeh\"}],\"failureReason\":\"doy\",\"timeout\":\"mifthnzdnd\",\"retention\":\"gnayqigynduh\",\"submittedAt\":\"2021-02-07T07:32:59Z\",\"startedAt\":\"2021-02-05T08:21:04Z\",\"finishedAt\":\"2021-06-18T10:05:08Z\",\"provisioningState\":\"Failed\",\"output\":[\"qolbgyc\",\"uie\",\"tgccymvaolpss\",\"qlfmmdnbb\"],\"namedOutputs\":{\"dxssadbzm\":\"datapswiydmcwyh\",\"cblylpstdbhhxsr\":\"datavdfznudaodvxzb\",\"erscdntne\":\"datadzu\"},\"information\":[\"wjmy\",\"tdss\",\"s\"],\"warnings\":[\"weriofzpyqsem\",\"abnetshh\",\"zhedplvwiw\"],\"errors\":[\"wmbesldnkw\",\"tppjflcx\"]}") - .toObject(ScriptExecutionProperties.class); - Assertions.assertEquals("wpmqt", model.scriptCmdletId()); - Assertions.assertEquals("oujmkcjhwqytj", model.parameters().get(0).name()); - Assertions.assertEquals("nqpeh", model.hiddenParameters().get(0).name()); - Assertions.assertEquals("doy", model.failureReason()); - Assertions.assertEquals("mifthnzdnd", model.timeout()); - Assertions.assertEquals("gnayqigynduh", model.retention()); - Assertions.assertEquals("qolbgyc", model.output().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ScriptExecutionProperties model = new ScriptExecutionProperties().withScriptCmdletId("wpmqt") - .withParameters(Arrays.asList(new ScriptExecutionParameter().withName("oujmkcjhwqytj"), - new ScriptExecutionParameter().withName("ybn"), new ScriptExecutionParameter().withName("jewgdrjerv"))) - .withHiddenParameters(Arrays.asList(new ScriptExecutionParameter().withName("nqpeh"))) - .withFailureReason("doy") - .withTimeout("mifthnzdnd") - .withRetention("gnayqigynduh") - .withOutput(Arrays.asList("qolbgyc", "uie", "tgccymvaolpss", "qlfmmdnbb")) - .withNamedOutputs( - mapOf("dxssadbzm", "datapswiydmcwyh", "cblylpstdbhhxsr", "datavdfznudaodvxzb", "erscdntne", "datadzu")); - model = BinaryData.fromObject(model).toObject(ScriptExecutionProperties.class); - Assertions.assertEquals("wpmqt", model.scriptCmdletId()); - Assertions.assertEquals("oujmkcjhwqytj", model.parameters().get(0).name()); - Assertions.assertEquals("nqpeh", model.hiddenParameters().get(0).name()); - Assertions.assertEquals("doy", model.failureReason()); - Assertions.assertEquals("mifthnzdnd", model.timeout()); - Assertions.assertEquals("gnayqigynduh", model.retention()); - Assertions.assertEquals("qolbgyc", 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 11d1730153df..000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ScriptExecutionsCreateOrUpdateMockTests.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.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.avs.AvsManager; -import com.azure.resourcemanager.avs.models.ScriptExecution; -import com.azure.resourcemanager.avs.models.ScriptExecutionParameter; -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 reactor.core.publisher.Mono; - -public final class ScriptExecutionsCreateOrUpdateMockTests { - @Test - public void testCreateOrUpdate() throws Exception { - String responseStr - = "{\"properties\":{\"scriptCmdletId\":\"hndvnoamldsehao\",\"parameters\":[{\"type\":\"ScriptExecutionParameter\",\"name\":\"hhflzo\"},{\"type\":\"ScriptExecutionParameter\",\"name\":\"xcoxpelnjet\"},{\"type\":\"ScriptExecutionParameter\",\"name\":\"gltsxoat\"},{\"type\":\"ScriptExecutionParameter\",\"name\":\"tgzpnpb\"}],\"hiddenParameters\":[{\"type\":\"ScriptExecutionParameter\",\"name\":\"e\"},{\"type\":\"ScriptExecutionParameter\",\"name\":\"loccsrmozihm\"},{\"type\":\"ScriptExecutionParameter\",\"name\":\"pgawtxxpkyjcxcjx\"},{\"type\":\"ScriptExecutionParameter\",\"name\":\"rytfmpcycil\"}],\"failureReason\":\"caykggnoxuz\",\"timeout\":\"rksxwpndfc\",\"retention\":\"nznthjtw\",\"submittedAt\":\"2021-04-10T21:21:13Z\",\"startedAt\":\"2021-06-06T01:38:06Z\",\"finishedAt\":\"2021-07-22T12:28:11Z\",\"provisioningState\":\"Succeeded\",\"output\":[\"amktcqiosmgbzah\",\"xqdlyrtltlapr\"],\"namedOutputs\":{\"nnbsoqeqa\":\"datakatbhjm\",\"febwlnbmhyreeudz\":\"dataarvlagunbt\"},\"information\":[\"bpdqmjxlyy\",\"glgou\",\"tlmj\",\"yuojqtobaxk\"],\"warnings\":[\"tu\",\"lbfjkwr\",\"snkq\"],\"errors\":[\"y\"]},\"id\":\"unjqh\",\"name\":\"enx\",\"type\":\"ulkpakd\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - 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("elfwy") - .withExistingPrivateCloud("fy", "sgcrpfbcunezzce") - .withScriptCmdletId("wx") - .withParameters(Arrays.asList(new ScriptExecutionParameter().withName("tnpsihclaf"), - new ScriptExecutionParameter().withName("va"), new ScriptExecutionParameter().withName("lpt"))) - .withHiddenParameters(Arrays.asList(new ScriptExecutionParameter().withName("qwztcmwqkc"), - new ScriptExecutionParameter().withName("cxwaxfewz"))) - .withFailureReason("jexfdeqvhp") - .withTimeout("ylkkshkbffmbm") - .withRetention("jrgywwpgjxsn") - .withOutput(Arrays.asList("o", "pttaqutd", "wemxswvruunzz", "gehkfkimrtixokff")) - .withNamedOutputs(mapOf("shiy", "datanljqepqwhixmons", "du", "datagvelfc", "rds", "datacb", "b", "datauwc")) - .create(); - - Assertions.assertEquals("hndvnoamldsehao", response.scriptCmdletId()); - Assertions.assertEquals("hhflzo", response.parameters().get(0).name()); - Assertions.assertEquals("e", response.hiddenParameters().get(0).name()); - Assertions.assertEquals("caykggnoxuz", response.failureReason()); - Assertions.assertEquals("rksxwpndfc", response.timeout()); - Assertions.assertEquals("nznthjtw", response.retention()); - Assertions.assertEquals("amktcqiosmgbzah", 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 f9b985ce163f..000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ScriptExecutionsDeleteMockTests.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.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.avs.AvsManager; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class ScriptExecutionsDeleteMockTests { - @Test - public void testDelete() throws Exception { - String responseStr = "{}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - 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("puamwabzxr", "xcushs", "haivm", 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 f3aae719e3c6..000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ScriptExecutionsGetExecutionLogsWithResponseMockTests.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.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.avs.AvsManager; -import com.azure.resourcemanager.avs.models.ScriptExecution; -import com.azure.resourcemanager.avs.models.ScriptOutputStreamType; -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 reactor.core.publisher.Mono; - -public final class ScriptExecutionsGetExecutionLogsWithResponseMockTests { - @Test - public void testGetExecutionLogsWithResponse() throws Exception { - String responseStr - = "{\"properties\":{\"scriptCmdletId\":\"cbm\",\"parameters\":[{\"type\":\"ScriptExecutionParameter\",\"name\":\"xmvwfg\"},{\"type\":\"ScriptExecutionParameter\",\"name\":\"ayxonsupeujl\"}],\"hiddenParameters\":[{\"type\":\"ScriptExecutionParameter\",\"name\":\"hcvsqltnzoi\"}],\"failureReason\":\"sxgnx\",\"timeout\":\"yqo\",\"retention\":\"p\",\"submittedAt\":\"2021-05-25T17:04:08Z\",\"startedAt\":\"2021-08-14T04:57:20Z\",\"finishedAt\":\"2021-04-29T21:53:48Z\",\"provisioningState\":\"Cancelled\",\"output\":[\"qxeiiqbimhtmwwi\",\"h\",\"hfqpofv\"],\"namedOutputs\":{\"vqihebwtswbzuwf\":\"datablembnkbwvqvxkd\",\"felisdjub\":\"dataduragegizvc\",\"kxkbsazgakgacyr\":\"datagbqi\"},\"information\":[\"dmspof\",\"pv\",\"hryl\",\"iofrzgbzjedmstk\"],\"warnings\":[\"v\"],\"errors\":[\"uiiznktwfansnvpd\"]},\"id\":\"mik\",\"name\":\"stbz\",\"type\":\"kiwbuqnyoph\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - 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("yasflvgsgzwy", "akoi", "knsmjblmljhlnymz", - Arrays.asList(ScriptOutputStreamType.ERROR, ScriptOutputStreamType.WARNING, - ScriptOutputStreamType.OUTPUT, ScriptOutputStreamType.ERROR), - com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("cbm", response.scriptCmdletId()); - Assertions.assertEquals("xmvwfg", response.parameters().get(0).name()); - Assertions.assertEquals("hcvsqltnzoi", response.hiddenParameters().get(0).name()); - Assertions.assertEquals("sxgnx", response.failureReason()); - Assertions.assertEquals("yqo", response.timeout()); - Assertions.assertEquals("p", response.retention()); - Assertions.assertEquals("qxeiiqbimhtmwwi", 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 afa3eddb1527..000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ScriptExecutionsGetWithResponseMockTests.java +++ /dev/null @@ -1,45 +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.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.avs.AvsManager; -import com.azure.resourcemanager.avs.models.ScriptExecution; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class ScriptExecutionsGetWithResponseMockTests { - @Test - public void testGetWithResponse() throws Exception { - String responseStr - = "{\"properties\":{\"scriptCmdletId\":\"ajqglcf\",\"parameters\":[{\"type\":\"ScriptExecutionParameter\",\"name\":\"rqryxynqn\"}],\"hiddenParameters\":[{\"type\":\"ScriptExecutionParameter\",\"name\":\"p\"},{\"type\":\"ScriptExecutionParameter\",\"name\":\"ovw\"},{\"type\":\"ScriptExecutionParameter\",\"name\":\"zn\"},{\"type\":\"ScriptExecutionParameter\",\"name\":\"tgoe\"}],\"failureReason\":\"bbabp\",\"timeout\":\"hv\",\"retention\":\"lkvn\",\"submittedAt\":\"2021-08-17T19:10:03Z\",\"startedAt\":\"2021-02-17T02:46:23Z\",\"finishedAt\":\"2021-08-14T15:24:28Z\",\"provisioningState\":\"Succeeded\",\"output\":[\"rioov\"],\"namedOutputs\":{\"frygznmmax\":\"datasxwaabzm\",\"xlhslnel\":\"dataizkzobgo\"},\"information\":[\"ixynllxecwcrojp\",\"slhcawjutifd\",\"fmvigorqjbttzh\",\"aglkafhon\"],\"warnings\":[\"jeick\",\"zvcpopm\"],\"errors\":[\"nwcl\",\"yjede\",\"xm\"]},\"id\":\"mkqscaz\",\"name\":\"awx\",\"type\":\"z\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - 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("qxtbjwgnyf", "sf", "svtui", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("ajqglcf", response.scriptCmdletId()); - Assertions.assertEquals("rqryxynqn", response.parameters().get(0).name()); - Assertions.assertEquals("p", response.hiddenParameters().get(0).name()); - Assertions.assertEquals("bbabp", response.failureReason()); - Assertions.assertEquals("hv", response.timeout()); - Assertions.assertEquals("lkvn", response.retention()); - Assertions.assertEquals("rioov", 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 dd51099709c6..000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ScriptExecutionsListMockTests.java +++ /dev/null @@ -1,45 +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.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.avs.AvsManager; -import com.azure.resourcemanager.avs.models.ScriptExecution; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class ScriptExecutionsListMockTests { - @Test - public void testList() throws Exception { - String responseStr - = "{\"value\":[{\"properties\":{\"scriptCmdletId\":\"hdxbzlm\",\"parameters\":[{\"type\":\"ScriptExecutionParameter\",\"name\":\"apcvhdbe\"},{\"type\":\"ScriptExecutionParameter\",\"name\":\"wqqxeysko\"},{\"type\":\"ScriptExecutionParameter\",\"name\":\"qzinkfkbg\"},{\"type\":\"ScriptExecutionParameter\",\"name\":\"z\"}],\"hiddenParameters\":[{\"type\":\"ScriptExecutionParameter\",\"name\":\"xeqoc\"},{\"type\":\"ScriptExecutionParameter\",\"name\":\"jmygvk\"},{\"type\":\"ScriptExecutionParameter\",\"name\":\"qkjjeokbz\"},{\"type\":\"ScriptExecutionParameter\",\"name\":\"fezrx\"}],\"failureReason\":\"zurtleipqxbkwvz\",\"timeout\":\"nzvdfbzdixzmq\",\"retention\":\"odawopqhewjptmcg\",\"submittedAt\":\"2021-04-24T18:57:19Z\",\"startedAt\":\"2021-03-17T12:43:28Z\",\"finishedAt\":\"2021-01-11T18:38:59Z\",\"provisioningState\":\"Cancelling\",\"output\":[\"atutmzlbiojlvfhr\"],\"namedOutputs\":{\"hppr\":\"dataneqvcwwyyurmo\"},\"information\":[\"nmokayzejnhlbk\",\"bzpcpiljhahzvec\",\"ndbnwieh\"],\"warnings\":[\"wjwiuub\",\"efqsfapaqtferrqw\",\"x\"],\"errors\":[\"fxapjwogqqnobpu\",\"cdabtqwpwya\",\"bzasqbucljgkyexa\",\"guyaip\"]},\"id\":\"sdaultxij\",\"name\":\"um\",\"type\":\"qwazlnqnmcjngzq\"}]}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - 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("gqcwdhohsdtmc", "zsu", com.azure.core.util.Context.NONE); - - Assertions.assertEquals("hdxbzlm", response.iterator().next().scriptCmdletId()); - Assertions.assertEquals("apcvhdbe", response.iterator().next().parameters().get(0).name()); - Assertions.assertEquals("xeqoc", response.iterator().next().hiddenParameters().get(0).name()); - Assertions.assertEquals("zurtleipqxbkwvz", response.iterator().next().failureReason()); - Assertions.assertEquals("nzvdfbzdixzmq", response.iterator().next().timeout()); - Assertions.assertEquals("odawopqhewjptmcg", response.iterator().next().retention()); - Assertions.assertEquals("atutmzlbiojlvfhr", 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 3e23344774b9..000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ScriptExecutionsListTests.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.util.BinaryData; -import com.azure.resourcemanager.avs.fluent.models.ScriptExecutionInner; -import com.azure.resourcemanager.avs.models.ScriptExecutionParameter; -import com.azure.resourcemanager.avs.models.ScriptExecutionsList; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class ScriptExecutionsListTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ScriptExecutionsList model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"scriptCmdletId\":\"sgwbnbbeld\",\"parameters\":[{\"type\":\"ScriptExecutionParameter\",\"name\":\"zbaliourqha\"}],\"hiddenParameters\":[{\"type\":\"ScriptExecutionParameter\",\"name\":\"hashsfwxosow\"},{\"type\":\"ScriptExecutionParameter\",\"name\":\"xcug\"},{\"type\":\"ScriptExecutionParameter\",\"name\":\"cjooxdjebwpucwwf\"}],\"failureReason\":\"vbvmeu\",\"timeout\":\"civyhzceuo\",\"retention\":\"jrwjueiotwm\",\"submittedAt\":\"2021-01-06T11:18:17Z\",\"startedAt\":\"2021-05-06T08:04:17Z\",\"finishedAt\":\"2021-09-27T21:02:03Z\",\"provisioningState\":\"Pending\",\"output\":[\"rjaw\",\"qwgxhniskx\",\"bkpyc\"],\"namedOutputs\":{\"auwhvylwzbtdhx\":\"datawndnhj\"},\"information\":[\"nbmpowuwprzq\",\"veual\",\"pjmkhfxobbc\",\"wsrtjriplrbpbe\"],\"warnings\":[\"hfgblc\"],\"errors\":[\"zvlvqhjkbegib\",\"nmxiebwwaloayqc\",\"wrtz\",\"uzgwyzmhtx\"]},\"id\":\"gmtsavjcbpwxqpsr\",\"name\":\"nftguvriuhpr\",\"type\":\"mdyvxqtayriw\"},{\"properties\":{\"scriptCmdletId\":\"yqbexrmcqibycno\",\"parameters\":[{\"type\":\"ScriptExecutionParameter\",\"name\":\"nmefqsgzvahapj\"}],\"hiddenParameters\":[{\"type\":\"ScriptExecutionParameter\",\"name\":\"pvgqzcjrvxdjzlm\"},{\"type\":\"ScriptExecutionParameter\",\"name\":\"lxkvu\"}],\"failureReason\":\"hzovawjvzunlut\",\"timeout\":\"nnprn\",\"retention\":\"peilpjzuaejxdu\",\"submittedAt\":\"2021-04-04T06:42:49Z\",\"startedAt\":\"2021-07-28T02:16:26Z\",\"finishedAt\":\"2021-11-26T08:31:17Z\",\"provisioningState\":\"Running\",\"output\":[\"mv\",\"ekg\",\"wozuhkf\",\"bsjyofdx\"],\"namedOutputs\":{\"touwaboekqv\":\"datasd\"},\"information\":[\"nsmvbxwyj\"],\"warnings\":[\"hhcaal\"],\"errors\":[\"xisxyawjoyaqcsl\",\"jpkiidzyexznelix\",\"nr\"]},\"id\":\"folhbnxknal\",\"name\":\"ulppggdtpnapnyir\",\"type\":\"pu\"}],\"nextLink\":\"igvpgylg\"}") - .toObject(ScriptExecutionsList.class); - Assertions.assertEquals("sgwbnbbeld", model.value().get(0).scriptCmdletId()); - Assertions.assertEquals("zbaliourqha", model.value().get(0).parameters().get(0).name()); - Assertions.assertEquals("hashsfwxosow", model.value().get(0).hiddenParameters().get(0).name()); - Assertions.assertEquals("vbvmeu", model.value().get(0).failureReason()); - Assertions.assertEquals("civyhzceuo", model.value().get(0).timeout()); - Assertions.assertEquals("jrwjueiotwm", model.value().get(0).retention()); - Assertions.assertEquals("rjaw", model.value().get(0).output().get(0)); - Assertions.assertEquals("igvpgylg", model.nextLink()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ScriptExecutionsList model = new ScriptExecutionsList().withValue(Arrays.asList( - new ScriptExecutionInner().withScriptCmdletId("sgwbnbbeld") - .withParameters(Arrays.asList(new ScriptExecutionParameter().withName("zbaliourqha"))) - .withHiddenParameters(Arrays.asList(new ScriptExecutionParameter().withName("hashsfwxosow"), - new ScriptExecutionParameter().withName("xcug"), - new ScriptExecutionParameter().withName("cjooxdjebwpucwwf"))) - .withFailureReason("vbvmeu") - .withTimeout("civyhzceuo") - .withRetention("jrwjueiotwm") - .withOutput(Arrays.asList("rjaw", "qwgxhniskx", "bkpyc")) - .withNamedOutputs(mapOf("auwhvylwzbtdhx", "datawndnhj")), - new ScriptExecutionInner().withScriptCmdletId("yqbexrmcqibycno") - .withParameters(Arrays.asList(new ScriptExecutionParameter().withName("nmefqsgzvahapj"))) - .withHiddenParameters(Arrays.asList(new ScriptExecutionParameter().withName("pvgqzcjrvxdjzlm"), - new ScriptExecutionParameter().withName("lxkvu"))) - .withFailureReason("hzovawjvzunlut") - .withTimeout("nnprn") - .withRetention("peilpjzuaejxdu") - .withOutput(Arrays.asList("mv", "ekg", "wozuhkf", "bsjyofdx")) - .withNamedOutputs(mapOf("touwaboekqv", "datasd")))) - .withNextLink("igvpgylg"); - model = BinaryData.fromObject(model).toObject(ScriptExecutionsList.class); - Assertions.assertEquals("sgwbnbbeld", model.value().get(0).scriptCmdletId()); - Assertions.assertEquals("zbaliourqha", model.value().get(0).parameters().get(0).name()); - Assertions.assertEquals("hashsfwxosow", model.value().get(0).hiddenParameters().get(0).name()); - Assertions.assertEquals("vbvmeu", model.value().get(0).failureReason()); - Assertions.assertEquals("civyhzceuo", model.value().get(0).timeout()); - Assertions.assertEquals("jrwjueiotwm", model.value().get(0).retention()); - Assertions.assertEquals("rjaw", model.value().get(0).output().get(0)); - Assertions.assertEquals("igvpgylg", model.nextLink()); - } - - // 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/ScriptPackageInnerTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ScriptPackageInnerTests.java deleted file mode 100644 index e1cd4408dcbc..000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ScriptPackageInnerTests.java +++ /dev/null @@ -1,23 +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\":{\"provisioningState\":\"Failed\",\"description\":\"mubyynt\",\"version\":\"rbqtkoie\",\"company\":\"eotg\",\"uri\":\"l\"},\"id\":\"muwlauwzizxbm\",\"name\":\"gcj\",\"type\":\"fuzmuvpbtt\"}") - .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 d579be12e0fa..000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ScriptPackagePropertiesTests.java +++ /dev/null @@ -1,23 +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( - "{\"provisioningState\":\"Canceled\",\"description\":\"rp\",\"version\":\"ebmnzbtbhjpglk\",\"company\":\"ohdneuel\",\"uri\":\"hsd\"}") - .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 4d79e04b9388..000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ScriptPackagesGetWithResponseMockTests.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.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.avs.AvsManager; -import com.azure.resourcemanager.avs.models.ScriptPackage; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class ScriptPackagesGetWithResponseMockTests { - @Test - public void testGetWithResponse() throws Exception { - String responseStr - = "{\"properties\":{\"provisioningState\":\"Canceled\",\"description\":\"nfsm\",\"version\":\"ttuxuuyilflqoiqu\",\"company\":\"ehmrn\",\"uri\":\"vsujztczytqjtwh\"},\"id\":\"unfprnjletlxs\",\"name\":\"rpddouifamo\",\"type\":\"aziynknlqwzdv\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - 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("hkwfbkgozxwop", "bydpizqaclnapxb", "yg", 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 38cfcf153f91..000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ScriptPackagesListMockTests.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.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.avs.AvsManager; -import com.azure.resourcemanager.avs.models.ScriptPackage; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class ScriptPackagesListMockTests { - @Test - public void testList() throws Exception { - String responseStr - = "{\"value\":[{\"properties\":{\"provisioningState\":\"Succeeded\",\"description\":\"eyirdhlisngw\",\"version\":\"qqmpizruwnpqx\",\"company\":\"iwfcngjsa\",\"uri\":\"iixtmkzj\"},\"id\":\"viirhgfgrws\",\"name\":\"pgratzvzbglbyvi\",\"type\":\"tctbrxkjzwrgxffm\"}]}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - 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("ifmjnn", "wtqabpxuckp", 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 db5ccd6bd32d..000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ScriptPackagesListTests.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.ScriptPackageInner; -import com.azure.resourcemanager.avs.models.ScriptPackagesList; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class ScriptPackagesListTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ScriptPackagesList model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"provisioningState\":\"Succeeded\",\"description\":\"qkdltfz\",\"version\":\"hhvh\",\"company\":\"r\",\"uri\":\"dkwobdagx\"},\"id\":\"bqdxbx\",\"name\":\"akbogqxndlkzgxh\",\"type\":\"ripl\"}],\"nextLink\":\"odxun\"}") - .toObject(ScriptPackagesList.class); - Assertions.assertEquals("odxun", model.nextLink()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ScriptPackagesList model - = new ScriptPackagesList().withValue(Arrays.asList(new ScriptPackageInner())).withNextLink("odxun"); - model = BinaryData.fromObject(model).toObject(ScriptPackagesList.class); - Assertions.assertEquals("odxun", model.nextLink()); - } -} 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 08e056ab07d8..000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ScriptParameterTests.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.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\":\"Bool\",\"name\":\"g\",\"description\":\"gvraeaen\",\"visibility\":\"Visible\",\"optional\":\"Optional\"}") - .toObject(ScriptParameter.class); - Assertions.assertEquals("g", model.name()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ScriptParameter model = new ScriptParameter().withName("g"); - model = BinaryData.fromObject(model).toObject(ScriptParameter.class); - Assertions.assertEquals("g", 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 4b65f6a7881c..000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ScriptSecureStringExecutionParameterTests.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.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\":\"kq\",\"name\":\"bqgzslesjcbhern\"}") - .toObject(ScriptSecureStringExecutionParameter.class); - Assertions.assertEquals("bqgzslesjcbhern", model.name()); - Assertions.assertEquals("kq", model.secureValue()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ScriptSecureStringExecutionParameter model - = new ScriptSecureStringExecutionParameter().withName("bqgzslesjcbhern").withSecureValue("kq"); - model = BinaryData.fromObject(model).toObject(ScriptSecureStringExecutionParameter.class); - Assertions.assertEquals("bqgzslesjcbhern", model.name()); - Assertions.assertEquals("kq", 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 e0aa3dd6f303..000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/ScriptStringExecutionParameterTests.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.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\":\"iew\",\"name\":\"jcvb\"}") - .toObject(ScriptStringExecutionParameter.class); - Assertions.assertEquals("jcvb", model.name()); - Assertions.assertEquals("iew", model.value()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ScriptStringExecutionParameter model = new ScriptStringExecutionParameter().withName("jcvb").withValue("iew"); - model = BinaryData.fromObject(model).toObject(ScriptStringExecutionParameter.class); - Assertions.assertEquals("jcvb", model.name()); - Assertions.assertEquals("iew", model.value()); - } -} 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 536a8abe5018..000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/SkuTests.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.Sku; -import com.azure.resourcemanager.avs.models.SkuTier; -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\":\"czbysc\",\"tier\":\"Free\",\"size\":\"uhivyqniw\",\"family\":\"br\",\"capacity\":519347031}") - .toObject(Sku.class); - Assertions.assertEquals("czbysc", model.name()); - Assertions.assertEquals(SkuTier.FREE, model.tier()); - Assertions.assertEquals("uhivyqniw", model.size()); - Assertions.assertEquals("br", model.family()); - Assertions.assertEquals(519347031, model.capacity()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - Sku model = new Sku().withName("czbysc") - .withTier(SkuTier.FREE) - .withSize("uhivyqniw") - .withFamily("br") - .withCapacity(519347031); - model = BinaryData.fromObject(model).toObject(Sku.class); - Assertions.assertEquals("czbysc", model.name()); - Assertions.assertEquals(SkuTier.FREE, model.tier()); - Assertions.assertEquals("uhivyqniw", model.size()); - Assertions.assertEquals("br", model.family()); - Assertions.assertEquals(519347031, model.capacity()); - } -} 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 3d9530316030..000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/TrialInnerTests.java +++ /dev/null @@ -1,22 +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\":920256064}") - .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 2508dde3170b..000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/VirtualMachineInnerTests.java +++ /dev/null @@ -1,23 +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\":{\"provisioningState\":\"Succeeded\",\"displayName\":\"lxotogtwrupq\",\"moRefId\":\"vnm\",\"folderPath\":\"ykvceoveil\",\"restrictMovement\":\"Disabled\"},\"id\":\"tyfjfcnjbkcnxdhb\",\"name\":\"tkphywpnvjtoqn\",\"type\":\"rmclfplphoxu\"}") - .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 816a8d121b98..000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/VirtualMachinePropertiesTests.java +++ /dev/null @@ -1,23 +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( - "{\"provisioningState\":\"Canceled\",\"displayName\":\"abgy\",\"moRefId\":\"sbj\",\"folderPath\":\"zq\",\"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 064ea77aaede..000000000000 --- 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\":\"Enabled\"}") - .toObject(VirtualMachineRestrictMovement.class); - Assertions.assertEquals(VirtualMachineRestrictMovementState.ENABLED, model.restrictMovement()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - VirtualMachineRestrictMovement model - = new VirtualMachineRestrictMovement().withRestrictMovement(VirtualMachineRestrictMovementState.ENABLED); - model = BinaryData.fromObject(model).toObject(VirtualMachineRestrictMovement.class); - Assertions.assertEquals(VirtualMachineRestrictMovementState.ENABLED, 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 a13cf26c3d0e..000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/VirtualMachinesGetWithResponseMockTests.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.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.avs.AvsManager; -import com.azure.resourcemanager.avs.models.VirtualMachine; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class VirtualMachinesGetWithResponseMockTests { - @Test - public void testGetWithResponse() throws Exception { - String responseStr - = "{\"properties\":{\"provisioningState\":\"Succeeded\",\"displayName\":\"ljeamu\",\"moRefId\":\"zmlovuanash\",\"folderPath\":\"lpmjerb\",\"restrictMovement\":\"Disabled\"},\"id\":\"vidizozsdb\",\"name\":\"cxjmonfdgnwncyp\",\"type\":\"uwwltvuqjctz\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - 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("gnl", "zonzlrpiqywnc", "jtszcof", "zehtdhgb", 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 5b8016283b78..000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/VirtualMachinesListMockTests.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.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.avs.AvsManager; -import com.azure.resourcemanager.avs.models.VirtualMachine; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class VirtualMachinesListMockTests { - @Test - public void testList() throws Exception { - String responseStr - = "{\"value\":[{\"properties\":{\"provisioningState\":\"Canceled\",\"displayName\":\"qlsismjqfrddg\",\"moRefId\":\"quhiosrsjuivf\",\"folderPath\":\"is\",\"restrictMovement\":\"Enabled\"},\"id\":\"xzhczexrxz\",\"name\":\"ujrtrhqvwr\",\"type\":\"vk\"}]}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - 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("ybpmzznrtffyaq", "tmhheioqa", "hvseufuqyrx", 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 3131db239c98..000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/VirtualMachinesListTests.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.VirtualMachineInner; -import com.azure.resourcemanager.avs.models.VirtualMachinesList; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class VirtualMachinesListTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - VirtualMachinesList model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"provisioningState\":\"Failed\",\"displayName\":\"sucocmnyyazttbtw\",\"moRefId\":\"qpuedckzywbiex\",\"folderPath\":\"eyueaxibxujwb\",\"restrictMovement\":\"Enabled\"},\"id\":\"lmuzy\",\"name\":\"xaepdkzjancuxr\",\"type\":\"d\"},{\"properties\":{\"provisioningState\":\"Succeeded\",\"displayName\":\"bniwdj\",\"moRefId\":\"zt\",\"folderPath\":\"bpg\",\"restrictMovement\":\"Enabled\"},\"id\":\"x\",\"name\":\"pzxbz\",\"type\":\"fzab\"},{\"properties\":{\"provisioningState\":\"Succeeded\",\"displayName\":\"xwtctyqiklbbovpl\",\"moRefId\":\"bhvgy\",\"folderPath\":\"uosvmkfssxqukk\",\"restrictMovement\":\"Enabled\"},\"id\":\"mg\",\"name\":\"xnkjzkdesl\",\"type\":\"vlopwiyighx\"},{\"properties\":{\"provisioningState\":\"Canceled\",\"displayName\":\"baiuebbaumny\",\"moRefId\":\"ped\",\"folderPath\":\"jn\",\"restrictMovement\":\"Disabled\"},\"id\":\"hsmtxpsiebtfhvp\",\"name\":\"sapskr\",\"type\":\"qmhjjdhtld\"}],\"nextLink\":\"yzxuutkncw\"}") - .toObject(VirtualMachinesList.class); - Assertions.assertEquals("yzxuutkncw", model.nextLink()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - VirtualMachinesList model - = new VirtualMachinesList() - .withValue(Arrays.asList(new VirtualMachineInner(), new VirtualMachineInner(), - new VirtualMachineInner(), new VirtualMachineInner())) - .withNextLink("yzxuutkncw"); - model = BinaryData.fromObject(model).toObject(VirtualMachinesList.class); - Assertions.assertEquals("yzxuutkncw", model.nextLink()); - } -} 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 21b83a458f32..000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/VmHostPlacementPolicyPropertiesTests.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.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\":[\"wr\",\"ehwagoh\",\"uffkmrqemvvh\"],\"hostMembers\":[\"tdrjfutacoebj\"],\"affinityType\":\"AntiAffinity\",\"affinityStrength\":\"Must\",\"azureHybridBenefitType\":\"None\",\"state\":\"Enabled\",\"displayName\":\"wcpmguaadraufac\",\"provisioningState\":\"Succeeded\"}") - .toObject(VmHostPlacementPolicyProperties.class); - Assertions.assertEquals(PlacementPolicyState.ENABLED, model.state()); - Assertions.assertEquals("wcpmguaadraufac", model.displayName()); - Assertions.assertEquals("wr", model.vmMembers().get(0)); - Assertions.assertEquals("tdrjfutacoebj", model.hostMembers().get(0)); - Assertions.assertEquals(AffinityType.ANTI_AFFINITY, model.affinityType()); - Assertions.assertEquals(AffinityStrength.MUST, model.affinityStrength()); - Assertions.assertEquals(AzureHybridBenefitType.NONE, model.azureHybridBenefitType()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - VmHostPlacementPolicyProperties model - = new VmHostPlacementPolicyProperties().withState(PlacementPolicyState.ENABLED) - .withDisplayName("wcpmguaadraufac") - .withVmMembers(Arrays.asList("wr", "ehwagoh", "uffkmrqemvvh")) - .withHostMembers(Arrays.asList("tdrjfutacoebj")) - .withAffinityType(AffinityType.ANTI_AFFINITY) - .withAffinityStrength(AffinityStrength.MUST) - .withAzureHybridBenefitType(AzureHybridBenefitType.NONE); - model = BinaryData.fromObject(model).toObject(VmHostPlacementPolicyProperties.class); - Assertions.assertEquals(PlacementPolicyState.ENABLED, model.state()); - Assertions.assertEquals("wcpmguaadraufac", model.displayName()); - Assertions.assertEquals("wr", model.vmMembers().get(0)); - Assertions.assertEquals("tdrjfutacoebj", model.hostMembers().get(0)); - Assertions.assertEquals(AffinityType.ANTI_AFFINITY, model.affinityType()); - Assertions.assertEquals(AffinityStrength.MUST, model.affinityStrength()); - Assertions.assertEquals(AzureHybridBenefitType.NONE, 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 fb669c60c547..000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/VmPlacementPolicyPropertiesTests.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.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\":[\"zov\",\"jjziuxxpsh\"],\"affinityType\":\"AntiAffinity\",\"state\":\"Enabled\",\"displayName\":\"lfg\",\"provisioningState\":\"Failed\"}") - .toObject(VmPlacementPolicyProperties.class); - Assertions.assertEquals(PlacementPolicyState.ENABLED, model.state()); - Assertions.assertEquals("lfg", model.displayName()); - Assertions.assertEquals("zov", 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("lfg") - .withVmMembers(Arrays.asList("zov", "jjziuxxpsh")) - .withAffinityType(AffinityType.ANTI_AFFINITY); - model = BinaryData.fromObject(model).toObject(VmPlacementPolicyProperties.class); - Assertions.assertEquals(PlacementPolicyState.ENABLED, model.state()); - Assertions.assertEquals("lfg", model.displayName()); - Assertions.assertEquals("zov", 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 1b3a538acecb..000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkDhcpEntityTests.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.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\":\"beddgssofw\",\"segments\":[\"qal\",\"rmnjijpx\",\"cqqudf\",\"byxbaaabjy\"],\"provisioningState\":\"Canceled\",\"revision\":6883789734469105291}") - .toObject(WorkloadNetworkDhcpEntity.class); - Assertions.assertEquals("beddgssofw", model.displayName()); - Assertions.assertEquals(6883789734469105291L, model.revision()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - WorkloadNetworkDhcpEntity model - = new WorkloadNetworkDhcpEntity().withDisplayName("beddgssofw").withRevision(6883789734469105291L); - model = BinaryData.fromObject(model).toObject(WorkloadNetworkDhcpEntity.class); - Assertions.assertEquals("beddgssofw", model.displayName()); - Assertions.assertEquals(6883789734469105291L, 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 09ef2eba5da7..000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkDhcpInnerTests.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.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\":\"t\",\"segments\":[\"lr\",\"cyjmoadsuvarmy\",\"dmjsjqb\"],\"provisioningState\":\"Building\",\"revision\":1070182178135164646},\"id\":\"wlycoduhpkxkg\",\"name\":\"mareqnajxqugj\",\"type\":\"ky\"}") - .toObject(WorkloadNetworkDhcpInner.class); - Assertions.assertEquals("t", model.properties().displayName()); - Assertions.assertEquals(1070182178135164646L, model.properties().revision()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - WorkloadNetworkDhcpInner model = new WorkloadNetworkDhcpInner() - .withProperties(new WorkloadNetworkDhcpEntity().withDisplayName("t").withRevision(1070182178135164646L)); - model = BinaryData.fromObject(model).toObject(WorkloadNetworkDhcpInner.class); - Assertions.assertEquals("t", model.properties().displayName()); - Assertions.assertEquals(1070182178135164646L, 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 1af73a3b4b0e..000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkDhcpListTests.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.fluent.models.WorkloadNetworkDhcpInner; -import com.azure.resourcemanager.avs.models.WorkloadNetworkDhcpEntity; -import com.azure.resourcemanager.avs.models.WorkloadNetworkDhcpList; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class WorkloadNetworkDhcpListTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - WorkloadNetworkDhcpList model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"dhcpType\":\"WorkloadNetworkDhcpEntity\",\"displayName\":\"xdy\",\"segments\":[\"y\",\"cogjltdtbn\",\"hadoocrk\",\"cikhnv\"],\"provisioningState\":\"Succeeded\",\"revision\":1095041786802242377},\"id\":\"queziky\",\"name\":\"ggxkallatmelwuip\",\"type\":\"ccjzkzivgvv\"},{\"properties\":{\"dhcpType\":\"WorkloadNetworkDhcpEntity\",\"displayName\":\"y\",\"segments\":[\"rnxxmueed\",\"drd\",\"stkwqqtch\"],\"provisioningState\":\"Canceled\",\"revision\":6465025791585269802},\"id\":\"d\",\"name\":\"aygdvwvgpioh\",\"type\":\"wxrt\"},{\"properties\":{\"dhcpType\":\"WorkloadNetworkDhcpEntity\",\"displayName\":\"xepxgyqagvrvmn\",\"segments\":[\"kghimdblxgwimfnj\",\"fjxwmsz\",\"kfoqreyfkzikfj\"],\"provisioningState\":\"Succeeded\",\"revision\":488040231209258224},\"id\":\"xwczelpcire\",\"name\":\"sfeaenwabfat\",\"type\":\"lddxbjhwua\"},{\"properties\":{\"dhcpType\":\"WorkloadNetworkDhcpEntity\",\"displayName\":\"zjosp\",\"segments\":[\"ulpjr\",\"xagl\"],\"provisioningState\":\"Updating\",\"revision\":7892134745945256266},\"id\":\"sytxitcskfcktqum\",\"name\":\"ekkezzikhlyfjh\",\"type\":\"gqggebdunygae\"}],\"nextLink\":\"db\"}") - .toObject(WorkloadNetworkDhcpList.class); - Assertions.assertEquals("xdy", model.value().get(0).properties().displayName()); - Assertions.assertEquals(1095041786802242377L, model.value().get(0).properties().revision()); - Assertions.assertEquals("db", model.nextLink()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - WorkloadNetworkDhcpList model = new WorkloadNetworkDhcpList().withValue(Arrays.asList( - new WorkloadNetworkDhcpInner().withProperties( - new WorkloadNetworkDhcpEntity().withDisplayName("xdy").withRevision(1095041786802242377L)), - new WorkloadNetworkDhcpInner().withProperties( - new WorkloadNetworkDhcpEntity().withDisplayName("y").withRevision(6465025791585269802L)), - new WorkloadNetworkDhcpInner().withProperties( - new WorkloadNetworkDhcpEntity().withDisplayName("xepxgyqagvrvmn").withRevision(488040231209258224L)), - new WorkloadNetworkDhcpInner().withProperties( - new WorkloadNetworkDhcpEntity().withDisplayName("zjosp").withRevision(7892134745945256266L)))) - .withNextLink("db"); - model = BinaryData.fromObject(model).toObject(WorkloadNetworkDhcpList.class); - Assertions.assertEquals("xdy", model.value().get(0).properties().displayName()); - Assertions.assertEquals(1095041786802242377L, model.value().get(0).properties().revision()); - Assertions.assertEquals("db", model.nextLink()); - } -} 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 6be232352d03..000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkDhcpRelayTests.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.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\":[\"kwdlenrdsutujba\",\"pjuohminyfl\",\"orwmduvwpklv\"],\"displayName\":\"mygdxpgpqch\",\"segments\":[\"epn\"],\"provisioningState\":\"Updating\",\"revision\":7502230535508252511}") - .toObject(WorkloadNetworkDhcpRelay.class); - Assertions.assertEquals("mygdxpgpqch", model.displayName()); - Assertions.assertEquals(7502230535508252511L, model.revision()); - Assertions.assertEquals("kwdlenrdsutujba", model.serverAddresses().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - WorkloadNetworkDhcpRelay model = new WorkloadNetworkDhcpRelay().withDisplayName("mygdxpgpqch") - .withRevision(7502230535508252511L) - .withServerAddresses(Arrays.asList("kwdlenrdsutujba", "pjuohminyfl", "orwmduvwpklv")); - model = BinaryData.fromObject(model).toObject(WorkloadNetworkDhcpRelay.class); - Assertions.assertEquals("mygdxpgpqch", model.displayName()); - Assertions.assertEquals(7502230535508252511L, model.revision()); - Assertions.assertEquals("kwdlenrdsutujba", 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 5ce2ec6fd127..000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkDhcpServerTests.java +++ /dev/null @@ -1,35 +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\":\"ibbdaxconfoza\",\"leaseTime\":3754579921352518306,\"displayName\":\"kokwbqplhlvnu\",\"segments\":[\"zlrphwzs\",\"l\"],\"provisioningState\":\"Canceled\",\"revision\":6472514649626093953}") - .toObject(WorkloadNetworkDhcpServer.class); - Assertions.assertEquals("kokwbqplhlvnu", model.displayName()); - Assertions.assertEquals(6472514649626093953L, model.revision()); - Assertions.assertEquals("ibbdaxconfoza", model.serverAddress()); - Assertions.assertEquals(3754579921352518306L, model.leaseTime()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - WorkloadNetworkDhcpServer model = new WorkloadNetworkDhcpServer().withDisplayName("kokwbqplhlvnu") - .withRevision(6472514649626093953L) - .withServerAddress("ibbdaxconfoza") - .withLeaseTime(3754579921352518306L); - model = BinaryData.fromObject(model).toObject(WorkloadNetworkDhcpServer.class); - Assertions.assertEquals("kokwbqplhlvnu", model.displayName()); - Assertions.assertEquals(6472514649626093953L, model.revision()); - Assertions.assertEquals("ibbdaxconfoza", model.serverAddress()); - Assertions.assertEquals(3754579921352518306L, 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 e7b00b498d51..000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkDnsServiceInnerTests.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.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\":\"odko\",\"dnsServiceIp\":\"bw\",\"defaultDnsZone\":\"jhemms\",\"fqdnZones\":[\"kcrodtjinfw\",\"lfltka\"],\"logLevel\":\"FATAL\",\"status\":\"SUCCESS\",\"provisioningState\":\"Canceled\",\"revision\":6193547240906523394},\"id\":\"kggkfpa\",\"name\":\"ao\",\"type\":\"pulpqblylsyxk\"}") - .toObject(WorkloadNetworkDnsServiceInner.class); - Assertions.assertEquals("odko", model.displayName()); - Assertions.assertEquals("bw", model.dnsServiceIp()); - Assertions.assertEquals("jhemms", model.defaultDnsZone()); - Assertions.assertEquals("kcrodtjinfw", model.fqdnZones().get(0)); - Assertions.assertEquals(DnsServiceLogLevelEnum.FATAL, model.logLevel()); - Assertions.assertEquals(6193547240906523394L, model.revision()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - WorkloadNetworkDnsServiceInner model = new WorkloadNetworkDnsServiceInner().withDisplayName("odko") - .withDnsServiceIp("bw") - .withDefaultDnsZone("jhemms") - .withFqdnZones(Arrays.asList("kcrodtjinfw", "lfltka")) - .withLogLevel(DnsServiceLogLevelEnum.FATAL) - .withRevision(6193547240906523394L); - model = BinaryData.fromObject(model).toObject(WorkloadNetworkDnsServiceInner.class); - Assertions.assertEquals("odko", model.displayName()); - Assertions.assertEquals("bw", model.dnsServiceIp()); - Assertions.assertEquals("jhemms", model.defaultDnsZone()); - Assertions.assertEquals("kcrodtjinfw", model.fqdnZones().get(0)); - Assertions.assertEquals(DnsServiceLogLevelEnum.FATAL, model.logLevel()); - Assertions.assertEquals(6193547240906523394L, 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 5f19649acdb0..000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkDnsServicePropertiesTests.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.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\":\"nsj\",\"dnsServiceIp\":\"vti\",\"defaultDnsZone\":\"xsdszuempsb\",\"fqdnZones\":[\"z\"],\"logLevel\":\"INFO\",\"status\":\"SUCCESS\",\"provisioningState\":\"Building\",\"revision\":8978245391305162368}") - .toObject(WorkloadNetworkDnsServiceProperties.class); - Assertions.assertEquals("nsj", model.displayName()); - Assertions.assertEquals("vti", model.dnsServiceIp()); - Assertions.assertEquals("xsdszuempsb", model.defaultDnsZone()); - Assertions.assertEquals("z", model.fqdnZones().get(0)); - Assertions.assertEquals(DnsServiceLogLevelEnum.INFO, model.logLevel()); - Assertions.assertEquals(8978245391305162368L, model.revision()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - WorkloadNetworkDnsServiceProperties model = new WorkloadNetworkDnsServiceProperties().withDisplayName("nsj") - .withDnsServiceIp("vti") - .withDefaultDnsZone("xsdszuempsb") - .withFqdnZones(Arrays.asList("z")) - .withLogLevel(DnsServiceLogLevelEnum.INFO) - .withRevision(8978245391305162368L); - model = BinaryData.fromObject(model).toObject(WorkloadNetworkDnsServiceProperties.class); - Assertions.assertEquals("nsj", model.displayName()); - Assertions.assertEquals("vti", model.dnsServiceIp()); - Assertions.assertEquals("xsdszuempsb", model.defaultDnsZone()); - Assertions.assertEquals("z", model.fqdnZones().get(0)); - Assertions.assertEquals(DnsServiceLogLevelEnum.INFO, model.logLevel()); - Assertions.assertEquals(8978245391305162368L, 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 e6ee3fd49450..000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkDnsServicesListTests.java +++ /dev/null @@ -1,48 +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 com.azure.resourcemanager.avs.models.WorkloadNetworkDnsServicesList; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class WorkloadNetworkDnsServicesListTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - WorkloadNetworkDnsServicesList model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"displayName\":\"rtuzqogs\",\"dnsServiceIp\":\"nevfdnw\",\"defaultDnsZone\":\"mewzsyyc\",\"fqdnZones\":[\"soibjudpfrx\",\"rthzvaytdwkqbrqu\",\"paxh\",\"xiilivpdtiirqt\"],\"logLevel\":\"ERROR\",\"status\":\"FAILURE\",\"provisioningState\":\"Canceled\",\"revision\":3650504881751090055},\"id\":\"squyfxrxxlep\",\"name\":\"ramxjezwlwnw\",\"type\":\"uqlcvydy\"}],\"nextLink\":\"tdooaoj\"}") - .toObject(WorkloadNetworkDnsServicesList.class); - Assertions.assertEquals("rtuzqogs", model.value().get(0).displayName()); - Assertions.assertEquals("nevfdnw", model.value().get(0).dnsServiceIp()); - Assertions.assertEquals("mewzsyyc", model.value().get(0).defaultDnsZone()); - Assertions.assertEquals("soibjudpfrx", model.value().get(0).fqdnZones().get(0)); - Assertions.assertEquals(DnsServiceLogLevelEnum.ERROR, model.value().get(0).logLevel()); - Assertions.assertEquals(3650504881751090055L, model.value().get(0).revision()); - Assertions.assertEquals("tdooaoj", model.nextLink()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - WorkloadNetworkDnsServicesList model = new WorkloadNetworkDnsServicesList() - .withValue(Arrays.asList(new WorkloadNetworkDnsServiceInner().withDisplayName("rtuzqogs") - .withDnsServiceIp("nevfdnw") - .withDefaultDnsZone("mewzsyyc") - .withFqdnZones(Arrays.asList("soibjudpfrx", "rthzvaytdwkqbrqu", "paxh", "xiilivpdtiirqt")) - .withLogLevel(DnsServiceLogLevelEnum.ERROR) - .withRevision(3650504881751090055L))) - .withNextLink("tdooaoj"); - model = BinaryData.fromObject(model).toObject(WorkloadNetworkDnsServicesList.class); - Assertions.assertEquals("rtuzqogs", model.value().get(0).displayName()); - Assertions.assertEquals("nevfdnw", model.value().get(0).dnsServiceIp()); - Assertions.assertEquals("mewzsyyc", model.value().get(0).defaultDnsZone()); - Assertions.assertEquals("soibjudpfrx", model.value().get(0).fqdnZones().get(0)); - Assertions.assertEquals(DnsServiceLogLevelEnum.ERROR, model.value().get(0).logLevel()); - Assertions.assertEquals(3650504881751090055L, model.value().get(0).revision()); - Assertions.assertEquals("tdooaoj", model.nextLink()); - } -} 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 fc0a0428f299..000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkDnsZoneInnerTests.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.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\":\"whccs\",\"domain\":[\"aivwitqscywu\",\"gwol\"],\"dnsServerIps\":[\"zbwemh\",\"i\",\"sbrgz\",\"wmsweypqwd\"],\"sourceIp\":\"gicccnxqhuex\",\"dnsServices\":5852678166783434118,\"provisioningState\":\"Building\",\"revision\":3065309169479098927},\"id\":\"ywemhzrn\",\"name\":\"sdtclusiypbs\",\"type\":\"gytguslfead\"}") - .toObject(WorkloadNetworkDnsZoneInner.class); - Assertions.assertEquals("whccs", model.displayName()); - Assertions.assertEquals("aivwitqscywu", model.domain().get(0)); - Assertions.assertEquals("zbwemh", model.dnsServerIps().get(0)); - Assertions.assertEquals("gicccnxqhuex", model.sourceIp()); - Assertions.assertEquals(5852678166783434118L, model.dnsServices()); - Assertions.assertEquals(3065309169479098927L, model.revision()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - WorkloadNetworkDnsZoneInner model = new WorkloadNetworkDnsZoneInner().withDisplayName("whccs") - .withDomain(Arrays.asList("aivwitqscywu", "gwol")) - .withDnsServerIps(Arrays.asList("zbwemh", "i", "sbrgz", "wmsweypqwd")) - .withSourceIp("gicccnxqhuex") - .withDnsServices(5852678166783434118L) - .withRevision(3065309169479098927L); - model = BinaryData.fromObject(model).toObject(WorkloadNetworkDnsZoneInner.class); - Assertions.assertEquals("whccs", model.displayName()); - Assertions.assertEquals("aivwitqscywu", model.domain().get(0)); - Assertions.assertEquals("zbwemh", model.dnsServerIps().get(0)); - Assertions.assertEquals("gicccnxqhuex", model.sourceIp()); - Assertions.assertEquals(5852678166783434118L, model.dnsServices()); - Assertions.assertEquals(3065309169479098927L, 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 639bf2e4eaab..000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkDnsZonePropertiesTests.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.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\":\"gq\",\"domain\":[\"hejhzisx\",\"fpel\",\"lppvksrpq\"],\"dnsServerIps\":[\"zraehtwd\",\"r\",\"tswiby\"],\"sourceIp\":\"dl\",\"dnsServices\":6608655504184346105,\"provisioningState\":\"Updating\",\"revision\":397353475814237502}") - .toObject(WorkloadNetworkDnsZoneProperties.class); - Assertions.assertEquals("gq", model.displayName()); - Assertions.assertEquals("hejhzisx", model.domain().get(0)); - Assertions.assertEquals("zraehtwd", model.dnsServerIps().get(0)); - Assertions.assertEquals("dl", model.sourceIp()); - Assertions.assertEquals(6608655504184346105L, model.dnsServices()); - Assertions.assertEquals(397353475814237502L, model.revision()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - WorkloadNetworkDnsZoneProperties model = new WorkloadNetworkDnsZoneProperties().withDisplayName("gq") - .withDomain(Arrays.asList("hejhzisx", "fpel", "lppvksrpq")) - .withDnsServerIps(Arrays.asList("zraehtwd", "r", "tswiby")) - .withSourceIp("dl") - .withDnsServices(6608655504184346105L) - .withRevision(397353475814237502L); - model = BinaryData.fromObject(model).toObject(WorkloadNetworkDnsZoneProperties.class); - Assertions.assertEquals("gq", model.displayName()); - Assertions.assertEquals("hejhzisx", model.domain().get(0)); - Assertions.assertEquals("zraehtwd", model.dnsServerIps().get(0)); - Assertions.assertEquals("dl", model.sourceIp()); - Assertions.assertEquals(6608655504184346105L, model.dnsServices()); - Assertions.assertEquals(397353475814237502L, 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 fec8471f7271..000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkDnsZonesListTests.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.util.BinaryData; -import com.azure.resourcemanager.avs.fluent.models.WorkloadNetworkDnsZoneInner; -import com.azure.resourcemanager.avs.models.WorkloadNetworkDnsZonesList; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class WorkloadNetworkDnsZonesListTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - WorkloadNetworkDnsZonesList model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"displayName\":\"kjj\",\"domain\":[\"rbuukzclewyhmlwp\",\"ztzp\",\"fn\"],\"dnsServerIps\":[\"wyfzqwhxxbuyqa\",\"zfeqztppri\",\"lxorjaltolmncws\",\"bqwcsdbnwdcf\"],\"sourceIp\":\"cqdpfuv\",\"dnsServices\":4684256943455156597,\"provisioningState\":\"Updating\",\"revision\":4256204448914480797},\"id\":\"xbvtvudu\",\"name\":\"ncormrlxqtvcof\",\"type\":\"dflvkg\"},{\"properties\":{\"displayName\":\"gdknnqv\",\"domain\":[\"nqntorudsgsahm\",\"yc\"],\"dnsServerIps\":[\"uwjuetaeburuvdmo\",\"s\",\"zlxwabmqoefkifr\"],\"sourceIp\":\"puqujmqlgkfbtn\",\"dnsServices\":6879764245530477433,\"provisioningState\":\"Failed\",\"revision\":6198658030660554635},\"id\":\"tujitcjedft\",\"name\":\"waezkojvd\",\"type\":\"pzfoqoui\"},{\"properties\":{\"displayName\":\"xarzgszufoxciq\",\"domain\":[\"doamciodhkha\",\"xkhnzbonlwnto\",\"gokdwbwhks\",\"zcmrvexztvb\"],\"dnsServerIps\":[\"sfraoyzko\",\"wtl\",\"nguxawqaldsy\"],\"sourceIp\":\"ximerqfobwyznk\",\"dnsServices\":5942973397791682441,\"provisioningState\":\"Updating\",\"revision\":6293103125482065030},\"id\":\"a\",\"name\":\"m\",\"type\":\"r\"},{\"properties\":{\"displayName\":\"snfdsdoakgtdl\",\"domain\":[\"zev\",\"l\",\"ewpusdsttwvogvb\",\"ejdcngqqmoakuf\"],\"dnsServerIps\":[\"zr\",\"rdgrtw\",\"enuuzkopbm\"],\"sourceIp\":\"rfdwoyu\",\"dnsServices\":4568735292262817818,\"provisioningState\":\"Canceled\",\"revision\":8625951963291223470},\"id\":\"bhdmsmlmzqhof\",\"name\":\"rmaequ\",\"type\":\"ah\"}],\"nextLink\":\"cslfaoqzpiyylha\"}") - .toObject(WorkloadNetworkDnsZonesList.class); - Assertions.assertEquals("kjj", model.value().get(0).displayName()); - Assertions.assertEquals("rbuukzclewyhmlwp", model.value().get(0).domain().get(0)); - Assertions.assertEquals("wyfzqwhxxbuyqa", model.value().get(0).dnsServerIps().get(0)); - Assertions.assertEquals("cqdpfuv", model.value().get(0).sourceIp()); - Assertions.assertEquals(4684256943455156597L, model.value().get(0).dnsServices()); - Assertions.assertEquals(4256204448914480797L, model.value().get(0).revision()); - Assertions.assertEquals("cslfaoqzpiyylha", model.nextLink()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - WorkloadNetworkDnsZonesList model - = new WorkloadNetworkDnsZonesList() - .withValue(Arrays.asList( - new WorkloadNetworkDnsZoneInner().withDisplayName("kjj") - .withDomain(Arrays.asList("rbuukzclewyhmlwp", "ztzp", "fn")) - .withDnsServerIps( - Arrays.asList("wyfzqwhxxbuyqa", "zfeqztppri", "lxorjaltolmncws", "bqwcsdbnwdcf")) - .withSourceIp("cqdpfuv") - .withDnsServices(4684256943455156597L) - .withRevision(4256204448914480797L), - new WorkloadNetworkDnsZoneInner().withDisplayName("gdknnqv") - .withDomain(Arrays.asList("nqntorudsgsahm", "yc")) - .withDnsServerIps(Arrays.asList("uwjuetaeburuvdmo", "s", "zlxwabmqoefkifr")) - .withSourceIp("puqujmqlgkfbtn") - .withDnsServices(6879764245530477433L) - .withRevision(6198658030660554635L), - new WorkloadNetworkDnsZoneInner().withDisplayName("xarzgszufoxciq") - .withDomain(Arrays.asList("doamciodhkha", "xkhnzbonlwnto", "gokdwbwhks", "zcmrvexztvb")) - .withDnsServerIps(Arrays.asList("sfraoyzko", "wtl", "nguxawqaldsy")) - .withSourceIp("ximerqfobwyznk") - .withDnsServices(5942973397791682441L) - .withRevision(6293103125482065030L), - new WorkloadNetworkDnsZoneInner().withDisplayName("snfdsdoakgtdl") - .withDomain(Arrays.asList("zev", "l", "ewpusdsttwvogvb", "ejdcngqqmoakuf")) - .withDnsServerIps(Arrays.asList("zr", "rdgrtw", "enuuzkopbm")) - .withSourceIp("rfdwoyu") - .withDnsServices(4568735292262817818L) - .withRevision(8625951963291223470L))) - .withNextLink("cslfaoqzpiyylha"); - model = BinaryData.fromObject(model).toObject(WorkloadNetworkDnsZonesList.class); - Assertions.assertEquals("kjj", model.value().get(0).displayName()); - Assertions.assertEquals("rbuukzclewyhmlwp", model.value().get(0).domain().get(0)); - Assertions.assertEquals("wyfzqwhxxbuyqa", model.value().get(0).dnsServerIps().get(0)); - Assertions.assertEquals("cqdpfuv", model.value().get(0).sourceIp()); - Assertions.assertEquals(4684256943455156597L, model.value().get(0).dnsServices()); - Assertions.assertEquals(4256204448914480797L, model.value().get(0).revision()); - Assertions.assertEquals("cslfaoqzpiyylha", model.nextLink()); - } -} 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 bd97ad598c46..000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkGatewayInnerTests.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.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\":{\"provisioningState\":\"Canceled\",\"displayName\":\"fajpjorwk\",\"path\":\"yhgbijtjivfx\"},\"id\":\"jabibsystawf\",\"name\":\"djpvkvpbjxbkz\",\"type\":\"zkdvncja\"}") - .toObject(WorkloadNetworkGatewayInner.class); - Assertions.assertEquals("fajpjorwk", model.displayName()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - WorkloadNetworkGatewayInner model = new WorkloadNetworkGatewayInner().withDisplayName("fajpjorwk"); - model = BinaryData.fromObject(model).toObject(WorkloadNetworkGatewayInner.class); - Assertions.assertEquals("fajpjorwk", 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 8a774492d728..000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkGatewayListTests.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.WorkloadNetworkGatewayInner; -import com.azure.resourcemanager.avs.models.WorkloadNetworkGatewayList; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class WorkloadNetworkGatewayListTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - WorkloadNetworkGatewayList model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"provisioningState\":\"Building\",\"displayName\":\"ty\",\"path\":\"evxccedcp\"},\"id\":\"dyodnwzxltj\",\"name\":\"vnhltiugcx\",\"type\":\"avvwxqi\"},{\"properties\":{\"provisioningState\":\"Deleting\",\"displayName\":\"y\",\"path\":\"xwlmdjr\"},\"id\":\"fgbvfvpdbo\",\"name\":\"acizsjqlhkrr\",\"type\":\"bdeibqipqk\"}],\"nextLink\":\"vxndz\"}") - .toObject(WorkloadNetworkGatewayList.class); - Assertions.assertEquals("ty", model.value().get(0).displayName()); - Assertions.assertEquals("vxndz", model.nextLink()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - WorkloadNetworkGatewayList model = new WorkloadNetworkGatewayList() - .withValue(Arrays.asList(new WorkloadNetworkGatewayInner().withDisplayName("ty"), - new WorkloadNetworkGatewayInner().withDisplayName("y"))) - .withNextLink("vxndz"); - model = BinaryData.fromObject(model).toObject(WorkloadNetworkGatewayList.class); - Assertions.assertEquals("ty", model.value().get(0).displayName()); - Assertions.assertEquals("vxndz", model.nextLink()); - } -} 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 2f310cda9b74..000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkGatewayPropertiesTests.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.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("{\"provisioningState\":\"Deleting\",\"displayName\":\"r\",\"path\":\"akmokzhjjklf\"}") - .toObject(WorkloadNetworkGatewayProperties.class); - Assertions.assertEquals("r", model.displayName()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - WorkloadNetworkGatewayProperties model = new WorkloadNetworkGatewayProperties().withDisplayName("r"); - model = BinaryData.fromObject(model).toObject(WorkloadNetworkGatewayProperties.class); - Assertions.assertEquals("r", 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 e63c38744bda..000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkInnerTests.java +++ /dev/null @@ -1,23 +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( - "{\"properties\":{\"provisioningState\":\"Building\"},\"id\":\"mnzgmwznmabi\",\"name\":\"nsorgjhxbldt\",\"type\":\"wwrlkdmtncv\"}") - .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 3d8cbcacbefd..000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkListTests.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.WorkloadNetworkInner; -import com.azure.resourcemanager.avs.models.WorkloadNetworkList; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class WorkloadNetworkListTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - WorkloadNetworkList model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"provisioningState\":\"Succeeded\"},\"id\":\"uu\",\"name\":\"jfqka\",\"type\":\"e\"},{\"properties\":{\"provisioningState\":\"Deleting\"},\"id\":\"pubjibw\",\"name\":\"iftohqkvpu\",\"type\":\"ksgplsa\"},{\"properties\":{\"provisioningState\":\"Succeeded\"},\"id\":\"synljphuopxodl\",\"name\":\"iyntorzihle\",\"type\":\"sjswsrms\"},{\"properties\":{\"provisioningState\":\"Updating\"},\"id\":\"zbchckqqzqioxiy\",\"name\":\"uiizynke\",\"type\":\"yatrwy\"}],\"nextLink\":\"mibzyhwitsmypyyn\"}") - .toObject(WorkloadNetworkList.class); - Assertions.assertEquals("mibzyhwitsmypyyn", model.nextLink()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - WorkloadNetworkList model - = new WorkloadNetworkList() - .withValue(Arrays.asList(new WorkloadNetworkInner(), new WorkloadNetworkInner(), - new WorkloadNetworkInner(), new WorkloadNetworkInner())) - .withNextLink("mibzyhwitsmypyyn"); - model = BinaryData.fromObject(model).toObject(WorkloadNetworkList.class); - Assertions.assertEquals("mibzyhwitsmypyyn", model.nextLink()); - } -} 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 491d5319bb9a..000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkPortMirroringInnerTests.java +++ /dev/null @@ -1,40 +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\":\"vdkfwynwcvtbvk\",\"direction\":\"BIDIRECTIONAL\",\"source\":\"tnvyqiatkzwp\",\"destination\":\"p\",\"status\":\"FAILURE\",\"provisioningState\":\"Updating\",\"revision\":5044236127047100720},\"id\":\"v\",\"name\":\"ccyajg\",\"type\":\"qfhwyg\"}") - .toObject(WorkloadNetworkPortMirroringInner.class); - Assertions.assertEquals("vdkfwynwcvtbvk", model.displayName()); - Assertions.assertEquals(PortMirroringDirectionEnum.BIDIRECTIONAL, model.direction()); - Assertions.assertEquals("tnvyqiatkzwp", model.source()); - Assertions.assertEquals("p", model.destination()); - Assertions.assertEquals(5044236127047100720L, model.revision()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - WorkloadNetworkPortMirroringInner model - = new WorkloadNetworkPortMirroringInner().withDisplayName("vdkfwynwcvtbvk") - .withDirection(PortMirroringDirectionEnum.BIDIRECTIONAL) - .withSource("tnvyqiatkzwp") - .withDestination("p") - .withRevision(5044236127047100720L); - model = BinaryData.fromObject(model).toObject(WorkloadNetworkPortMirroringInner.class); - Assertions.assertEquals("vdkfwynwcvtbvk", model.displayName()); - Assertions.assertEquals(PortMirroringDirectionEnum.BIDIRECTIONAL, model.direction()); - Assertions.assertEquals("tnvyqiatkzwp", model.source()); - Assertions.assertEquals("p", model.destination()); - Assertions.assertEquals(5044236127047100720L, 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 37b3da15648b..000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkPortMirroringListTests.java +++ /dev/null @@ -1,60 +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 com.azure.resourcemanager.avs.models.WorkloadNetworkPortMirroringList; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class WorkloadNetworkPortMirroringListTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - WorkloadNetworkPortMirroringList model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"displayName\":\"uwqlgzrfzeey\",\"direction\":\"EGRESS\",\"source\":\"ikayuhqlbjbsybb\",\"destination\":\"r\",\"status\":\"FAILURE\",\"provisioningState\":\"Updating\",\"revision\":1497011486595637711},\"id\":\"vm\",\"name\":\"ipaslthaqfxssmwu\",\"type\":\"wbdsr\"},{\"properties\":{\"displayName\":\"drhneuyow\",\"direction\":\"EGRESS\",\"source\":\"ytisibir\",\"destination\":\"pikpz\",\"status\":\"SUCCESS\",\"provisioningState\":\"Updating\",\"revision\":3967363356786779271},\"id\":\"zxiavrm\",\"name\":\"zonokixrjqci\",\"type\":\"gzpfrla\"},{\"properties\":{\"displayName\":\"rnwoiindfp\",\"direction\":\"BIDIRECTIONAL\",\"source\":\"lwbtlhf\",\"destination\":\"jcdh\",\"status\":\"FAILURE\",\"provisioningState\":\"Building\",\"revision\":127022258924821579},\"id\":\"feljagrqm\",\"name\":\"hldvriii\",\"type\":\"jnalghf\"},{\"properties\":{\"displayName\":\"vsexsowuelu\",\"direction\":\"BIDIRECTIONAL\",\"source\":\"hhxvrhmzkwpj\",\"destination\":\"wspughftqsxhqx\",\"status\":\"FAILURE\",\"provisioningState\":\"Succeeded\",\"revision\":6381082417075979554},\"id\":\"igrjguufzdm\",\"name\":\"yqtfihwh\",\"type\":\"otzi\"}],\"nextLink\":\"amvpphoszqzudph\"}") - .toObject(WorkloadNetworkPortMirroringList.class); - Assertions.assertEquals("uwqlgzrfzeey", model.value().get(0).displayName()); - Assertions.assertEquals(PortMirroringDirectionEnum.EGRESS, model.value().get(0).direction()); - Assertions.assertEquals("ikayuhqlbjbsybb", model.value().get(0).source()); - Assertions.assertEquals("r", model.value().get(0).destination()); - Assertions.assertEquals(1497011486595637711L, model.value().get(0).revision()); - Assertions.assertEquals("amvpphoszqzudph", model.nextLink()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - WorkloadNetworkPortMirroringList model = new WorkloadNetworkPortMirroringList().withValue(Arrays.asList( - new WorkloadNetworkPortMirroringInner().withDisplayName("uwqlgzrfzeey") - .withDirection(PortMirroringDirectionEnum.EGRESS) - .withSource("ikayuhqlbjbsybb") - .withDestination("r") - .withRevision(1497011486595637711L), - new WorkloadNetworkPortMirroringInner().withDisplayName("drhneuyow") - .withDirection(PortMirroringDirectionEnum.EGRESS) - .withSource("ytisibir") - .withDestination("pikpz") - .withRevision(3967363356786779271L), - new WorkloadNetworkPortMirroringInner().withDisplayName("rnwoiindfp") - .withDirection(PortMirroringDirectionEnum.BIDIRECTIONAL) - .withSource("lwbtlhf") - .withDestination("jcdh") - .withRevision(127022258924821579L), - new WorkloadNetworkPortMirroringInner().withDisplayName("vsexsowuelu") - .withDirection(PortMirroringDirectionEnum.BIDIRECTIONAL) - .withSource("hhxvrhmzkwpj") - .withDestination("wspughftqsxhqx") - .withRevision(6381082417075979554L))) - .withNextLink("amvpphoszqzudph"); - model = BinaryData.fromObject(model).toObject(WorkloadNetworkPortMirroringList.class); - Assertions.assertEquals("uwqlgzrfzeey", model.value().get(0).displayName()); - Assertions.assertEquals(PortMirroringDirectionEnum.EGRESS, model.value().get(0).direction()); - Assertions.assertEquals("ikayuhqlbjbsybb", model.value().get(0).source()); - Assertions.assertEquals("r", model.value().get(0).destination()); - Assertions.assertEquals(1497011486595637711L, model.value().get(0).revision()); - Assertions.assertEquals("amvpphoszqzudph", model.nextLink()); - } -} 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 dc61d7128adb..000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkPortMirroringPropertiesTests.java +++ /dev/null @@ -1,40 +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\":\"vdnkfxusem\",\"direction\":\"BIDIRECTIONAL\",\"source\":\"muhapfcqdpsqxqv\",\"destination\":\"vuoy\",\"status\":\"SUCCESS\",\"provisioningState\":\"Succeeded\",\"revision\":4509499977856951739}") - .toObject(WorkloadNetworkPortMirroringProperties.class); - Assertions.assertEquals("vdnkfxusem", model.displayName()); - Assertions.assertEquals(PortMirroringDirectionEnum.BIDIRECTIONAL, model.direction()); - Assertions.assertEquals("muhapfcqdpsqxqv", model.source()); - Assertions.assertEquals("vuoy", model.destination()); - Assertions.assertEquals(4509499977856951739L, model.revision()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - WorkloadNetworkPortMirroringProperties model - = new WorkloadNetworkPortMirroringProperties().withDisplayName("vdnkfxusem") - .withDirection(PortMirroringDirectionEnum.BIDIRECTIONAL) - .withSource("muhapfcqdpsqxqv") - .withDestination("vuoy") - .withRevision(4509499977856951739L); - model = BinaryData.fromObject(model).toObject(WorkloadNetworkPortMirroringProperties.class); - Assertions.assertEquals("vdnkfxusem", model.displayName()); - Assertions.assertEquals(PortMirroringDirectionEnum.BIDIRECTIONAL, model.direction()); - Assertions.assertEquals("muhapfcqdpsqxqv", model.source()); - Assertions.assertEquals("vuoy", model.destination()); - Assertions.assertEquals(4509499977856951739L, model.revision()); - } -} diff --git a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkPropertiesTests.java b/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkPropertiesTests.java deleted file mode 100644 index c1c899fcd823..000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkPropertiesTests.java +++ /dev/null @@ -1,22 +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.WorkloadNetworkProperties; - -public final class WorkloadNetworkPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - WorkloadNetworkProperties model - = BinaryData.fromString("{\"provisioningState\":\"Succeeded\"}").toObject(WorkloadNetworkProperties.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - WorkloadNetworkProperties model = new WorkloadNetworkProperties(); - model = BinaryData.fromObject(model).toObject(WorkloadNetworkProperties.class); - } -} 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 03ca42af2954..000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkPublicIPsListTests.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.WorkloadNetworkPublicIpInner; -import com.azure.resourcemanager.avs.models.WorkloadNetworkPublicIPsList; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class WorkloadNetworkPublicIPsListTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - WorkloadNetworkPublicIPsList model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"displayName\":\"pqlmfe\",\"numberOfPublicIPs\":5076002706235027340,\"publicIPBlock\":\"wkyhkobopgxe\",\"provisioningState\":\"Deleting\"},\"id\":\"epbqpcrfkbw\",\"name\":\"csnjvcdwxlpqekft\",\"type\":\"khtj\"},{\"properties\":{\"displayName\":\"ngwfqatm\",\"numberOfPublicIPs\":6035898469586356847,\"publicIPBlock\":\"dvypgikdgsz\",\"provisioningState\":\"Canceled\"},\"id\":\"irryuzhlh\",\"name\":\"joqrvqqaatj\",\"type\":\"nrvgoupmfiibfgg\"},{\"properties\":{\"displayName\":\"olvrw\",\"numberOfPublicIPs\":639224671106145818,\"publicIPBlock\":\"k\",\"provisioningState\":\"Failed\"},\"id\":\"wjygvjayvblmhvk\",\"name\":\"uhbxvvy\",\"type\":\"gsopbyrqufegxu\"},{\"properties\":{\"displayName\":\"fbn\",\"numberOfPublicIPs\":2314508611274397861,\"publicIPBlock\":\"l\",\"provisioningState\":\"Building\"},\"id\":\"itvgbmhrixkwm\",\"name\":\"ijejvegrhbpn\",\"type\":\"ixexcc\"}],\"nextLink\":\"reaxhcexdr\"}") - .toObject(WorkloadNetworkPublicIPsList.class); - Assertions.assertEquals("pqlmfe", model.value().get(0).displayName()); - Assertions.assertEquals(5076002706235027340L, model.value().get(0).numberOfPublicIPs()); - Assertions.assertEquals("reaxhcexdr", model.nextLink()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - WorkloadNetworkPublicIPsList model = new WorkloadNetworkPublicIPsList().withValue(Arrays.asList( - new WorkloadNetworkPublicIpInner().withDisplayName("pqlmfe").withNumberOfPublicIPs(5076002706235027340L), - new WorkloadNetworkPublicIpInner().withDisplayName("ngwfqatm").withNumberOfPublicIPs(6035898469586356847L), - new WorkloadNetworkPublicIpInner().withDisplayName("olvrw").withNumberOfPublicIPs(639224671106145818L), - new WorkloadNetworkPublicIpInner().withDisplayName("fbn").withNumberOfPublicIPs(2314508611274397861L))) - .withNextLink("reaxhcexdr"); - model = BinaryData.fromObject(model).toObject(WorkloadNetworkPublicIPsList.class); - Assertions.assertEquals("pqlmfe", model.value().get(0).displayName()); - Assertions.assertEquals(5076002706235027340L, model.value().get(0).numberOfPublicIPs()); - Assertions.assertEquals("reaxhcexdr", model.nextLink()); - } -} 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 a6006fbd73b7..000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkPublicIpInnerTests.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.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\":\"ahqkg\",\"numberOfPublicIPs\":7920652979146329739,\"publicIPBlock\":\"jnhyjsvf\",\"provisioningState\":\"Deleting\"},\"id\":\"bfvoowvrv\",\"name\":\"t\",\"type\":\"jqppyostronzmy\"}") - .toObject(WorkloadNetworkPublicIpInner.class); - Assertions.assertEquals("ahqkg", model.displayName()); - Assertions.assertEquals(7920652979146329739L, model.numberOfPublicIPs()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - WorkloadNetworkPublicIpInner model - = new WorkloadNetworkPublicIpInner().withDisplayName("ahqkg").withNumberOfPublicIPs(7920652979146329739L); - model = BinaryData.fromObject(model).toObject(WorkloadNetworkPublicIpInner.class); - Assertions.assertEquals("ahqkg", model.displayName()); - Assertions.assertEquals(7920652979146329739L, 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 678423a8c0e9..000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkPublicIpPropertiesTests.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.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\":\"fipns\",\"numberOfPublicIPs\":1729044894039608020,\"publicIPBlock\":\"a\",\"provisioningState\":\"Canceled\"}") - .toObject(WorkloadNetworkPublicIpProperties.class); - Assertions.assertEquals("fipns", model.displayName()); - Assertions.assertEquals(1729044894039608020L, model.numberOfPublicIPs()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - WorkloadNetworkPublicIpProperties model = new WorkloadNetworkPublicIpProperties().withDisplayName("fipns") - .withNumberOfPublicIPs(1729044894039608020L); - model = BinaryData.fromObject(model).toObject(WorkloadNetworkPublicIpProperties.class); - Assertions.assertEquals("fipns", model.displayName()); - Assertions.assertEquals(1729044894039608020L, 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 1ac6a1f7a31e..000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkSegmentInnerTests.java +++ /dev/null @@ -1,40 +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\":\"tizzronasxif\",\"connectedGateway\":\"zq\",\"subnet\":{\"dhcpRanges\":[\"tw\"],\"gatewayAddress\":\"gogczhonnxkrlgny\"},\"portVif\":[{\"portName\":\"sxkkg\"},{\"portName\":\"rrghxjbdhqxvcxgf\"}],\"status\":\"FAILURE\",\"provisioningState\":\"Succeeded\",\"revision\":4282433214728373807},\"id\":\"rnsvbuswd\",\"name\":\"z\",\"type\":\"ybycnunvj\"}") - .toObject(WorkloadNetworkSegmentInner.class); - Assertions.assertEquals("tizzronasxif", model.displayName()); - Assertions.assertEquals("zq", model.connectedGateway()); - Assertions.assertEquals("tw", model.subnet().dhcpRanges().get(0)); - Assertions.assertEquals("gogczhonnxkrlgny", model.subnet().gatewayAddress()); - Assertions.assertEquals(4282433214728373807L, model.revision()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - WorkloadNetworkSegmentInner model = new WorkloadNetworkSegmentInner().withDisplayName("tizzronasxif") - .withConnectedGateway("zq") - .withSubnet(new WorkloadNetworkSegmentSubnet().withDhcpRanges(Arrays.asList("tw")) - .withGatewayAddress("gogczhonnxkrlgny")) - .withRevision(4282433214728373807L); - model = BinaryData.fromObject(model).toObject(WorkloadNetworkSegmentInner.class); - Assertions.assertEquals("tizzronasxif", model.displayName()); - Assertions.assertEquals("zq", model.connectedGateway()); - Assertions.assertEquals("tw", model.subnet().dhcpRanges().get(0)); - Assertions.assertEquals("gogczhonnxkrlgny", model.subnet().gatewayAddress()); - Assertions.assertEquals(4282433214728373807L, 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 6493004de343..000000000000 --- 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\":\"bgj\"}").toObject(WorkloadNetworkSegmentPortVif.class); - Assertions.assertEquals("bgj", model.portName()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - WorkloadNetworkSegmentPortVif model = new WorkloadNetworkSegmentPortVif().withPortName("bgj"); - model = BinaryData.fromObject(model).toObject(WorkloadNetworkSegmentPortVif.class); - Assertions.assertEquals("bgj", 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 cd8c21883d66..000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkSegmentPropertiesTests.java +++ /dev/null @@ -1,40 +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\":\"tkfa\",\"connectedGateway\":\"opqgikyzirtxdyux\",\"subnet\":{\"dhcpRanges\":[\"tpsew\"],\"gatewayAddress\":\"oi\"},\"portVif\":[{\"portName\":\"rydxtqm\"}],\"status\":\"SUCCESS\",\"provisioningState\":\"Updating\",\"revision\":3407001905687200416}") - .toObject(WorkloadNetworkSegmentProperties.class); - Assertions.assertEquals("tkfa", model.displayName()); - Assertions.assertEquals("opqgikyzirtxdyux", model.connectedGateway()); - Assertions.assertEquals("tpsew", model.subnet().dhcpRanges().get(0)); - Assertions.assertEquals("oi", model.subnet().gatewayAddress()); - Assertions.assertEquals(3407001905687200416L, model.revision()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - WorkloadNetworkSegmentProperties model = new WorkloadNetworkSegmentProperties().withDisplayName("tkfa") - .withConnectedGateway("opqgikyzirtxdyux") - .withSubnet( - new WorkloadNetworkSegmentSubnet().withDhcpRanges(Arrays.asList("tpsew")).withGatewayAddress("oi")) - .withRevision(3407001905687200416L); - model = BinaryData.fromObject(model).toObject(WorkloadNetworkSegmentProperties.class); - Assertions.assertEquals("tkfa", model.displayName()); - Assertions.assertEquals("opqgikyzirtxdyux", model.connectedGateway()); - Assertions.assertEquals("tpsew", model.subnet().dhcpRanges().get(0)); - Assertions.assertEquals("oi", model.subnet().gatewayAddress()); - Assertions.assertEquals(3407001905687200416L, 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 2ad6618995c7..000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkSegmentSubnetTests.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.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\":[\"hyaomtbghhavgr\"],\"gatewayAddress\":\"ffovjzhpj\"}") - .toObject(WorkloadNetworkSegmentSubnet.class); - Assertions.assertEquals("hyaomtbghhavgr", model.dhcpRanges().get(0)); - Assertions.assertEquals("ffovjzhpj", model.gatewayAddress()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - WorkloadNetworkSegmentSubnet model - = new WorkloadNetworkSegmentSubnet().withDhcpRanges(Arrays.asList("hyaomtbghhavgr")) - .withGatewayAddress("ffovjzhpj"); - model = BinaryData.fromObject(model).toObject(WorkloadNetworkSegmentSubnet.class); - Assertions.assertEquals("hyaomtbghhavgr", model.dhcpRanges().get(0)); - Assertions.assertEquals("ffovjzhpj", 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 c675ef55974d..000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkSegmentsListTests.java +++ /dev/null @@ -1,57 +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.WorkloadNetworkSegmentsList; -import com.azure.resourcemanager.avs.models.WorkloadNetworkSegmentSubnet; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class WorkloadNetworkSegmentsListTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - WorkloadNetworkSegmentsList model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"displayName\":\"eafxtsgumhjglikk\",\"connectedGateway\":\"slol\",\"subnet\":{\"dhcpRanges\":[\"uzlm\",\"felfktg\"],\"gatewayAddress\":\"crpw\"},\"portVif\":[{\"portName\":\"noigbrnjwmwk\"},{\"portName\":\"bsazejjoqka\"}],\"status\":\"FAILURE\",\"provisioningState\":\"Succeeded\",\"revision\":1349265341310840343},\"id\":\"gzxnfaazpxdtnk\",\"name\":\"mkqjj\",\"type\":\"wuenvr\"},{\"properties\":{\"displayName\":\"ou\",\"connectedGateway\":\"bre\",\"subnet\":{\"dhcpRanges\":[\"ysjkixqtnqttez\",\"wfff\",\"akpjpqqmtedlt\",\"mjihyeozphv\"],\"gatewayAddress\":\"uyqncygupkvipmd\"},\"portVif\":[{\"portName\":\"qupevzh\"}],\"status\":\"FAILURE\",\"provisioningState\":\"Canceled\",\"revision\":5953574927577101427},\"id\":\"ujbypelmcuvhixb\",\"name\":\"xyfwnylrcool\",\"type\":\"ttpkiwkkbnujrywv\"},{\"properties\":{\"displayName\":\"bfpncurdo\",\"connectedGateway\":\"iithtywu\",\"subnet\":{\"dhcpRanges\":[\"ihwqknfdntwjchr\",\"goihx\",\"mwctondzjluudfd\"],\"gatewayAddress\":\"gg\"},\"portVif\":[{\"portName\":\"wtovvtgsein\"}],\"status\":\"FAILURE\",\"provisioningState\":\"Canceled\",\"revision\":3636581995811123220},\"id\":\"pirgnepttwq\",\"name\":\"sniffc\",\"type\":\"mqnrojlpijnkr\"}],\"nextLink\":\"rddh\"}") - .toObject(WorkloadNetworkSegmentsList.class); - Assertions.assertEquals("eafxtsgumhjglikk", model.value().get(0).displayName()); - Assertions.assertEquals("slol", model.value().get(0).connectedGateway()); - Assertions.assertEquals("uzlm", model.value().get(0).subnet().dhcpRanges().get(0)); - Assertions.assertEquals("crpw", model.value().get(0).subnet().gatewayAddress()); - Assertions.assertEquals(1349265341310840343L, model.value().get(0).revision()); - Assertions.assertEquals("rddh", model.nextLink()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - WorkloadNetworkSegmentsList model = new WorkloadNetworkSegmentsList().withValue(Arrays.asList( - new WorkloadNetworkSegmentInner().withDisplayName("eafxtsgumhjglikk") - .withConnectedGateway("slol") - .withSubnet(new WorkloadNetworkSegmentSubnet().withDhcpRanges(Arrays.asList("uzlm", "felfktg")) - .withGatewayAddress("crpw")) - .withRevision(1349265341310840343L), - new WorkloadNetworkSegmentInner().withDisplayName("ou") - .withConnectedGateway("bre") - .withSubnet(new WorkloadNetworkSegmentSubnet() - .withDhcpRanges(Arrays.asList("ysjkixqtnqttez", "wfff", "akpjpqqmtedlt", "mjihyeozphv")) - .withGatewayAddress("uyqncygupkvipmd")) - .withRevision(5953574927577101427L), - new WorkloadNetworkSegmentInner().withDisplayName("bfpncurdo") - .withConnectedGateway("iithtywu") - .withSubnet(new WorkloadNetworkSegmentSubnet() - .withDhcpRanges(Arrays.asList("ihwqknfdntwjchr", "goihx", "mwctondzjluudfd")) - .withGatewayAddress("gg")) - .withRevision(3636581995811123220L))) - .withNextLink("rddh"); - model = BinaryData.fromObject(model).toObject(WorkloadNetworkSegmentsList.class); - Assertions.assertEquals("eafxtsgumhjglikk", model.value().get(0).displayName()); - Assertions.assertEquals("slol", model.value().get(0).connectedGateway()); - Assertions.assertEquals("uzlm", model.value().get(0).subnet().dhcpRanges().get(0)); - Assertions.assertEquals("crpw", model.value().get(0).subnet().gatewayAddress()); - Assertions.assertEquals(1349265341310840343L, model.value().get(0).revision()); - Assertions.assertEquals("rddh", model.nextLink()); - } -} 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 70cda6bb6336..000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkVMGroupInnerTests.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.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\":\"zheydbsdshmk\",\"members\":[\"ehvbbxurip\",\"tfnhtbaxkgxywr\",\"kpyklyhp\"],\"status\":\"FAILURE\",\"provisioningState\":\"Updating\",\"revision\":4054155365384402790},\"id\":\"dlgzibthostgkt\",\"name\":\"tvdxeclzedqb\",\"type\":\"vh\"}") - .toObject(WorkloadNetworkVMGroupInner.class); - Assertions.assertEquals("zheydbsdshmk", model.displayName()); - Assertions.assertEquals("ehvbbxurip", model.members().get(0)); - Assertions.assertEquals(4054155365384402790L, model.revision()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - WorkloadNetworkVMGroupInner model = new WorkloadNetworkVMGroupInner().withDisplayName("zheydbsdshmk") - .withMembers(Arrays.asList("ehvbbxurip", "tfnhtbaxkgxywr", "kpyklyhp")) - .withRevision(4054155365384402790L); - model = BinaryData.fromObject(model).toObject(WorkloadNetworkVMGroupInner.class); - Assertions.assertEquals("zheydbsdshmk", model.displayName()); - Assertions.assertEquals("ehvbbxurip", model.members().get(0)); - Assertions.assertEquals(4054155365384402790L, 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 9fa66b6cd4e0..000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkVMGroupPropertiesTests.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.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\":\"h\",\"members\":[\"dqkdlwwqfbu\",\"lkxt\",\"qjfsmlmbtxhw\"],\"status\":\"SUCCESS\",\"provisioningState\":\"Succeeded\",\"revision\":77859916992999912}") - .toObject(WorkloadNetworkVMGroupProperties.class); - Assertions.assertEquals("h", model.displayName()); - Assertions.assertEquals("dqkdlwwqfbu", model.members().get(0)); - Assertions.assertEquals(77859916992999912L, model.revision()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - WorkloadNetworkVMGroupProperties model = new WorkloadNetworkVMGroupProperties().withDisplayName("h") - .withMembers(Arrays.asList("dqkdlwwqfbu", "lkxt", "qjfsmlmbtxhw")) - .withRevision(77859916992999912L); - model = BinaryData.fromObject(model).toObject(WorkloadNetworkVMGroupProperties.class); - Assertions.assertEquals("h", model.displayName()); - Assertions.assertEquals("dqkdlwwqfbu", model.members().get(0)); - Assertions.assertEquals(77859916992999912L, 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 805688670270..000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkVMGroupsListTests.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.WorkloadNetworkVMGroupInner; -import com.azure.resourcemanager.avs.models.WorkloadNetworkVMGroupsList; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class WorkloadNetworkVMGroupsListTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - WorkloadNetworkVMGroupsList model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"displayName\":\"qjzgxmrhublw\",\"members\":[\"sutrgjup\",\"uutpwoqhih\",\"jqgwzp\",\"fqntcyp\"],\"status\":\"SUCCESS\",\"provisioningState\":\"Building\",\"revision\":4546309057929935505},\"id\":\"kslircizjxvydfc\",\"name\":\"acvlhv\",\"type\":\"gdyftumrtwna\"},{\"properties\":{\"displayName\":\"lbiw\",\"members\":[\"gcyztsfmznbae\",\"ph\",\"hqnrn\",\"pxehuwrykqga\"],\"status\":\"SUCCESS\",\"provisioningState\":\"Failed\",\"revision\":1763839992025561679},\"id\":\"dvk\",\"name\":\"bejdznxcv\",\"type\":\"srhnjivo\"},{\"properties\":{\"displayName\":\"novqfzge\",\"members\":[\"ftul\",\"ltducea\",\"tmczuomejwcwwqi\"],\"status\":\"FAILURE\",\"provisioningState\":\"Deleting\",\"revision\":6715076788595047640},\"id\":\"msvpkjpr\",\"name\":\"kwcf\",\"type\":\"ql\"}],\"nextLink\":\"x\"}") - .toObject(WorkloadNetworkVMGroupsList.class); - Assertions.assertEquals("qjzgxmrhublw", model.value().get(0).displayName()); - Assertions.assertEquals("sutrgjup", model.value().get(0).members().get(0)); - Assertions.assertEquals(4546309057929935505L, model.value().get(0).revision()); - Assertions.assertEquals("x", model.nextLink()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - WorkloadNetworkVMGroupsList model = new WorkloadNetworkVMGroupsList().withValue(Arrays.asList( - new WorkloadNetworkVMGroupInner().withDisplayName("qjzgxmrhublw") - .withMembers(Arrays.asList("sutrgjup", "uutpwoqhih", "jqgwzp", "fqntcyp")) - .withRevision(4546309057929935505L), - new WorkloadNetworkVMGroupInner().withDisplayName("lbiw") - .withMembers(Arrays.asList("gcyztsfmznbae", "ph", "hqnrn", "pxehuwrykqga")) - .withRevision(1763839992025561679L), - new WorkloadNetworkVMGroupInner().withDisplayName("novqfzge") - .withMembers(Arrays.asList("ftul", "ltducea", "tmczuomejwcwwqi")) - .withRevision(6715076788595047640L))) - .withNextLink("x"); - model = BinaryData.fromObject(model).toObject(WorkloadNetworkVMGroupsList.class); - Assertions.assertEquals("qjzgxmrhublw", model.value().get(0).displayName()); - Assertions.assertEquals("sutrgjup", model.value().get(0).members().get(0)); - Assertions.assertEquals(4546309057929935505L, model.value().get(0).revision()); - Assertions.assertEquals("x", model.nextLink()); - } -} 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 bae320f3e714..000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkVirtualMachineInnerTests.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.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\":{\"provisioningState\":\"Deleting\",\"displayName\":\"tymoxoftp\",\"vmType\":\"REGULAR\"},\"id\":\"yczuhxacpq\",\"name\":\"lihhyuspskasdvlm\",\"type\":\"wdgzxulucv\"}") - .toObject(WorkloadNetworkVirtualMachineInner.class); - Assertions.assertEquals("tymoxoftp", model.displayName()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - WorkloadNetworkVirtualMachineInner model - = new WorkloadNetworkVirtualMachineInner().withDisplayName("tymoxoftp"); - model = BinaryData.fromObject(model).toObject(WorkloadNetworkVirtualMachineInner.class); - Assertions.assertEquals("tymoxoftp", 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 48c7ac683607..000000000000 --- 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( - "{\"provisioningState\":\"Canceled\",\"displayName\":\"sreuzvxurisjnh\",\"vmType\":\"SERVICE\"}") - .toObject(WorkloadNetworkVirtualMachineProperties.class); - Assertions.assertEquals("sreuzvxurisjnh", model.displayName()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - WorkloadNetworkVirtualMachineProperties model - = new WorkloadNetworkVirtualMachineProperties().withDisplayName("sreuzvxurisjnh"); - model = BinaryData.fromObject(model).toObject(WorkloadNetworkVirtualMachineProperties.class); - Assertions.assertEquals("sreuzvxurisjnh", 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 6418492568c3..000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworkVirtualMachinesListTests.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.WorkloadNetworkVirtualMachineInner; -import com.azure.resourcemanager.avs.models.WorkloadNetworkVirtualMachinesList; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class WorkloadNetworkVirtualMachinesListTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - WorkloadNetworkVirtualMachinesList model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"provisioningState\":\"Succeeded\",\"displayName\":\"fcluyov\",\"vmType\":\"EDGE\"},\"id\":\"kfezzxscyhwz\",\"name\":\"g\",\"type\":\"rujbzbomvzzbtdc\"},{\"properties\":{\"provisioningState\":\"Failed\",\"displayName\":\"yujviylwdshfssn\",\"vmType\":\"EDGE\"},\"id\":\"efr\",\"name\":\"msgaoj\",\"type\":\"mwn\"}],\"nextLink\":\"tmr\"}") - .toObject(WorkloadNetworkVirtualMachinesList.class); - Assertions.assertEquals("fcluyov", model.value().get(0).displayName()); - Assertions.assertEquals("tmr", model.nextLink()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - WorkloadNetworkVirtualMachinesList model = new WorkloadNetworkVirtualMachinesList() - .withValue(Arrays.asList(new WorkloadNetworkVirtualMachineInner().withDisplayName("fcluyov"), - new WorkloadNetworkVirtualMachineInner().withDisplayName("yujviylwdshfssn"))) - .withNextLink("tmr"); - model = BinaryData.fromObject(model).toObject(WorkloadNetworkVirtualMachinesList.class); - Assertions.assertEquals("fcluyov", model.value().get(0).displayName()); - Assertions.assertEquals("tmr", model.nextLink()); - } -} 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 1eb6b5d606ee..000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksCreateDhcpMockTests.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.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.avs.AvsManager; -import com.azure.resourcemanager.avs.models.WorkloadNetworkDhcp; -import com.azure.resourcemanager.avs.models.WorkloadNetworkDhcpEntity; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class WorkloadNetworksCreateDhcpMockTests { - @Test - public void testCreateDhcp() throws Exception { - String responseStr - = "{\"properties\":{\"dhcpType\":\"WorkloadNetworkDhcpEntity\",\"displayName\":\"zlanrupdwvnph\",\"segments\":[\"q\",\"pjhmqrhvthl\"],\"provisioningState\":\"Succeeded\",\"revision\":1106480050332233961},\"id\":\"mlzzhzdtxetlgyd\",\"name\":\"hqvlnnpxybafiqg\",\"type\":\"aarbgjekg\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - 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("dxfzzzwyjaf") - .withExistingPrivateCloud("pcrrk", "lawjmjsmwrok") - .withProperties( - new WorkloadNetworkDhcpEntity().withDisplayName("hguynuchlgmltxdw").withRevision(3582867417304549284L)) - .create(); - - Assertions.assertEquals("zlanrupdwvnph", response.properties().displayName()); - Assertions.assertEquals(1106480050332233961L, 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 ce74b34ad08d..000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksCreateDnsServiceMockTests.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.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.avs.AvsManager; -import com.azure.resourcemanager.avs.models.DnsServiceLogLevelEnum; -import com.azure.resourcemanager.avs.models.WorkloadNetworkDnsService; -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 reactor.core.publisher.Mono; - -public final class WorkloadNetworksCreateDnsServiceMockTests { - @Test - public void testCreateDnsService() throws Exception { - String responseStr - = "{\"properties\":{\"displayName\":\"yrrleaesinuqt\",\"dnsServiceIp\":\"qobbpihehcec\",\"defaultDnsZone\":\"mrqbrjbbmpxdlv\",\"fqdnZones\":[\"rexcrseqwjksghu\",\"gzhxog\",\"ggsvoujkxibdaf\"],\"logLevel\":\"ERROR\",\"status\":\"FAILURE\",\"provisioningState\":\"Succeeded\",\"revision\":5833008112699016304},\"id\":\"bv\",\"name\":\"bhdyir\",\"type\":\"pwpgddei\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - 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("hj") - .withExistingPrivateCloud("klbyulidwcw", "mzegjon") - .withDisplayName("gdn") - .withDnsServiceIp("brfkspz") - .withDefaultDnsZone("mtksjcitdigsx") - .withFqdnZones(Arrays.asList("l", "plkeuachtomflryt", "wfpfmdgycx", "mskwhqjjysl")) - .withLogLevel(DnsServiceLogLevelEnum.WARNING) - .withRevision(2457531549139763727L) - .create(); - - Assertions.assertEquals("yrrleaesinuqt", response.displayName()); - Assertions.assertEquals("qobbpihehcec", response.dnsServiceIp()); - Assertions.assertEquals("mrqbrjbbmpxdlv", response.defaultDnsZone()); - Assertions.assertEquals("rexcrseqwjksghu", response.fqdnZones().get(0)); - Assertions.assertEquals(DnsServiceLogLevelEnum.ERROR, response.logLevel()); - Assertions.assertEquals(5833008112699016304L, 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 cc4f4d6dfe80..000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksCreateDnsZoneMockTests.java +++ /dev/null @@ -1,52 +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.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.avs.AvsManager; -import com.azure.resourcemanager.avs.models.WorkloadNetworkDnsZone; -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 reactor.core.publisher.Mono; - -public final class WorkloadNetworksCreateDnsZoneMockTests { - @Test - public void testCreateDnsZone() throws Exception { - String responseStr - = "{\"properties\":{\"displayName\":\"klelssxb\",\"domain\":[\"sxz\"],\"dnsServerIps\":[\"srlsmd\"],\"sourceIp\":\"qplpvmjc\",\"dnsServices\":5106286966538490293,\"provisioningState\":\"Succeeded\",\"revision\":7484843776826385857},\"id\":\"eowxvgpi\",\"name\":\"deugf\",\"type\":\"xzecpaxwkufykhvu\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - 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("sqowxwc") - .withExistingPrivateCloud("awzovgkk", "muikjcjcaztbws") - .withDisplayName("ikytwvczcswka") - .withDomain(Arrays.asList("jyfdvlv", "b", "rnfxtgddp", "th")) - .withDnsServerIps(Arrays.asList("mnaoy")) - .withSourceIp("kcoeqswank") - .withDnsServices(8917726159881573369L) - .withRevision(5230753304707759039L) - .create(); - - Assertions.assertEquals("klelssxb", response.displayName()); - Assertions.assertEquals("sxz", response.domain().get(0)); - Assertions.assertEquals("srlsmd", response.dnsServerIps().get(0)); - Assertions.assertEquals("qplpvmjc", response.sourceIp()); - Assertions.assertEquals(5106286966538490293L, response.dnsServices()); - Assertions.assertEquals(7484843776826385857L, 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 dacc34c020c7..000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksCreatePortMirroringMockTests.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.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.avs.AvsManager; -import com.azure.resourcemanager.avs.models.PortMirroringDirectionEnum; -import com.azure.resourcemanager.avs.models.WorkloadNetworkPortMirroring; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class WorkloadNetworksCreatePortMirroringMockTests { - @Test - public void testCreatePortMirroring() throws Exception { - String responseStr - = "{\"properties\":{\"displayName\":\"hqlkccuzgygqwaho\",\"direction\":\"INGRESS\",\"source\":\"gniiprglvaw\",\"destination\":\"z\",\"status\":\"SUCCESS\",\"provisioningState\":\"Succeeded\",\"revision\":9015323122044203190},\"id\":\"bbjpmcubkmif\",\"name\":\"xxkubvphavp\",\"type\":\"h\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - 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("ltymkmvguihywart") - .withExistingPrivateCloud("xepmrut", "nabaobnslujd") - .withDisplayName("hkixkykxdssj") - .withDirection(PortMirroringDirectionEnum.EGRESS) - .withSource("ucfx") - .withDestination("kkflrmymyincqlhr") - .withRevision(6672920695658521113L) - .create(); - - Assertions.assertEquals("hqlkccuzgygqwaho", response.displayName()); - Assertions.assertEquals(PortMirroringDirectionEnum.INGRESS, response.direction()); - Assertions.assertEquals("gniiprglvaw", response.source()); - Assertions.assertEquals("z", response.destination()); - Assertions.assertEquals(9015323122044203190L, 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 ad02b75fc1f9..000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksCreatePublicIpMockTests.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.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.avs.AvsManager; -import com.azure.resourcemanager.avs.models.WorkloadNetworkPublicIp; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class WorkloadNetworksCreatePublicIpMockTests { - @Test - public void testCreatePublicIp() throws Exception { - String responseStr - = "{\"properties\":{\"displayName\":\"leeyaswl\",\"numberOfPublicIPs\":6834415054376102740,\"publicIPBlock\":\"rmfjlrxw\",\"provisioningState\":\"Succeeded\"},\"id\":\"khfkvcisi\",\"name\":\"moaedsxj\",\"type\":\"uivedwcgyeewxeiq\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - 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("nssqyzqed") - .withExistingPrivateCloud("rbqgvgov", "bbttefjo") - .withDisplayName("frdbiqmrjgeihf") - .withNumberOfPublicIPs(7863102201954371556L) - .create(); - - Assertions.assertEquals("leeyaswl", response.displayName()); - Assertions.assertEquals(6834415054376102740L, 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 364f1215664f..000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksCreateSegmentsMockTests.java +++ /dev/null @@ -1,52 +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.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.avs.AvsManager; -import com.azure.resourcemanager.avs.models.WorkloadNetworkSegment; -import com.azure.resourcemanager.avs.models.WorkloadNetworkSegmentSubnet; -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 reactor.core.publisher.Mono; - -public final class WorkloadNetworksCreateSegmentsMockTests { - @Test - public void testCreateSegments() throws Exception { - String responseStr - = "{\"properties\":{\"displayName\":\"zydmxzjijpvuaurk\",\"connectedGateway\":\"ci\",\"subnet\":{\"dhcpRanges\":[\"fx\",\"dcoxnbk\",\"ja\"],\"gatewayAddress\":\"rnnqb\"},\"portVif\":[{\"portName\":\"izxqltgrd\"},{\"portName\":\"ypxrx\"},{\"portName\":\"fihwu\"}],\"status\":\"FAILURE\",\"provisioningState\":\"Succeeded\",\"revision\":277871752472439784},\"id\":\"xrblmliowxihs\",\"name\":\"nxw\",\"type\":\"agnepzwaklsb\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - 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("l") - .withExistingPrivateCloud("psmgo", "guamlj") - .withDisplayName("splzga") - .withConnectedGateway("cshhv") - .withSubnet(new WorkloadNetworkSegmentSubnet() - .withDhcpRanges(Arrays.asList("nxkympqanxrjk", "xtwbta", "ypnyghshxc")) - .withGatewayAddress("hkgmnsg")) - .withRevision(4535170373281810468L) - .create(); - - Assertions.assertEquals("zydmxzjijpvuaurk", response.displayName()); - Assertions.assertEquals("ci", response.connectedGateway()); - Assertions.assertEquals("fx", response.subnet().dhcpRanges().get(0)); - Assertions.assertEquals("rnnqb", response.subnet().gatewayAddress()); - Assertions.assertEquals(277871752472439784L, 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 6c321c70075f..000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksCreateVMGroupMockTests.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.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.avs.AvsManager; -import com.azure.resourcemanager.avs.models.WorkloadNetworkVMGroup; -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 reactor.core.publisher.Mono; - -public final class WorkloadNetworksCreateVMGroupMockTests { - @Test - public void testCreateVMGroup() throws Exception { - String responseStr - = "{\"properties\":{\"displayName\":\"iidlop\",\"members\":[\"wdpyq\",\"ybxubmdna\",\"cbq\"],\"status\":\"SUCCESS\",\"provisioningState\":\"Succeeded\",\"revision\":1864803261739962895},\"id\":\"acigel\",\"name\":\"ohdbvqvwzkj\",\"type\":\"pwbeonr\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - 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("sgl") - .withExistingPrivateCloud("bqqqagwwrxa", "mz") - .withDisplayName("zezkhhltnjadh") - .withMembers(Arrays.asList("wjqo")) - .withRevision(5714887426369504206L) - .create(); - - Assertions.assertEquals("iidlop", response.displayName()); - Assertions.assertEquals("wdpyq", response.members().get(0)); - Assertions.assertEquals(1864803261739962895L, 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 bb207b061733..000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksDeleteDhcpMockTests.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.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.avs.AvsManager; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class WorkloadNetworksDeleteDhcpMockTests { - @Test - public void testDeleteDhcp() throws Exception { - String responseStr = "{}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - 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("ycxhxzgaztta", "o", "dvmfqhppub", 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 8bc7015e678b..000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksDeleteDnsServiceMockTests.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.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.avs.AvsManager; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class WorkloadNetworksDeleteDnsServiceMockTests { - @Test - public void testDeleteDnsService() throws Exception { - String responseStr = "{}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - 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("uhxu", "cbuewmrswnjlxuz", "hwpusxj", 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 e0e008dff4dc..000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksDeleteDnsZoneMockTests.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.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.avs.AvsManager; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class WorkloadNetworksDeleteDnsZoneMockTests { - @Test - public void testDeleteDnsZone() throws Exception { - String responseStr = "{}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - 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("ttvwkpqh", "penuy", "bqeqqekewvnqvcd", 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 6b7c10c00d29..000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksDeletePortMirroringMockTests.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.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.avs.AvsManager; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class WorkloadNetworksDeletePortMirroringMockTests { - @Test - public void testDeletePortMirroring() throws Exception { - String responseStr = "{}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - 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("qecrqctmxx", "tddmf", "huytxzvtzn", 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 83c043e71a99..000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksDeletePublicIpMockTests.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.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.avs.AvsManager; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class WorkloadNetworksDeletePublicIpMockTests { - @Test - public void testDeletePublicIp() throws Exception { - String responseStr = "{}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - 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("hmwffplfmuv", "pckc", "rrvwey", 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 0cbb6449fd26..000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksDeleteSegmentMockTests.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.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.avs.AvsManager; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class WorkloadNetworksDeleteSegmentMockTests { - @Test - public void testDeleteSegment() throws Exception { - String responseStr = "{}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - 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("yych", "nsjlpjrtws", "hv", 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 ba1fdccc37c2..000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksDeleteVMGroupMockTests.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.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.avs.AvsManager; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class WorkloadNetworksDeleteVMGroupMockTests { - @Test - public void testDeleteVMGroup() throws Exception { - String responseStr = "{}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - 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("tjklntikyjuzk", "bqzolxr", "vhqjwtrhtgvg", 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 79792a68f92b..000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksGetDhcpWithResponseMockTests.java +++ /dev/null @@ -1,40 +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.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.avs.AvsManager; -import com.azure.resourcemanager.avs.models.WorkloadNetworkDhcp; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class WorkloadNetworksGetDhcpWithResponseMockTests { - @Test - public void testGetDhcpWithResponse() throws Exception { - String responseStr - = "{\"properties\":{\"dhcpType\":\"WorkloadNetworkDhcpEntity\",\"displayName\":\"rtvtiukye\",\"segments\":[\"nmnahmnx\",\"k\",\"jqirwrw\"],\"provisioningState\":\"Canceled\",\"revision\":6305545466909412711},\"id\":\"fhxwrsne\",\"name\":\"mozqv\",\"type\":\"ubqmamh\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - 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("yjwpfilkmkkh", "l", "dndviauogp", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("rtvtiukye", response.properties().displayName()); - Assertions.assertEquals(6305545466909412711L, 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 c1bb4cbe611e..000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksGetDnsServiceWithResponseMockTests.java +++ /dev/null @@ -1,45 +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.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.avs.AvsManager; -import com.azure.resourcemanager.avs.models.DnsServiceLogLevelEnum; -import com.azure.resourcemanager.avs.models.WorkloadNetworkDnsService; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class WorkloadNetworksGetDnsServiceWithResponseMockTests { - @Test - public void testGetDnsServiceWithResponse() throws Exception { - String responseStr - = "{\"properties\":{\"displayName\":\"myccx\",\"dnsServiceIp\":\"hcoxov\",\"defaultDnsZone\":\"khenlus\",\"fqdnZones\":[\"dtjxtxrdcqt\"],\"logLevel\":\"ERROR\",\"status\":\"FAILURE\",\"provisioningState\":\"Updating\",\"revision\":7902462386564610802},\"id\":\"lvyjtcvuwkas\",\"name\":\"zies\",\"type\":\"uughtuqfecjxeyg\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - 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("nszonwpngaj", "n", "ixjawrtm", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("myccx", response.displayName()); - Assertions.assertEquals("hcoxov", response.dnsServiceIp()); - Assertions.assertEquals("khenlus", response.defaultDnsZone()); - Assertions.assertEquals("dtjxtxrdcqt", response.fqdnZones().get(0)); - Assertions.assertEquals(DnsServiceLogLevelEnum.ERROR, response.logLevel()); - Assertions.assertEquals(7902462386564610802L, 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 0d8b396066c2..000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksGetDnsZoneWithResponseMockTests.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.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.avs.AvsManager; -import com.azure.resourcemanager.avs.models.WorkloadNetworkDnsZone; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class WorkloadNetworksGetDnsZoneWithResponseMockTests { - @Test - public void testGetDnsZoneWithResponse() throws Exception { - String responseStr - = "{\"properties\":{\"displayName\":\"bnfxofvc\",\"domain\":[\"dirazf\",\"xejw\"],\"dnsServerIps\":[\"dujtmvcope\",\"c\",\"jurbuhhlkyqltqsr\",\"gtuwkff\"],\"sourceIp\":\"ktsysidfvclglxn\",\"dnsServices\":3628505387353206788,\"provisioningState\":\"Updating\",\"revision\":5581473704457781073},\"id\":\"ogsf\",\"name\":\"kayi\",\"type\":\"nsharujtjiqxfzyj\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - 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("ueio", "kjbsah", "tdtpdelqacslmo", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("bnfxofvc", response.displayName()); - Assertions.assertEquals("dirazf", response.domain().get(0)); - Assertions.assertEquals("dujtmvcope", response.dnsServerIps().get(0)); - Assertions.assertEquals("ktsysidfvclglxn", response.sourceIp()); - Assertions.assertEquals(3628505387353206788L, response.dnsServices()); - Assertions.assertEquals(5581473704457781073L, 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 11d053a05448..000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksGetGatewayWithResponseMockTests.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.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.avs.AvsManager; -import com.azure.resourcemanager.avs.models.WorkloadNetworkGateway; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class WorkloadNetworksGetGatewayWithResponseMockTests { - @Test - public void testGetGatewayWithResponse() throws Exception { - String responseStr - = "{\"properties\":{\"provisioningState\":\"Building\",\"displayName\":\"mtrwah\",\"path\":\"mu\"},\"id\":\"tb\",\"name\":\"r\",\"type\":\"lrohkpig\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - 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("nchrszizoyu", "lyetndnbfqygg", "g", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("mtrwah", 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 ee522e181c1e..000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksGetPortMirroringWithResponseMockTests.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.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.avs.AvsManager; -import com.azure.resourcemanager.avs.models.PortMirroringDirectionEnum; -import com.azure.resourcemanager.avs.models.WorkloadNetworkPortMirroring; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class WorkloadNetworksGetPortMirroringWithResponseMockTests { - @Test - public void testGetPortMirroringWithResponse() throws Exception { - String responseStr - = "{\"properties\":{\"displayName\":\"q\",\"direction\":\"EGRESS\",\"source\":\"renlvhhtklnvnafv\",\"destination\":\"yfedevjbo\",\"status\":\"FAILURE\",\"provisioningState\":\"Deleting\",\"revision\":41375191452971631},\"id\":\"khminqcymc\",\"name\":\"ngnbdxxew\",\"type\":\"ninvudbchaqdt\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - 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("evrh", "ljyoogwx", "nsduugwbsre", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("q", response.displayName()); - Assertions.assertEquals(PortMirroringDirectionEnum.EGRESS, response.direction()); - Assertions.assertEquals("renlvhhtklnvnafv", response.source()); - Assertions.assertEquals("yfedevjbo", response.destination()); - Assertions.assertEquals(41375191452971631L, 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 10dfecadc420..000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksGetPublicIpWithResponseMockTests.java +++ /dev/null @@ -1,40 +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.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.avs.AvsManager; -import com.azure.resourcemanager.avs.models.WorkloadNetworkPublicIp; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class WorkloadNetworksGetPublicIpWithResponseMockTests { - @Test - public void testGetPublicIpWithResponse() throws Exception { - String responseStr - = "{\"properties\":{\"displayName\":\"fg\",\"numberOfPublicIPs\":1524478115165309750,\"publicIPBlock\":\"pcbbnzqcykna\",\"provisioningState\":\"Deleting\"},\"id\":\"yuicdhzbdy\",\"name\":\"wwgbdv\",\"type\":\"bid\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - 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("vfxzopjh", "zxlioh", "d", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("fg", response.displayName()); - Assertions.assertEquals(1524478115165309750L, 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 2007fb126b20..000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksGetSegmentWithResponseMockTests.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.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.avs.AvsManager; -import com.azure.resourcemanager.avs.models.WorkloadNetworkSegment; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class WorkloadNetworksGetSegmentWithResponseMockTests { - @Test - public void testGetSegmentWithResponse() throws Exception { - String responseStr - = "{\"properties\":{\"displayName\":\"stmhqykizmd\",\"connectedGateway\":\"aoaf\",\"subnet\":{\"dhcpRanges\":[\"v\",\"xmycjimryvwgcw\"],\"gatewayAddress\":\"bmzgwes\"},\"portVif\":[{\"portName\":\"wefohecbvo\"},{\"portName\":\"ndyqleal\"}],\"status\":\"FAILURE\",\"provisioningState\":\"Deleting\",\"revision\":5841187732800294671},\"id\":\"wkxxpvbrdfjmzs\",\"name\":\"zfhotlh\",\"type\":\"k\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - 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("aabeolhbhlvbmxuq", "bsxtkcudfbsfarfs", "owlkjxnqpv", - com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("stmhqykizmd", response.displayName()); - Assertions.assertEquals("aoaf", response.connectedGateway()); - Assertions.assertEquals("v", response.subnet().dhcpRanges().get(0)); - Assertions.assertEquals("bmzgwes", response.subnet().gatewayAddress()); - Assertions.assertEquals(5841187732800294671L, 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 8d288d6e8b53..000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksGetVMGroupWithResponseMockTests.java +++ /dev/null @@ -1,41 +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.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.avs.AvsManager; -import com.azure.resourcemanager.avs.models.WorkloadNetworkVMGroup; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class WorkloadNetworksGetVMGroupWithResponseMockTests { - @Test - public void testGetVMGroupWithResponse() throws Exception { - String responseStr - = "{\"properties\":{\"displayName\":\"vjfn\",\"members\":[\"vlwyzg\"],\"status\":\"FAILURE\",\"provisioningState\":\"Succeeded\",\"revision\":7387831702993633483},\"id\":\"fojuidjpuuyj\",\"name\":\"c\",\"type\":\"jikzoeovvtzej\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - 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("sfuztlvtmv", "gbwidqlvh", "koveof", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("vjfn", response.displayName()); - Assertions.assertEquals("vlwyzg", response.members().get(0)); - Assertions.assertEquals(7387831702993633483L, 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 395224f8ec74..000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksGetVirtualMachineWithResponseMockTests.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.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.avs.AvsManager; -import com.azure.resourcemanager.avs.models.WorkloadNetworkVirtualMachine; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class WorkloadNetworksGetVirtualMachineWithResponseMockTests { - @Test - public void testGetVirtualMachineWithResponse() throws Exception { - String responseStr - = "{\"properties\":{\"provisioningState\":\"Deleting\",\"displayName\":\"tjewlpxuzzj\",\"vmType\":\"SERVICE\"},\"id\":\"fqyhqoto\",\"name\":\"hiqakydiwfbrk\",\"type\":\"pzdqtvhcspod\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - 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("jk", "mykyujxsglhs", "rryejylmbkzudnig", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("tjewlpxuzzj", 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 f53a8ab48b98..000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksGetWithResponseMockTests.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.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.avs.AvsManager; -import com.azure.resourcemanager.avs.models.WorkloadNetwork; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class WorkloadNetworksGetWithResponseMockTests { - @Test - public void testGetWithResponse() throws Exception { - String responseStr - = "{\"properties\":{\"provisioningState\":\"Updating\"},\"id\":\"uiyjib\",\"name\":\"zphdugneiknp\",\"type\":\"oxgjiuqhibt\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - 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("jmxmcuqud", "cvclxynpdk", 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 c2d98f9b8b23..000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksListDhcpMockTests.java +++ /dev/null @@ -1,40 +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.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.avs.AvsManager; -import com.azure.resourcemanager.avs.models.WorkloadNetworkDhcp; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class WorkloadNetworksListDhcpMockTests { - @Test - public void testListDhcp() throws Exception { - String responseStr - = "{\"value\":[{\"properties\":{\"dhcpType\":\"WorkloadNetworkDhcpEntity\",\"displayName\":\"xxgewpk\",\"segments\":[\"ylkmqp\",\"o\",\"hlfbcgwgc\",\"oxoebqi\"],\"provisioningState\":\"Building\",\"revision\":4976347516464596123},\"id\":\"fujqlafcba\",\"name\":\"hpzpo\",\"type\":\"o\"}]}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - 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("z", "pqwjedm", com.azure.core.util.Context.NONE); - - Assertions.assertEquals("xxgewpk", response.iterator().next().properties().displayName()); - Assertions.assertEquals(4976347516464596123L, 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 579156dc1b72..000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksListDnsServicesMockTests.java +++ /dev/null @@ -1,45 +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.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.avs.AvsManager; -import com.azure.resourcemanager.avs.models.DnsServiceLogLevelEnum; -import com.azure.resourcemanager.avs.models.WorkloadNetworkDnsService; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class WorkloadNetworksListDnsServicesMockTests { - @Test - public void testListDnsServices() throws Exception { - String responseStr - = "{\"value\":[{\"properties\":{\"displayName\":\"juahokqto\",\"dnsServiceIp\":\"auxofshfph\",\"defaultDnsZone\":\"nulaiywzejywhsl\",\"fqdnZones\":[\"jpllndnpdwrpq\",\"fgf\",\"gsnnf\",\"yetefyp\"],\"logLevel\":\"WARNING\",\"status\":\"SUCCESS\",\"provisioningState\":\"Building\",\"revision\":3540682391497785966},\"id\":\"rjvzuyt\",\"name\":\"rmlmuowo\",\"type\":\"bauiropi\"}]}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - 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("w", "epdfgkmtdherng", com.azure.core.util.Context.NONE); - - Assertions.assertEquals("juahokqto", response.iterator().next().displayName()); - Assertions.assertEquals("auxofshfph", response.iterator().next().dnsServiceIp()); - Assertions.assertEquals("nulaiywzejywhsl", response.iterator().next().defaultDnsZone()); - Assertions.assertEquals("jpllndnpdwrpq", response.iterator().next().fqdnZones().get(0)); - Assertions.assertEquals(DnsServiceLogLevelEnum.WARNING, response.iterator().next().logLevel()); - Assertions.assertEquals(3540682391497785966L, 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 3096cc96bca5..000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksListDnsZonesMockTests.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.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.avs.AvsManager; -import com.azure.resourcemanager.avs.models.WorkloadNetworkDnsZone; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class WorkloadNetworksListDnsZonesMockTests { - @Test - public void testListDnsZones() throws Exception { - String responseStr - = "{\"value\":[{\"properties\":{\"displayName\":\"coi\",\"domain\":[\"xncnwfe\",\"bnwgfmxj\",\"cgbjbgdlfgt\"],\"dnsServerIps\":[\"naquflq\",\"ctqhamzjrwdk\"],\"sourceIp\":\"eqyj\",\"dnsServices\":1498559377448823995,\"provisioningState\":\"Deleting\",\"revision\":345184952591350162},\"id\":\"zantkwceg\",\"name\":\"amlbnseqacjjvpil\",\"type\":\"uooqjagmdit\"}]}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - 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("aqehg", "dohzjq", com.azure.core.util.Context.NONE); - - Assertions.assertEquals("coi", response.iterator().next().displayName()); - Assertions.assertEquals("xncnwfe", response.iterator().next().domain().get(0)); - Assertions.assertEquals("naquflq", response.iterator().next().dnsServerIps().get(0)); - Assertions.assertEquals("eqyj", response.iterator().next().sourceIp()); - Assertions.assertEquals(1498559377448823995L, response.iterator().next().dnsServices()); - Assertions.assertEquals(345184952591350162L, 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 7c9579a9fcce..000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksListGatewaysMockTests.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.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.avs.AvsManager; -import com.azure.resourcemanager.avs.models.WorkloadNetworkGateway; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class WorkloadNetworksListGatewaysMockTests { - @Test - public void testListGateways() throws Exception { - String responseStr - = "{\"value\":[{\"properties\":{\"provisioningState\":\"Deleting\",\"displayName\":\"vvi\",\"path\":\"cgx\"},\"id\":\"csserxht\",\"name\":\"soxhlwntsjgqr\",\"type\":\"xypruuuy\"}]}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - 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("guaucmfdjwnla", "punj", com.azure.core.util.Context.NONE); - - Assertions.assertEquals("vvi", 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 0cb9edefac71..000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksListMockTests.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.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.avs.AvsManager; -import com.azure.resourcemanager.avs.models.WorkloadNetwork; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class WorkloadNetworksListMockTests { - @Test - public void testList() throws Exception { - String responseStr - = "{\"value\":[{\"properties\":{\"provisioningState\":\"Canceled\"},\"id\":\"otangcfhnykzc\",\"name\":\"gswvxwlmzqwm\",\"type\":\"tx\"}]}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - 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("thnwpzte", "ovmribiattg", 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 d359834dff6b..000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksListPortMirroringMockTests.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.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.avs.AvsManager; -import com.azure.resourcemanager.avs.models.PortMirroringDirectionEnum; -import com.azure.resourcemanager.avs.models.WorkloadNetworkPortMirroring; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class WorkloadNetworksListPortMirroringMockTests { - @Test - public void testListPortMirroring() throws Exception { - String responseStr - = "{\"value\":[{\"properties\":{\"displayName\":\"nhg\",\"direction\":\"BIDIRECTIONAL\",\"source\":\"ynfsvkhgbvqtan\",\"destination\":\"fdlpukhpyr\",\"status\":\"SUCCESS\",\"provisioningState\":\"Failed\",\"revision\":1916878919574088822},\"id\":\"gkhnmgbrouxddbh\",\"name\":\"hpfpazjzoywjxhp\",\"type\":\"ulontacnpqwteht\"}]}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - 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("fusuckzmkwklsno", "axmqeqal", com.azure.core.util.Context.NONE); - - Assertions.assertEquals("nhg", response.iterator().next().displayName()); - Assertions.assertEquals(PortMirroringDirectionEnum.BIDIRECTIONAL, response.iterator().next().direction()); - Assertions.assertEquals("ynfsvkhgbvqtan", response.iterator().next().source()); - Assertions.assertEquals("fdlpukhpyr", response.iterator().next().destination()); - Assertions.assertEquals(1916878919574088822L, 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 056e5f48a0a2..000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksListPublicIPsMockTests.java +++ /dev/null @@ -1,40 +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.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.avs.AvsManager; -import com.azure.resourcemanager.avs.models.WorkloadNetworkPublicIp; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class WorkloadNetworksListPublicIPsMockTests { - @Test - public void testListPublicIPs() throws Exception { - String responseStr - = "{\"value\":[{\"properties\":{\"displayName\":\"yo\",\"numberOfPublicIPs\":8001190211178708850,\"publicIPBlock\":\"uuxvnsasbcry\",\"provisioningState\":\"Succeeded\"},\"id\":\"zrxklobd\",\"name\":\"nazpmk\",\"type\":\"lmv\"}]}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - 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("pxbannovvoxc", "ytprwnwvroev", com.azure.core.util.Context.NONE); - - Assertions.assertEquals("yo", response.iterator().next().displayName()); - Assertions.assertEquals(8001190211178708850L, 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 10dd6bcf3369..000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksListSegmentsMockTests.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.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.avs.AvsManager; -import com.azure.resourcemanager.avs.models.WorkloadNetworkSegment; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class WorkloadNetworksListSegmentsMockTests { - @Test - public void testListSegments() throws Exception { - String responseStr - = "{\"value\":[{\"properties\":{\"displayName\":\"hbragapyyr\",\"connectedGateway\":\"svbpavbopfppdbwn\",\"subnet\":{\"dhcpRanges\":[\"hxkumasjcaacfdmm\",\"pugmehqe\"],\"gatewayAddress\":\"u\"},\"portVif\":[{\"portName\":\"ehewhoqh\"}],\"status\":\"SUCCESS\",\"provisioningState\":\"Deleting\",\"revision\":4907564329393150795},\"id\":\"eaclgschorimk\",\"name\":\"srrm\",\"type\":\"ucsofldpuviyf\"}]}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - 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("xoy", "ukphaimmoiroq", com.azure.core.util.Context.NONE); - - Assertions.assertEquals("hbragapyyr", response.iterator().next().displayName()); - Assertions.assertEquals("svbpavbopfppdbwn", response.iterator().next().connectedGateway()); - Assertions.assertEquals("hxkumasjcaacfdmm", response.iterator().next().subnet().dhcpRanges().get(0)); - Assertions.assertEquals("u", response.iterator().next().subnet().gatewayAddress()); - Assertions.assertEquals(4907564329393150795L, 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 a53bf8fe3e75..000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksListVMGroupsMockTests.java +++ /dev/null @@ -1,41 +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.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.avs.AvsManager; -import com.azure.resourcemanager.avs.models.WorkloadNetworkVMGroup; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class WorkloadNetworksListVMGroupsMockTests { - @Test - public void testListVMGroups() throws Exception { - String responseStr - = "{\"value\":[{\"properties\":{\"displayName\":\"fpubntnbatz\",\"members\":[\"sowsaael\"],\"status\":\"FAILURE\",\"provisioningState\":\"Building\",\"revision\":6305699352283667401},\"id\":\"lrvkmjc\",\"name\":\"mjvlgfgg\",\"type\":\"vkyylizrzbjpsf\"}]}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - 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("qaxsipietgbebjf", "lbmoichd", com.azure.core.util.Context.NONE); - - Assertions.assertEquals("fpubntnbatz", response.iterator().next().displayName()); - Assertions.assertEquals("sowsaael", response.iterator().next().members().get(0)); - Assertions.assertEquals(6305699352283667401L, 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 32b3a29da206..000000000000 --- a/sdk/avs/azure-resourcemanager-avs/src/test/java/com/azure/resourcemanager/avs/generated/WorkloadNetworksListVirtualMachinesMockTests.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.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.avs.AvsManager; -import com.azure.resourcemanager.avs.models.WorkloadNetworkVirtualMachine; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class WorkloadNetworksListVirtualMachinesMockTests { - @Test - public void testListVirtualMachines() throws Exception { - String responseStr - = "{\"value\":[{\"properties\":{\"provisioningState\":\"Failed\",\"displayName\":\"jgl\",\"vmType\":\"EDGE\"},\"id\":\"yzlwh\",\"name\":\"memhooclutnpq\",\"type\":\"emc\"}]}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - 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("uic", "hvtrrmhwrbfdpyf", com.azure.core.util.Context.NONE); - - Assertions.assertEquals("jgl", response.iterator().next().displayName()); - } -}